text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (mnuo *MetricNameUpdateOne) SetDeletedAt(t time.Time) *MetricNameUpdateOne { mnuo.mutation.SetDeletedAt(t) return mnuo }
[ -0.3100248873233795, -0.1736818253993988, 0.21907863020896912, -0.5584191679954529, 0.17415796220302582, 1.0996147394180298, 0.11036376655101776, -0.3598152995109558, -0.32016655802726746, -0.8711925745010376, -0.4318188726902008, -0.1975659430027008, 0.17272478342056274, 0.532351076602935...
func (mnuo *MetricNameUpdateOne) SetName(s string) *MetricNameUpdateOne { mnuo.mutation.SetName(s) return mnuo }
[ -0.46165168285369873, 0.8138235807418823, 0.11120011657476425, 1.4926913976669312, -0.5004470944404602, 0.21118633449077606, 0.7341993451118469, 0.273354709148407, -0.3617316782474518, 0.18427930772304535, -0.662969172000885, -0.5044271945953369, -0.29981812834739685, 0.06390076130628586, ...
func (mnuo *MetricNameUpdateOne) SetHelp(s string) *MetricNameUpdateOne { mnuo.mutation.SetHelp(s) return mnuo }
[ 1.0382177829742432, 0.5587402582168579, 0.023206599056720734, 1.3722769021987915, 0.04398709163069725, 0.9002349972724915, 0.8410301804542542, -0.4093937575817108, -0.22880664467811584, 0.224713996052742, -0.033570580184459686, -0.5946238040924072, 0.18251709640026093, -0.05684369802474975...
func (mnuo *MetricNameUpdateOne) SetTypeId(u uint) *MetricNameUpdateOne { mnuo.mutation.ResetTypeId() mnuo.mutation.SetTypeId(u) return mnuo }
[ -0.028879594057798386, 0.16669650375843048, 0.2208603173494339, 1.4366815090179443, -0.4020635187625885, 1.3021458387374878, 0.7971842288970947, -0.048671621829271317, 0.26309934258461, -0.09185551851987839, -1.1331820487976074, 0.7564414143562317, -0.6437606811523438, 1.102248191833496, ...
func (mnuo *MetricNameUpdateOne) AddTypeId(u uint) *MetricNameUpdateOne { mnuo.mutation.AddTypeId(u) return mnuo }
[ 0.05427242070436478, 0.2365371584892273, 0.41563910245895386, 1.3206416368484497, -0.48218801617622375, 1.2253329753875732, 0.3488142490386963, -0.2871823012828827, 0.5254163146018982, -0.1541992425918579, -0.4617478549480438, 0.45144835114479065, -0.7055642604827881, 1.1332156658172607, ...
func (mnuo *MetricNameUpdateOne) AddMetricIDs(ids ...int) *MetricNameUpdateOne { mnuo.mutation.AddMetricIDs(ids...) return mnuo }
[ -1.375817060470581, 0.5058942437171936, -0.038391344249248505, 0.6737387180328369, -0.12155596911907196, 0.7844890356063843, -0.28176507353782654, -0.1299632340669632, -0.3521775007247925, 0.13722838461399078, -0.2298448085784912, -0.22731968760490417, -1.2059319019317627, -0.0166394300758...
func (mnuo *MetricNameUpdateOne) AddMetrics(m ...*Metric) *MetricNameUpdateOne { ids := make([]int, len(m)) for i := range m { ids[i] = m[i].ID } return mnuo.AddMetricIDs(ids...) }
[ -0.6546244025230408, 1.0622835159301758, 0.11948298662900925, 1.3038252592086792, 0.0688386857509613, 0.9935302734375, -0.33611711859703064, -0.9073859453201294, -0.8902557492256165, -0.3927147090435028, 0.8876764178276062, -0.5697667598724365, -1.1071332693099976, 0.4014110565185547, -1...
func (mnuo *MetricNameUpdateOne) AddEventIDs(ids ...int) *MetricNameUpdateOne { mnuo.mutation.AddEventIDs(ids...) return mnuo }
[ -0.5601689219474792, -0.24046748876571655, 0.1905968338251114, 0.27027979493141174, 0.03023901768028736, 0.585191547870636, -0.1760721653699875, 0.37858545780181885, 0.17161141335964203, 0.357899934053421, 0.12512469291687012, -0.16042068600654602, -0.6270557641983032, 0.327099084854126, ...
func (mnuo *MetricNameUpdateOne) AddEvents(e ...*Event) *MetricNameUpdateOne { ids := make([]int, len(e)) for i := range e { ids[i] = e[i].ID } return mnuo.AddEventIDs(ids...) }
[ -0.3591289222240448, 0.38028162717819214, 0.3785080313682556, 0.46864715218544006, 0.5387444496154785, 0.6310163736343384, -0.2123316079378128, -0.06773624569177628, 0.05800047144293785, -0.20373067259788513, 0.6632526516914368, -0.9296313524246216, -0.527256190776825, 0.18537317216396332,...
func (mnuo *MetricNameUpdateOne) SetOwnersID(id uint) *MetricNameUpdateOne { mnuo.mutation.SetOwnersID(id) return mnuo }
[ -0.311760812997818, -0.22915272414684296, -0.39300981163978577, 0.699542760848999, -0.43248289823532104, 0.5132865905761719, 0.24815993010997772, -0.35106879472732544, 0.17514653503894806, 0.08787307143211365, -0.3781246244907379, 0.0753524973988533, -0.5320497751235962, 0.4966778755187988...
func (mnuo *MetricNameUpdateOne) SetNillableOwnersID(id *uint) *MetricNameUpdateOne { if id != nil { mnuo = mnuo.SetOwnersID(*id) } return mnuo }
[ -0.05831664055585861, 0.02529195323586464, -0.09447237849235535, 0.3719760477542877, -0.7353582978248596, 0.040895309299230576, -0.1811802238225937, -0.5065010190010071, 0.30042850971221924, 0.07865691184997559, 0.36454805731773376, 0.20563657581806183, -0.7340967655181885, 0.3973527550697...
func (mnuo *MetricNameUpdateOne) SetOwners(m *MetricType) *MetricNameUpdateOne { return mnuo.SetOwnersID(m.ID) }
[ -0.09100817888975143, 0.7694342732429504, 0.07386462390422821, 0.7592756748199463, 0.23259080946445465, 0.42683884501457214, 0.4485836923122406, -0.6674206256866455, -0.4330795109272003, -0.6198343634605408, 0.2892041802406311, 0.04477014020085335, -0.6914722919464111, 0.2003793716430664, ...
func (mnuo *MetricNameUpdateOne) Mutation() *MetricNameMutation { return mnuo.mutation }
[ -0.3458675742149353, -0.08041930943727493, 0.02082100696861744, 0.5456413626670837, 0.15030105412006378, 0.9356792569160461, 0.885265588760376, -0.6118042469024658, 0.57930588722229, -0.056429456919431686, 0.18617387115955353, -0.39010125398635864, -0.92731773853302, -0.4504489302635193, ...
func (mnuo *MetricNameUpdateOne) ClearMetrics() *MetricNameUpdateOne { mnuo.mutation.ClearMetrics() return mnuo }
[ -0.11584226787090302, 0.9884725213050842, -0.09265559911727905, 0.6096612811088562, -1.0803500413894653, 0.9414082765579224, -0.20352047681808472, -0.7649710178375244, 0.009830154478549957, 0.2452467828989029, 0.3897332549095154, 0.491254597902298, -0.7920804023742676, -0.49822771549224854...
func (mnuo *MetricNameUpdateOne) RemoveMetricIDs(ids ...int) *MetricNameUpdateOne { mnuo.mutation.RemoveMetricIDs(ids...) return mnuo }
[ -1.4221153259277344, 0.2862263023853302, -0.16148051619529724, 0.7526766657829285, -0.7942461371421814, 0.268507182598114, 0.32779017090797424, 0.37828293442726135, -0.6574630737304688, 0.5947136878967285, -0.7516074776649475, -0.07155195623636246, -1.845361590385437, -0.3974679410457611, ...
func (mnuo *MetricNameUpdateOne) RemoveMetrics(m ...*Metric) *MetricNameUpdateOne { ids := make([]int, len(m)) for i := range m { ids[i] = m[i].ID } return mnuo.RemoveMetricIDs(ids...) }
[ -0.599979817867279, 0.9648591876029968, 0.07312717288732529, 1.261655569076538, -0.48440858721733093, 0.41236263513565063, 0.27305173873901367, -0.3884747624397278, -0.989239513874054, 0.08202194422483444, 0.27349305152893066, -0.7426360249519348, -1.5153998136520386, 0.08566536009311676, ...
func (mnuo *MetricNameUpdateOne) ClearEvents() *MetricNameUpdateOne { mnuo.mutation.ClearEvents() return mnuo }
[ 0.6651870608329773, 0.6489394307136536, 0.09146684408187866, 0.4263582229614258, -0.5345901846885681, 0.7224195599555969, 0.17006100714206696, -0.733866810798645, 0.6639689803123474, -0.053551699966192245, 0.6134762763977051, 0.3838576674461365, -0.44212350249290466, -0.726815402507782, ...
func (mnuo *MetricNameUpdateOne) RemoveEventIDs(ids ...int) *MetricNameUpdateOne { mnuo.mutation.RemoveEventIDs(ids...) return mnuo }
[ -0.6015883088111877, -0.5242112874984741, 0.23096512258052826, 0.22435776889324188, -0.8172786235809326, 0.15511518716812134, 0.3634135127067566, 0.8907355666160583, 0.050193674862384796, 0.7538609504699707, -0.18565328419208527, -0.18705561757087708, -1.1569193601608276, 0.061401233077049...
func (mnuo *MetricNameUpdateOne) RemoveEvents(e ...*Event) *MetricNameUpdateOne { ids := make([]int, len(e)) for i := range e { ids[i] = e[i].ID } return mnuo.RemoveEventIDs(ids...) }
[ -0.18002371490001678, 0.12689310312271118, 0.47337087988853455, 0.4820733666419983, -0.12113599479198456, 0.10927033424377441, 0.5285645723342896, 0.44408130645751953, 0.17696821689605713, 0.19951240718364716, 0.1288781762123108, -0.9502831101417542, -0.9305223822593689, -0.150815784931182...
func (mnuo *MetricNameUpdateOne) ClearOwners() *MetricNameUpdateOne { mnuo.mutation.ClearOwners() return mnuo }
[ -0.43558722734451294, 0.8040518760681152, -0.2860560715198517, 0.7699549794197083, -0.6208016872406006, 0.4940522015094757, -0.16144795715808868, -0.812919020652771, 0.03684801980853081, 0.25163012742996216, 1.2861295938491821, 0.7397355437278748, -0.42442139983177185, -0.6700994372367859,...
func (mnuo *MetricNameUpdateOne) Select(field string, fields ...string) *MetricNameUpdateOne { mnuo.fields = append([]string{field}, fields...) return mnuo }
[ -0.25218871235847473, 0.6927006840705872, 0.1728282868862152, -0.32590869069099426, 0.1752699762582779, 0.6190252900123596, -0.04159236326813698, -0.8771802186965942, -0.23779849708080292, -0.3926754593849182, -0.7385836243629456, 0.03357968479394913, -0.7311501502990723, -0.57043606042861...
func (mnuo *MetricNameUpdateOne) Save(ctx context.Context) (*MetricName, error) { var ( err error node *MetricName ) mnuo.defaults() if len(mnuo.hooks) == 0 { if err = mnuo.check(); err != nil { return nil, err } node, err = mnuo.sqlSave(ctx) } else { var mut Mutator = MutateFunc(func(ctx context.C...
[ -0.4534468650817871, 0.12735725939273834, 0.7011547684669495, -0.3343595862388611, 0.2870751917362213, -0.1931108832359314, 0.4467407763004303, -1.0771986246109009, -0.8451707363128662, 0.7804726958274841, 0.01445495244115591, 0.05224534124135971, -0.5823371410369873, 0.0745372474193573, ...
func (mnuo *MetricNameUpdateOne) SaveX(ctx context.Context) *MetricName { node, err := mnuo.Save(ctx) if err != nil { panic(err) } return node }
[ -0.341882586479187, 1.0173985958099365, 0.3947071433067322, 0.2429589331150055, -0.8923660516738892, 1.2025401592254639, -0.5550837516784668, -0.18737486004829407, 0.6632877588272095, 0.48687517642974854, -0.9487230777740479, 0.05095800384879112, -0.7876459956169128, -0.43037354946136475, ...
func (mnuo *MetricNameUpdateOne) Exec(ctx context.Context) error { _, err := mnuo.Save(ctx) return err }
[ 0.21764415502548218, 0.4832366108894348, 0.6047170758247375, 0.4629906415939331, 0.14504103362560272, 1.2571749687194824, 0.09475797414779663, -0.41607218980789185, -0.4445634186267853, 0.5047677159309387, -0.4566318988800049, -0.11381062865257263, -0.6845666766166687, -0.5611091256141663,...
func (mnuo *MetricNameUpdateOne) ExecX(ctx context.Context) { if err := mnuo.Exec(ctx); err != nil { panic(err) } }
[ 0.7181411981582642, 0.8929309248924255, 0.677553653717041, 0.7078297138214111, -0.40714579820632935, 1.5012973546981812, -0.42417600750923157, -0.3701910674571991, 0.0035204694140702486, 0.08809759467840195, -0.16009214520454407, 0.8564773201942444, 0.06484340876340866, -0.2085307985544204...
func (mnuo *MetricNameUpdateOne) defaults() { if _, ok := mnuo.mutation.UpdatedAt(); !ok { v := metricname.UpdateDefaultUpdatedAt() mnuo.mutation.SetUpdatedAt(v) } if _, ok := mnuo.mutation.DeletedAt(); !ok { v := metricname.UpdateDefaultDeletedAt() mnuo.mutation.SetDeletedAt(v) } }
[ -0.3308911919593811, 0.7133844494819641, 0.3805074691772461, 0.0040173339657485485, 0.7597437500953674, 0.1212134137749672, -0.35130205750465393, -0.46469682455062866, -0.18655502796173096, -0.3002650737762451, -0.27525097131729126, -0.15103277564048767, -0.14047162234783173, -0.1427264958...
func (mnuo *MetricNameUpdateOne) check() error { if v, ok := mnuo.mutation.Name(); ok { if err := metricname.NameValidator(v); err != nil { return &ValidationError{Name: "name", err: fmt.Errorf("ent: validator failed for field \"name\": %w", err)} } } return nil }
[ -0.11820560693740845, 0.4274274408817291, 0.4491853713989258, 0.4185258150100708, 0.026840373873710632, 0.610329270362854, 0.20698533952236176, -0.5591875910758972, -0.8443607687950134, 0.47339314222335815, 0.3947136402130127, -0.13412688672542572, -0.36099618673324585, 1.0509672164916992,...
func (o *PatchDeploymentUsingPATCHReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewPatchDeploymentUsingPATCHOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } ...
[ -0.5969333648681641, -1.0770102739334106, 0.643810510635376, 0.027111563831567764, -0.5030842423439026, -0.6019510626792908, 0.2502824664115906, 0.11466757208108902, 0.6731075644493103, 0.1897442638874054, 0.9114575386047363, -0.08295459300279617, -0.4622563421726227, 0.14755846560001373, ...
func NewPatchDeploymentUsingPATCHOK() *PatchDeploymentUsingPATCHOK { return &PatchDeploymentUsingPATCHOK{} }
[ -0.7684664130210876, -0.24177120625972748, 0.24150815606117249, 0.03255666419863701, -1.0221539735794067, -0.019385110586881638, 1.0617713928222656, 0.2108212560415268, 0.34658104181289673, 0.3183278739452362, 0.3644534647464752, -0.2863178253173828, 1.025750994682312, 0.5899353623390198, ...
func NewPatchDeploymentUsingPATCHUnauthorized() *PatchDeploymentUsingPATCHUnauthorized { return &PatchDeploymentUsingPATCHUnauthorized{} }
[ -1.2221614122390747, -0.3300744593143463, 0.48408788442611694, 0.07129790633916855, -1.3900563716888428, 0.09060481935739517, 0.2963988780975342, 0.7339983582496643, 0.8920413851737976, -0.8333641290664673, 0.37233033776283264, 1.089550495147705, 0.45078977942466736, -0.007032066583633423,...
func NewPatchDeploymentUsingPATCHNotFound() *PatchDeploymentUsingPATCHNotFound { return &PatchDeploymentUsingPATCHNotFound{} }
[ -0.8022501468658447, -1.1460016965866089, 0.08067981153726578, -0.8090071082115173, -0.4083181619644165, 0.44697365164756775, 0.3381764590740204, -0.13481169939041138, 0.6916760206222534, -0.4775750935077667, 0.11505263298749924, 0.6086580157279968, 0.3175201416015625, 0.1188715249300003, ...
func FakeEnsureInterval(d time.Duration) (restore func()) { old := ensureInterval ensureInterval = d return func() { ensureInterval = old } }
[ -0.2520892918109894, 0.20857451856136322, 0.357666552066803, -0.2341761589050293, -0.41287198662757874, 0.292525976896286, 0.33235394954681396, -0.2393050193786621, 0.5463199615478516, -0.13894738256931305, -0.47697415947914124, 0.1227148175239563, -1.1430846452713013, -0.09310054779052734...
func FakePruneInterval(prunei, prunew, abortw time.Duration) (restore func()) { oldPruneInterval := pruneInterval oldPruneWait := pruneWait oldAbortWait := abortWait pruneInterval = prunei pruneWait = prunew abortWait = abortw return func() { pruneInterval = oldPruneInterval pruneWait = oldPruneWait abortW...
[ 0.20474684238433838, -0.21344910562038422, 0.5280646681785583, -0.12380564212799072, -0.3352718949317932, 0.14740143716335297, -0.38043344020843506, -0.19313719868659973, 0.0606185607612133, 0.49012452363967896, 0.13578231632709503, 0.2555103898048401, -0.6586019396781921, -1.1362917423248...
func FakeEnsureNext(o *Overlord, t time.Time) { o.ensureNext = t }
[ -0.29994723200798035, 0.35798072814941406, 0.26790106296539307, 0.35296571254730225, -0.3123546242713928, 0.4374246299266815, -0.5395433902740479, -0.24849869310855865, 0.15969397127628326, 0.37810176610946655, -1.1882293224334717, 0.38897645473480225, -0.450138121843338, 0.892967343330383...
func (o *Overlord) Engine() *StateEngine { return o.stateEng }
[ -0.2872999310493469, -0.6222209930419922, 0.39439067244529724, 0.02225595712661743, -0.04456868767738342, 0.23942206799983978, 0.7547389268875122, -0.4796389937400818, 0.3678910732269287, -0.8145306706428528, 0.49670541286468506, -0.16673098504543304, 0.24123825132846832, 0.476682931184768...
func Flatten(in *corev1.NFSVolumeSource) []interface{} { out := make([]interface{}, 1) row := map[string]interface{}{} if in.Server != "" { row[FieldServer] = in.Server } if in.Path != "" { row[FieldPath] = in.Path } out[0] = row return out }
[ -1.3788127899169922, -0.09567169845104218, 0.3156823515892029, -0.3641853332519531, -0.004456339869648218, -0.681929349899292, -0.06350840628147125, 0.32072868943214417, 0.0353456549346447, -0.11208904534578323, -0.6537600159645081, 0.06653538346290588, -0.9584498405456543, 0.4208084046840...
func GetTestMySQLDSN(tb testing.TB) string { tb.Helper() if testing.Short() { tb.Skip("-short flag is passed, skipping test with real database.") } cfg := mysql.NewConfig() cfg.User = "root" cfg.Passwd = "root-password" cfg.Net = "tcp" cfg.Addr = "127.0.0.1:3306" cfg.DBName = "world" // MultiStatements m...
[ 0.39971521496772766, -0.003514218842610717, 0.637019157409668, -0.12186628580093384, -0.6094246506690979, -0.7521738409996033, 0.3663744032382965, -0.22941741347312927, 0.5686146020889282, -0.6362733840942383, -0.9276785254478455, 0.4966995120048523, 0.11825239658355713, 0.8238268494606018...
func OpenTestMySQL(tb testing.TB) *sql.DB { tb.Helper() db, err := sql.Open("mysql", GetTestMySQLDSN(tb)) require.NoError(tb, err) db.SetMaxIdleConns(10) db.SetMaxOpenConns(10) db.SetConnMaxLifetime(0) waitForFixtures(tb, db) // to make Actions tests more stable _, err = db.Exec(`ANALYZE /* pmm-agent-tests...
[ 0.2649767994880676, 0.016567885875701904, 0.5882552266120911, -0.307763934135437, -0.3740798234939575, -0.21914547681808472, 0.8919734358787537, -0.06000887230038643, 0.9330011010169983, -0.5333080291748047, -0.3522194027900696, 0.16195502877235413, -0.6461904048919678, 0.05815542116761207...
func MySQLVersion(tb testing.TB, db *sql.DB) (string, MySQLVendor) { tb.Helper() var varName, version string err := db.QueryRow(`SHOW /* pmm-agent-tests:MySQLVersion */ GLOBAL VARIABLES WHERE Variable_name = 'version'`).Scan(&varName, &version) require.NoError(tb, err) mm := regexp.MustCompile(`^\d+\.\d+`).FindSt...
[ 0.673803448677063, -1.299994707107544, 0.8331161737442017, -0.4874843657016754, -0.5494056940078735, 0.09532525390386581, 0.6668448448181152, 0.2406763881444931, -0.4097411632537842, 0.8354345560073853, -0.6375715732574463, 0.6001680493354797, -0.2540595531463623, 0.8624325394630432, 0.9...
func ProtoToAppengineDomainMappingSslSettingsSslManagementTypeEnum(e appenginepb.AppengineDomainMappingSslSettingsSslManagementTypeEnum) *appengine.DomainMappingSslSettingsSslManagementTypeEnum { if e == 0 { return nil } if n, ok := appenginepb.AppengineDomainMappingSslSettingsSslManagementTypeEnum_name[int32(e)];...
[ -0.8014881014823914, 0.5643133521080017, 0.3810065686702728, 0.5523247718811035, 0.42452290654182434, 0.5678659677505493, 0.051114484667778015, -0.11846639961004257, 0.7177415490150452, -0.3552432656288147, -0.01966671831905842, 0.028756791725754738, 0.3150038719177246, 0.5811446309089661,...
func ProtoToAppengineDomainMappingResourceRecordsTypeEnum(e appenginepb.AppengineDomainMappingResourceRecordsTypeEnum) *appengine.DomainMappingResourceRecordsTypeEnum { if e == 0 { return nil } if n, ok := appenginepb.AppengineDomainMappingResourceRecordsTypeEnum_name[int32(e)]; ok { e := appengine.DomainMapping...
[ -0.9761815071105957, -0.6059948801994324, 0.24053223431110382, -0.44589537382125854, -0.2527550756931305, 0.017744021490216255, 0.6976518630981445, 0.5999791622161865, 0.3739506006240845, -0.24639706313610077, -0.1585855633020401, -0.015989458188414574, 0.36498644948005676, 0.2815419733524...
func ProtoToAppengineDomainMappingSslSettings(p *appenginepb.AppengineDomainMappingSslSettings) *appengine.DomainMappingSslSettings { if p == nil { return nil } obj := &appengine.DomainMappingSslSettings{ CertificateId: dcl.StringOrNil(p.CertificateId), SslManagementType: ProtoToAppengi...
[ -0.5411367416381836, 0.08356553316116333, 0.12081670761108398, 0.31023862957954407, 0.001135758007876575, 0.7946872115135193, -0.6303687691688538, -0.002174404449760914, 0.30362793803215027, -0.7290223836898804, -0.12158863991498947, 0.5535523891448975, -0.1766940951347351, 0.7750329375267...
func ProtoToAppengineDomainMappingResourceRecords(p *appenginepb.AppengineDomainMappingResourceRecords) *appengine.DomainMappingResourceRecords { if p == nil { return nil } obj := &appengine.DomainMappingResourceRecords{ Name: dcl.StringOrNil(p.Name), Rrdata: dcl.StringOrNil(p.Rrdata), Type: ProtoToAppen...
[ -0.47186484932899475, 0.004182747099548578, 0.10168840736150742, -0.47217488288879395, -0.4184130132198334, 0.5487781763076782, -0.0366763137280941, 0.3016342222690582, 0.4524604380130768, -0.5769335627555847, 0.15043073892593384, -0.35354000329971313, -0.9042730927467346, 0.68587374687194...
func ProtoToDomainMapping(p *appenginepb.AppengineDomainMapping) *appengine.DomainMapping { obj := &appengine.DomainMapping{ SelfLink: dcl.StringOrNil(p.SelfLink), Name: dcl.StringOrNil(p.Name), SslSettings: ProtoToAppengineDomainMappingSslSettings(p.GetSslSettings()), App: dcl.StringOrNil(p....
[ -0.6293119192123413, -0.2423630803823471, 0.2527275085449219, -0.23966610431671143, -0.43086954951286316, 0.5321988463401794, -0.30283573269844055, 0.09852296859025955, 0.7348628044128418, -1.4144091606140137, 0.2486233115196228, 0.2469610869884491, -0.0181653443723917, 0.5788435339927673,...
func AppengineDomainMappingSslSettingsSslManagementTypeEnumToProto(e *appengine.DomainMappingSslSettingsSslManagementTypeEnum) appenginepb.AppengineDomainMappingSslSettingsSslManagementTypeEnum { if e == nil { return appenginepb.AppengineDomainMappingSslSettingsSslManagementTypeEnum(0) } if v, ok := appenginepb.Ap...
[ -0.6198993921279907, 1.0978273153305054, 0.6166101694107056, 0.2464713305234909, -0.02066127397119999, 0.49045780301094055, -0.13586996495723724, -0.7023848295211792, 0.8005539774894714, 0.25525665283203125, 0.22400672733783722, -0.060943491756916046, 0.5075250864028931, 0.5753077864646912...
func AppengineDomainMappingResourceRecordsTypeEnumToProto(e *appengine.DomainMappingResourceRecordsTypeEnum) appenginepb.AppengineDomainMappingResourceRecordsTypeEnum { if e == nil { return appenginepb.AppengineDomainMappingResourceRecordsTypeEnum(0) } if v, ok := appenginepb.AppengineDomainMappingResourceRecordsT...
[ -0.8603483438491821, -0.45551297068595886, 0.455559104681015, -0.5228456854820251, -0.323556125164032, 0.0797828808426857, 0.6778720617294312, -0.21546755731105804, 0.8320105671882629, 0.010404372587800026, -0.007874595001339912, -0.06489343196153641, 0.616108238697052, 0.162427619099617, ...
func AppengineDomainMappingSslSettingsToProto(o *appengine.DomainMappingSslSettings) *appenginepb.AppengineDomainMappingSslSettings { if o == nil { return nil } p := &appenginepb.AppengineDomainMappingSslSettings{ CertificateId: dcl.ValueOrEmptyString(o.CertificateId), SslManagementType: ...
[ -0.33358272910118103, 0.8727820515632629, 0.32484832406044006, 0.0008539826376363635, -0.08834294974803925, 0.2048395425081253, -0.4678584337234497, -0.24876534938812256, -0.025220537558197975, -0.08974040299654007, -0.35304200649261475, 0.06818021088838577, 0.5854895114898682, 0.276156902...
func AppengineDomainMappingResourceRecordsToProto(o *appengine.DomainMappingResourceRecords) *appenginepb.AppengineDomainMappingResourceRecords { if o == nil { return nil } p := &appenginepb.AppengineDomainMappingResourceRecords{ Name: dcl.ValueOrEmptyString(o.Name), Rrdata: dcl.ValueOrEmptyString(o.Rrdata),...
[ -0.03363983333110809, 0.04769417643547058, 0.18207478523254395, -0.5819070339202881, -0.05499032884836197, 0.05593884363770485, 0.1528107076883316, -0.14205850660800934, 0.3041197955608368, 0.1214308887720108, -0.46987396478652954, -0.5961391925811768, -0.06316055357456207, 0.4250377416610...
func DomainMappingToProto(resource *appengine.DomainMapping) *appenginepb.AppengineDomainMapping { p := &appenginepb.AppengineDomainMapping{ SelfLink: dcl.ValueOrEmptyString(resource.SelfLink), Name: dcl.ValueOrEmptyString(resource.Name), SslSettings: AppengineDomainMappingSslSettingsToProto(resource.S...
[ -0.4543560743331909, 0.37371838092803955, 0.3179806172847748, -0.2894638478755951, -0.22179415822029114, 0.2667919993400574, -0.1401795595884323, -0.46088120341300964, 0.8113117218017578, -0.599269688129425, 0.1352820247411728, -0.3149280548095703, 0.5657921433448792, 0.375591903924942, ...
func (s *DomainMappingServer) applyDomainMapping(ctx context.Context, c *appengine.Client, request *appenginepb.ApplyAppengineDomainMappingRequest) (*appenginepb.AppengineDomainMapping, error) { p := ProtoToDomainMapping(request.GetResource()) res, err := c.ApplyDomainMapping(ctx, p) if err != nil { return nil, er...
[ -1.711385726928711, 0.6230014562606812, 0.36594298481941223, 0.24907398223876953, -0.6404170393943787, 0.4375286400318146, 0.3181687593460083, 0.06875727325677872, 0.7298956513404846, -1.039630651473999, 0.0777113065123558, 0.4047187268733978, 0.1203545406460762, 1.1816205978393555, 0.56...
func (s *DomainMappingServer) ApplyAppengineDomainMapping(ctx context.Context, request *appenginepb.ApplyAppengineDomainMappingRequest) (*appenginepb.AppengineDomainMapping, error) { cl, err := createConfigDomainMapping(ctx, request.ServiceAccountFile) if err != nil { return nil, err } return s.applyDomainMapping...
[ -1.240602731704712, 0.2104806900024414, 0.30525609850883484, 0.14639146625995636, -0.5911870002746582, 0.7108697295188904, 0.5831200480461121, 0.4239634871482849, 0.22164806723594666, -0.8903579711914062, 0.5778005719184875, 0.7971897721290588, 0.005961047485470772, 1.0775495767593384, 0...
func (s *DomainMappingServer) DeleteAppengineDomainMapping(ctx context.Context, request *appenginepb.DeleteAppengineDomainMappingRequest) (*emptypb.Empty, error) { cl, err := createConfigDomainMapping(ctx, request.ServiceAccountFile) if err != nil { return nil, err } return &emptypb.Empty{}, cl.DeleteDomainMappi...
[ -1.03475821018219, 0.1507633924484253, 0.24662339687347412, 0.09927119314670563, -0.5086716413497925, 0.989484965801239, 0.8037600517272949, 0.01680375076830387, 0.2598009705543518, -0.8370093107223511, 0.5626221895217896, 0.6859357953071594, -0.06923803687095642, 1.2741365432739258, 0.5...
func (s *DomainMappingServer) ListAppengineDomainMapping(ctx context.Context, request *appenginepb.ListAppengineDomainMappingRequest) (*appenginepb.ListAppengineDomainMappingResponse, error) { cl, err := createConfigDomainMapping(ctx, request.ServiceAccountFile) if err != nil { return nil, err } resources, err :...
[ -1.1131365299224854, 0.21961231529712677, 0.37023669481277466, -0.05191565677523613, -0.35634398460388184, 0.29830819368362427, -0.028007028624415398, 0.010578842833638191, 0.3958107531070709, -0.28232598304748535, 0.3068997859954834, 0.8690317273139954, 0.21840393543243408, 1.341731786727...
func Print(dockerCli *command.DockerCli, ctx context.Context, tasks []swarm.Task, resolver *idresolver.IDResolver, noTrunc bool) error { sort.Stable(tasksBySlot(tasks)) writer := tabwriter.NewWriter(dockerCli.Out(), 0, 4, 2, ' ', 0) // Ignore flushing errors defer writer.Flush() fmt.Fprintln(writer, strings.Join...
[ 0.20324772596359253, 0.29856646060943604, 0.5600669980049133, 0.003698191838338971, 0.3058583736419678, 0.18929021060466766, 0.359740287065506, -0.7640302181243896, -0.9410158395767212, -0.536503255367279, 0.19185283780097961, 0.060023412108421326, 0.3355250060558319, 0.4880889654159546, ...
func PrintQuiet(dockerCli *command.DockerCli, tasks []swarm.Task) error { sort.Stable(tasksBySlot(tasks)) out := dockerCli.Out() for _, task := range tasks { fmt.Fprintln(out, task.ID) } return nil }
[ 0.8070407509803772, -0.278841495513916, 0.7484930753707886, -0.5247408151626587, 0.614930272102356, 0.03437988460063934, 0.503960371017456, -1.5500197410583496, -0.3259270489215851, -0.40334948897361755, -0.5910534262657166, 0.9525083303451538, -0.026209957897663116, 0.3822128176689148, ...
func GetEventLog(logFilePath string, logFileName string) (eventLog *EventLog) { if eventLogInst != nil { return eventLogInst } var maxRollsDay int = appconfig.DefaultAuditExpirationDay config, err := appconfig.Config(true) if err == nil { maxRollsDay = config.Agent.AuditExpirationDay } eventLogInstance := Ev...
[ 0.781744122505188, -0.34187814593315125, 0.8299190998077393, -0.09461887180805206, -0.4671597480773926, 0.05795659124851227, 0.36786454916000366, 0.274183452129364, 0.1088133156299591, 0.09494604170322418, 0.006453807931393385, 0.6676607131958008, 0.0058689299039542675, -0.3983305394649505...
func (e *EventLog) init() { e.currentFileName = "" e.fileDelimiter = "-" e.nextFileName = e.eventLogName + e.fileDelimiter + time.Now().Format(e.datePattern) if err := e.fileSystem.MkdirAll(e.eventLogPath, appconfig.ReadWriteExecuteAccess); err != nil { fmt.Println("Failed to create directory for audits", err) }...
[ 0.35440540313720703, -0.38789477944374084, 0.6224862933158875, -0.7000371813774109, 0.30162569880485535, 0.6139279007911682, 0.9151510000228882, 0.5554552674293518, -0.401011198759079, -0.5248516201972961, 0.8297401070594788, 0.2851842939853668, 0.7742462158203125, 0.7486832141876221, 0....
func (e *EventLog) GetTodayAuditFileName() string { return e.nextFileName }
[ 0.18736281991004944, -0.7819027304649353, 0.6346321105957031, -0.13676637411117554, 0.12351405620574951, 0.619774341583252, 1.006101131439209, 0.356629341840744, -0.7957485318183899, -0.4117409288883209, 1.1227476596832275, -0.07717357575893402, 0.6761884093284607, -0.014129646122455597, ...
func (e *EventLog) GetAuditFileName() string { return e.eventLogName }
[ 1.0219324827194214, -0.9453405737876892, 0.7042225003242493, 0.20648746192455292, -0.036063313484191895, 0.14045296609401703, 1.1203621625900269, 0.7754400372505188, -0.24581290781497955, 0.27774685621261597, 0.8507645130157471, 0.5015363693237305, 0.7130858302116394, 0.05418224260210991, ...
func (e *EventLog) GetAuditFilePath() string { return e.eventLogPath }
[ 1.3650197982788086, -0.7715147137641907, 0.4726496636867523, 0.03419657051563263, 0.532177746295929, 1.0420349836349487, 1.1379859447479248, 0.16670411825180054, -0.10433293879032135, 0.5275849103927612, 0.8830776810646057, 0.44625258445739746, 0.033354680985212326, 0.36199790239334106, ...
func (e *EventLog) GetFileSystem() filesystem.IFileSystem { return e.fileSystem }
[ 0.7311302423477173, -0.13435788452625275, 0.6393302083015442, -0.2407436966896057, 0.7913253307342529, -0.48516127467155457, 0.12560394406318665, -0.8754431009292603, 0.733886182308197, -1.0796048641204834, 0.3039016127586365, 0.1920018196105957, -0.19226334989070892, 0.027090895920991898,...
func (e *EventLog) loadEvent(eventType string, agentVersion string, eventContent string) { // Time appended to the message in the format HH:MM:SS if agentVersion == "" { agentVersion = version.Version } eventContent = eventType + " " + eventContent + " " + agentVersion + " " + time.Now().Format(e.timePattern) + "...
[ 0.8353532552719116, -0.6969336271286011, 0.6742368340492249, -0.9709270596504211, 0.5385710000991821, 0.3243193030357361, -1.5581446886062622, -0.00966714695096016, 0.15770047903060913, 0.5102009177207947, -0.18395580351352692, 0.8980215191841125, -0.7182055711746216, 0.8021291494369507, ...
func (e *EventLog) close() { close(e.eventChannel) }
[ 0.6761488914489746, -0.44954124093055725, 0.3430280387401581, -1.0060819387435913, -0.03189507871866226, 0.5999895334243774, -0.14052467048168182, -0.38339415192604065, -0.6347975730895996, -0.4508731961250305, 0.7115412950515747, 0.38299718499183655, -0.21136553585529327, 1.15037727355957...
func (e *EventLog) rotateEventLog() { validFileNames := e.getFilesWithMatchDatePattern() deleteFileCount := len(validFileNames) - e.noOfHistoryFiles for i := 0; i < deleteFileCount; i++ { logFilePathWithDate := filepath.Join(e.eventLogPath, validFileNames[i]) e.fileSystem.DeleteFile(logFilePathWithDate) } }
[ 0.09037086367607117, -0.4478350579738617, 0.684146523475647, 0.17290593683719635, 0.5612608790397644, -0.0160861574113369, 1.3070918321609497, 0.7164402008056641, -0.3774688243865967, 0.29176416993141174, 0.44045692682266235, -0.18019092082977295, 0.0022759248968213797, -0.0032883950043469...
func (e *EventLog) eventWriter() { go func() { defer func() { if r := recover(); r != nil { fmt.Println("Event writer panic: ", r) } }() for event := range e.eventChannel { header := SchemaVersionHeader + e.schemaVersion + "\n" if createdFlag := e.writeFile(event, header); createdFlag { e.rot...
[ 0.0431072860956192, -0.4345642924308777, 0.23511631786823273, -0.08953750133514404, 1.2705204486846924, -0.3169541656970978, 1.0134080648422241, 0.6835988759994507, -0.8413209915161133, 0.2584960162639618, 0.00013791061064694077, -0.8225241303443909, 0.31234118342399597, 0.4748747646808624...
func (e *EventLog) getFilesWithMatchDatePattern() []string { var validFileNames []string if allFiles, err := e.fileSystem.ReadDir(e.eventLogPath); err == nil { for _, fileInfo := range allFiles { fileName := fileInfo.Name() if !fileInfo.Mode().IsDir() && e.isValidFileName(fileName) { validFileNames = appe...
[ 0.5151091814041138, -0.9665578007698059, 1.2127742767333984, 0.4866586923599243, -0.5247618556022644, 0.7462971806526184, 0.07699702680110931, 0.3237927258014679, 0.27247604727745056, -0.016519179567694664, -0.005296720657497644, -0.14320321381092072, -0.06937482953071594, 0.46643114089965...
func (e *EventLog) isValidFileName(fileName string) bool { logFileWithDelim := e.eventLogName + e.fileDelimiter if !strings.HasPrefix(fileName, logFileWithDelim) { return false } datePart := fileName[len(logFileWithDelim):] _, err := time.ParseInLocation(e.datePattern, datePart, time.Local) if err != nil { re...
[ -0.047254208475351334, -0.6473907232284546, 0.8233706951141357, 0.3007526397705078, -0.34282028675079346, 0.3220745921134949, -0.10471799969673157, 1.037320613861084, 0.24423909187316895, -0.051240891218185425, 0.22948114573955536, 0.0008327204850502312, 0.17008699476718903, 0.442095607519...
func (e *EventLog) writeFile(content string, header string) (createdFlag bool) { logFilePathWithDate := filepath.Join(e.eventLogPath, e.nextFileName) if !e.currentDateFileExists() { createdFlag = true content = header + content } if err := e.fileSystem.AppendToFile(logFilePathWithDate, content, appconfig.ReadWr...
[ 0.5077071785926819, -0.3232988715171814, 0.8091323375701904, -0.14111222326755524, 0.7088614702224731, 0.9510547518730164, 0.012014045380055904, 0.5683684945106506, -1.2264695167541504, -0.09883144497871399, 0.20571143925189972, -0.7491040825843811, -0.5376626253128052, 0.6544256210327148,...
func (e *EventLog) currentDateFileExists() bool { if e.currentFileName == "" { if _, err := e.fileSystem.Stat(filepath.Join(e.eventLogPath, e.nextFileName)); e.fileSystem.IsNotExist(err) { return false } return true } return e.currentFileName == e.nextFileName }
[ 0.025165535509586334, -1.1915210485458374, 0.9835276007652283, -0.1610628366470337, 0.27338463068008423, 1.502439022064209, 0.029448939487338066, 0.32525768876075745, -0.9430719614028931, 0.24562615156173706, 0.14632822573184967, -0.3307093679904938, -0.35300785303115845, 0.253750085830688...
func createUpdateEventCounter(eventCounterObj *EventCounter, eventLine string, byteMarker int) (*EventCounter, bool) { var eventChunkType string eventLine = singleSpacePattern.ReplaceAllString(strings.TrimSpace(eventLine), " ") eventSplitVal := strings.Split(eventLine, " ") // For Invalid Data (skips lines with le...
[ 0.5321016311645508, -1.310615062713623, 0.7604529857635498, -0.4969228208065033, -0.5266485810279846, -0.3315323293209076, 0.14936840534210205, 0.05241773650050163, 0.22133219242095947, -0.4242120087146759, -0.04688326269388199, -0.5519937872886658, -0.4766462445259094, 0.05702564865350723...
func WriteLastLineFile(eventCounter *EventCounter) error { if eventLogInst == nil { return nil } // generates byte marker with padding zeros byteMarker := fmt.Sprintf("%0"+strconv.Itoa(BytePatternLen)+"d", eventCounter.LastReadByte) logfilePath := filepath.Join(eventLogInst.eventLogPath, eventCounter.AuditFileN...
[ 0.7548237442970276, -0.8069822788238525, 1.3093042373657227, -1.0929760932922363, 1.0274503231048584, 0.5220638513565063, 1.004907250404358, 0.2086254209280014, 0.058399900794029236, -0.37989386916160583, 0.43866804242134094, -0.19065243005752563, -0.17350663244724274, 0.5669938325881958, ...
func GetEventCounter() ([]*EventCounter, error) { eventCounters := make([]*EventCounter, 0) if eventLogInst == nil { return eventCounters, nil } nextFileName := eventLogInst.eventLogName + eventLogInst.fileDelimiter + time.Now().Format(eventLogInst.datePattern) validFileNames := eventLogInst.getFilesWithMatchDat...
[ 0.2203531265258789, -0.8854012489318848, 0.8734198808670044, -0.07386083155870438, 0.2518543004989624, -0.3086259067058563, 0.8847174048423767, 0.2640771269798279, -0.07275328040122986, -0.19719509780406952, 0.22112418711185455, 0.10768275707960129, 0.04433609917759895, 0.9739896655082703,...
func countEvent(fileName string, byteMarker int, isAuditFileProcessed bool) ([]*EventCounter, error) { // reads header eventCounterObj, offset, err := readEventLogHeaders(fileName) if err != nil { return nil, err } eventCounterObj.IsFirstChunk = !isAuditFileProcessed // denotes that the file is untouched. Not ev...
[ 1.0369454622268677, -0.5229610800743103, 0.5463703274726868, -0.11213818192481995, 0.1324976682662964, 0.4065593183040619, 0.830104649066925, 0.7447724938392639, -0.7098157405853271, -0.07245432585477829, 0.03756535425782204, 0.10150566697120667, 0.29588204622268677, 1.0094414949417114, ...
func readEventLogBodyFooter(fileName string, eventCounterObj *EventCounter, offset int) ([]*EventCounter, error) { eventCounter := make([]*EventCounter, 0) file, err := os.Open(fileName) if err != nil { return nil, err } defer file.Close() // seek offset bytes from beginning of file file.Seek(int64(offset), 0...
[ 0.3859838843345642, -0.8654753565788269, 1.0321869850158691, -0.2802145779132843, -0.35526299476623535, 0.3019093871116638, 0.4952123463153839, -0.029633622616529465, -0.41856279969215393, -0.20020350813865662, -0.3269316256046295, -0.1481827199459076, -0.2520529329776764, 1.15835237503051...
func readEventLogHeaders(fileName string) (*EventCounter, int, error) { noOfBytesRead := 0 file, err := os.Open(fileName) if err != nil { return nil, noOfBytesRead, err } defer file.Close() eventCounterObj := &EventCounter{ CountMap: make(map[string]int), AuditFileName: filepath.Base(fileName), Agen...
[ 0.18068937957286835, -0.9876646399497986, 0.9494248628616333, -0.5123429894447327, -0.8171195387840271, -0.23625269532203674, 0.37862876057624817, 0.3260071873664856, -0.2652517259120941, -0.2229834794998169, 0.1886744201183319, -0.10951483249664307, -0.08461176604032516, -0.09682806581258...
func splitAuditLine(byteLen *int) bufio.SplitFunc { return func(data []byte, atEOF bool) (advance int, token []byte, err error) { advance, token, err = bufio.ScanLines(data, atEOF) *byteLen += advance return advance, token, err } }
[ 0.3285241723060608, -0.36970335245132446, 0.4240929186344147, -0.4116126596927643, -0.40965935587882996, -0.3117479085922241, 0.3589765727519989, -0.10483790189027786, 0.4783577024936676, -0.15279273688793182, -0.8635002374649048, 0.2687130868434906, 0.05264188349246979, 0.2545284330844879...
func getValidAuditFileHeaderFooterVal(event string, headerFooterTag string) string { val := getEventHeaderVal(event, headerFooterTag) switch { case strings.HasPrefix(event, SchemaVersionHeader): if val == "" { val = eventLogInst.schemaVersion // Current schema version } } return val }
[ 0.05858471617102623, -0.9337774515151978, 0.5620645880699158, 0.5363566875457764, -0.7700726985931396, 0.2237653285264969, 0.1489565223455429, -0.3242481052875519, -0.10339322686195374, -0.761929452419281, 0.4772716164588928, 0.045100416988134384, -0.0844631940126419, 0.6297951936721802, ...
func getEventHeaderVal(event string, headerFooterTag string) string { if strings.HasPrefix(event, headerFooterTag) { headerSplitVal := strings.Split(event, headerFooterTag) if len(headerSplitVal) > 1 { return headerSplitVal[1] } } return "" }
[ 0.22051528096199036, -0.5099479556083679, 0.7201576232910156, 0.13578742742538452, -0.392069935798645, -0.3872765600681305, -0.01615135185420513, -0.38542625308036804, -0.4872303605079651, -0.2852437496185303, 0.41404303908348083, -0.041153255850076675, -0.025817425921559334, 0.66967368125...
func isAuditSentToMGS(auditFileName string) (bool, int, error) { byteMarker := 0 stat, err := os.Stat(auditFileName) if err != nil { return false, byteMarker, err } file, err := os.Open(auditFileName) if err != nil { return false, byteMarker, err } defer file.Close() buf := make([]byte, len(AuditSentSucces...
[ -0.15456703305244446, -0.6818145513534546, 0.8572307825088501, -0.6109891533851624, -0.4521928131580353, -0.5463588237762451, 0.8257209062576294, 0.4135132133960724, 0.199275940656662, 0.5284280180931091, -0.20939788222312927, 0.27077779173851013, -0.3573691248893738, 1.1692662239074707, ...
func ValidateSKU(sku string) bool { var res bool _, res = currentInventory[sku] // return return res }
[ -1.2337923049926758, -0.9283083081245422, 0.42938533425331116, 1.673915982246399, -0.9269871115684509, -0.2117871195077896, 0.5240573287010193, 0.16993695497512817, -0.17257052659988403, -0.6236066818237305, -0.09555736184120178, -0.1406087577342987, -0.6979448795318604, 0.3321181833744049...
func GetCartPrice(cart map[string]int) (totalCartValue, discount, finalCartValue float64, offersApplied []string) { // calculate discount for item, quantity := range cart { for _, v := range currentOffers { if v.sku == item && quantity >= v.quantity { discount += float64(quantity/v.quantity) * v.discount ...
[ -0.5401466488838196, -0.9989238381385803, 0.8520057797431946, -0.37162649631500244, -0.7629791498184204, -0.5717050433158875, -0.41067755222320557, -0.16267625987529755, -0.6466689109802246, 0.4367615282535553, 0.14312860369682312, -0.19900357723236084, -0.11703679710626602, -0.09167461097...
func getDNSConf() []string { servers := []string{} _, err := os.Stat("/etc/resolv.conf") if err != nil { log.Fatal(err) } j, _ := dns.ClientConfigFromFile("/etc/resolv.conf") servers = append(servers, fmt.Sprintf("%s:53", j.Servers[0])) if len(servers) < 2 { servers = append(servers, fmt.Sprintf("%s:53", j....
[ -0.5643122792243958, 0.057268399745225906, 0.5050340294837952, -0.03885661065578461, 0.22433216869831085, -0.3771956264972687, -0.08887452632188797, -0.16317801177501678, -0.2031145840883255, 0.36669740080833435, -1.8854509592056274, 0.5156069397926331, 0.3415989875793457, 0.42455071210861...
func cleanNS(l []*net.NS) []string { var r []string for _, i := range l { r = append(r, i.Host) } sort.Strings(r) return (r) }
[ -0.5045502781867981, 0.043625593185424805, 0.5559237003326416, -0.04391900822520256, -0.6121266484260559, 0.3927423655986786, -0.43953612446784973, -1.0355888605117798, 0.6316074728965759, 0.34123900532722473, 0.15909883379936218, 0.8337689638137817, 0.08823919296264648, 0.6187248229980469...
func cleanIPV6(l []string) []string { var r []string for _, i := range l { matched, _ := regexp.MatchString(`\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}`, i) if matched { r = append(r, i) } } sort.Strings(r) return (r) }
[ -1.5092047452926636, -0.9369664192199707, 0.7247239947319031, 0.10774140059947968, -0.9285832047462463, -0.14503073692321777, 0.028200926259160042, -0.2977691888809204, 0.47648078203201294, 1.3693426847457886, -0.5660181045532227, -0.6431344151496887, -0.29051873087882996, -0.5995413064956...
func (p *PeerProducer) drainresults(d *dht.DHT) { fmt.Println("=========================== DHT") fmt.Printf("Note that there are many bad nodes that reply to anything you ask.") fmt.Printf("Peers found:") for r := range d.PeersRequestResults { for _, peers := range r { for _, x := range peers { addr := dht...
[ -1.3404611349105835, 0.3936462104320526, 0.5018633604049683, -1.5759024620056152, 1.0824202299118042, 0.16675008833408356, 0.3770047128200531, -0.5959349870681763, -0.2003919631242752, -0.5897550582885742, 0.3070661127567291, 0.4193297028541565, -1.0019078254699707, 0.36795103549957275, ...
func NewKey(b []byte) Key { k := newKey(b) // if bytes.HasPrefix(k.object[:], specialPrefix) && // k != Empty { // return Invalid // } return k }
[ 0.27128085494041443, -0.1848480999469757, 0.5342221856117249, 1.1046286821365356, -0.5883991122245789, -0.019203057512640953, -0.039447858929634094, 0.32827889919281006, 1.0736030340194702, 0.7868609428405762, -0.20807500183582306, -0.027327675372362137, -1.00869619846344, -0.2070340365171...
func (k Key) String() string { return hex.EncodeToString(k.object[:]) }
[ -0.07969039678573608, -0.8767476677894592, 0.07400871068239212, -0.21621529757976532, 0.03371119871735573, 1.1100443601608276, -0.660215437412262, -0.3180835247039795, -0.4669218957424164, 0.896358072757721, -0.4129183292388916, 0.0986110121011734, -0.11296804994344711, 0.13652268052101135...
func (o *GetObmsLibraryIdentifierReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewGetObmsLibraryIdentifierOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } ...
[ 0.002693098969757557, -1.7231501340866089, 0.8801066875457764, -0.32212403416633606, 0.329846054315567, -0.15637755393981934, 0.16918811202049255, -0.3824993371963501, 1.0635600090026855, 0.4571138322353363, 0.44169968366622925, -0.37374570965766907, -1.049877643585205, -0.4440933167934418...
func NewGetObmsLibraryIdentifierOK() *GetObmsLibraryIdentifierOK { return &GetObmsLibraryIdentifierOK{} }
[ 0.3327547311782837, -1.6710649728775024, 0.505120575428009, 0.23283854126930237, 0.21376819908618927, 1.2081810235977173, 0.49401840567588806, 0.37495845556259155, 0.3272952735424042, 0.47512030601501465, -0.02575766108930111, -0.2089821696281433, -0.04783651977777481, -0.2255273312330246,...
func NewGetObmsLibraryIdentifierNotFound() *GetObmsLibraryIdentifierNotFound { return &GetObmsLibraryIdentifierNotFound{} }
[ 0.03602958098053932, -2.205336809158325, 0.3237743079662323, -0.6348500847816467, 0.5247284173965454, 1.4076772928237915, 0.12610039114952087, -0.3842507302761078, 0.4891221523284912, -0.42319729924201965, 0.17355918884277344, 0.5794642567634583, -0.5852952003479004, -0.24718555808067322, ...
func NewGetObmsLibraryIdentifierDefault(code int) *GetObmsLibraryIdentifierDefault { return &GetObmsLibraryIdentifierDefault{ _statusCode: code, } }
[ 0.27930864691734314, -1.1759036779403687, 0.3631092309951782, -0.11743809282779694, 1.111081838607788, 1.0531607866287231, -0.09091918915510178, 0.1705998033285141, 0.750575065612793, 0.08074063062667847, -0.2983446419239044, -0.10010485351085663, -0.9961187243461609, -0.6434286832809448, ...
func (o *GetObmsLibraryIdentifierDefault) Code() int { return o._statusCode }
[ 0.013243590481579304, -0.588649332523346, 0.16589196026325226, 0.2758699655532837, 1.1073095798492432, 0.9283601641654968, -0.0037570081185549498, 0.3772355616092682, 0.5595361590385437, 0.20714746415615082, 0.12388288229703903, -0.057149361819028854, -0.8246204257011414, 0.293809503316879...
func FromFileInfo(dir string, i os.FileInfo) filesystem.File { path := utils.LinuxPath(fmt.Sprintf("%s/%s", dir, i.Name())) file := filesystem.File{ FileName: i.Name(), FilePath: path, FileMode: i.Mode(), FileSize: i.Size(), FileModTime: i.ModTime(), } return file }
[ 0.9913724064826965, -0.9255866408348083, 0.33685269951820374, -0.4739842712879181, -0.6197900176048279, 0.17316703498363495, -0.5248309969902039, -0.14497804641723633, -0.5303688645362854, -0.7121317386627197, -0.0040776729583740234, -0.3819195628166199, 0.509827733039856, -0.0902388244867...
func (fs StdFileSystem) readDir(curFile filesystem.File, parent *filesystem.FileTree) *filesystem.FileTree { tree := &filesystem.FileTree{} tree.StdFile = curFile tree.StdParentNode = parent // TODO: Symlink check not working... if curFile.IsDir() || curFile.Mode() == os.ModeSymlink { tree.StdChildNodes = make...
[ 0.05141514912247658, -0.29916873574256897, 0.6502659916877747, 0.3613852560520172, -0.875213086605072, 0.30744796991348267, 0.8385608792304993, 0.6294972896575928, -0.10631559789180756, -0.9965424537658691, 1.0038583278656006, 0.5441704392433167, 0.06319339573383331, 1.8380812406539917, ...
func (m *Mesh) getRadioConfig() error { rand.Seed(time.Now().UnixNano()) rn := rand.Uint32() msg := &message.ToRadio{ Variant: &message.ToRadio_WantConfigId{ WantConfigId: rn, }, } log.WithField("config_id", rn).Debug("sending WantConfig to radio") return m.sendToRadio(msg) }
[ -0.2990058958530426, 0.5837257504463196, 0.6585546731948853, -0.36528268456459045, 0.1237931102514267, -0.006157356780022383, -0.04525572806596756, -0.9840109944343567, -0.3437412977218628, -0.009557309560477734, -0.8769101500511169, 1.3898905515670776, -0.8999547958374023, 1.0310975313186...
func (m *Mesh) sendToRadio(msg *message.ToRadio) error { data, err := proto.Marshal(msg) if err != nil { log.WithError(err).Error("failure marshalling ToRadio proto") return errors.New("could not get radio config") } err = m.transport.SendToRadio(data) if err != nil { return err } return nil }
[ 0.24434763193130493, 0.512169361114502, 0.5976518988609314, -0.21230453252792358, 0.12141168862581253, 0.1898520141839981, 0.23240512609481812, -1.015346884727478, -0.6875312328338623, 0.40292394161224365, -0.6423694491386414, 0.6779154539108276, -0.5116881132125854, 0.3764594793319702, ...
func (m *Mesh) Subscribe(tp Topic, fn func(interface{})) { switch tp { case TOPIC_NODE: m.topic[tp] = append(m.topic[tp], fn) case TOPIC_DATA: default: log.WithField("topic", tp).Error("invalid topic") } }
[ 0.536234438419342, 0.3753126859664917, 0.3459470868110657, 0.3000011146068573, 0.5526742339134216, 0.5152126550674438, -0.6057944297790527, 0.04602067172527313, -0.607024610042572, -0.23213869333267212, -0.21557752788066864, 0.16952891647815704, 0.15696270763874054, -0.13405181467533112, ...
func TableVersionCompatible(required, actual TableVersion) string { switch { case required.major != actual.major: return "rebuild" case required.minor != actual.minor: return "upgrade" case required.patch != actual.patch: return "reindex" default: return "ok" } }
[ -0.6402841210365295, -1.4543569087982178, 0.5477814674377441, 0.3509925901889801, -0.7161937952041626, 0.8658091425895691, -0.5586867928504944, 0.08622410148382187, -0.19131995737552643, 1.6880004405975342, 0.23328500986099243, -0.04307412728667259, 0.1726537048816681, -0.27771592140197754...
func NewTableVersion(major, minor, patch uint32) TableVersion { return TableVersion{major, minor, patch} }
[ 0.3143257796764374, 0.005451650358736515, 0.4212610423564911, 0.5878360271453857, -1.3375691175460815, 0.08438536524772644, 0.011416961438953876, -0.5200966000556946, -0.2788083255290985, -0.437911719083786, -0.7585691809654236, -0.1916167289018631, -0.12085266411304474, -0.081446595489978...
func CreateTable(db *sql.DB, tableName string) error { var err error createCommand, tableNameFound := createTableStatements[tableName] if !tableNameFound { return fmt.Errorf("table name %s unknown", tableName) } tableVersion, ok := requiredVersions[tableName] if !ok { return fmt.Errorf("no version assigned to...
[ -0.043638188391923904, -0.14219160377979279, 0.9314011931419373, 0.26262032985687256, 0.689329206943512, 0.4374200701713562, 0.4801364541053772, -0.09730421006679535, -0.17987285554409027, 0.8664582967758179, 0.3453523814678192, -0.49484920501708984, -0.39696070551872253, 0.277538776397705...