text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (o *GetIPAMCustomerIDParams) SetCustomerID(customerID int64) { o.CustomerID = customerID }
[ -0.44764789938926697, -0.9530694484710693, 0.28756850957870483, 0.5340300798416138, -0.3260021209716797, 0.1921878457069397, 0.44968438148498535, 0.6437918543815613, -0.43337392807006836, 0.691746175289154, 0.5523818135261536, 0.4813903272151947, -1.4458372592926025, 0.6777431964874268, ...
func (o *GetIPAMCustomerIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error // path param customer_id if err := r.SetPathParam("customer_id", swag.FormatInt64(o.CustomerID)); err != nil { return err } i...
[ -0.8399456739425659, -0.3530275225639343, 0.7188614010810852, -0.09937594085931778, 0.8294654488563538, -0.42099711298942566, 0.9549100995063782, 0.4551885426044464, -0.7495386004447937, 0.4339715242385864, 0.6546480655670166, 0.277553915977478, -0.8859614133834839, -0.3545561134815216, ...
func NewMockHub(ctrl *gomock.Controller) *MockHub { mock := &MockHub{ctrl: ctrl} mock.recorder = &MockHubMockRecorder{mock} return mock }
[ 0.12147783488035202, 0.08200234919786453, 0.3285612165927887, 1.476558804512024, 0.85699462890625, 0.2402249425649643, 0.49874448776245117, -0.29081884026527405, 0.3060021698474884, -0.1468719094991684, -0.4810336232185364, -0.01955028623342514, -0.3772672414779663, 1.3790792226791382, 0...
func (m *MockHub) EXPECT() *MockHubMockRecorder { return m.recorder }
[ 0.32022881507873535, 0.34053826332092285, 0.3513888120651245, 0.6171199083328247, 0.43119338154792786, 0.1907968968153, 0.036783020943403244, 0.318128377199173, 0.30571886897087097, -0.40958553552627563, 0.534347653388977, 0.5672915577888489, -1.5563156604766846, 0.9396265745162964, 0.29...
func (m *MockHub) RegisteredClients() map[*model.Client]bool { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "RegisteredClients") ret0, _ := ret[0].(map[*model.Client]bool) return ret0 }
[ -1.0086559057235718, -0.19473589956760406, -0.01781044341623783, -0.05703716352581978, 1.1670266389846802, 0.15705223381519318, 1.0348615646362305, -0.21201127767562866, -0.8079283237457275, -0.8106780052185059, -0.4430747628211975, 0.43260428309440613, -1.1351516246795654, 1.2102222442626...
func (mr *MockHubMockRecorder) RegisteredClients() *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisteredClients", reflect.TypeOf((*MockHub)(nil).RegisteredClients)) }
[ -0.5365540981292725, 0.48486676812171936, -0.21241514384746552, 0.1377772092819214, 0.4007374346256256, -0.34468576312065125, 0.11402448266744614, -0.8750903010368347, 0.9169064164161682, -0.06035535782575607, 0.4632703363895416, 1.0450588464736938, -1.1004486083984375, 1.6028120517730713,...
func (m *MockHub) BroadcastToAllClients(handler model.EventMetadata) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "BroadcastToAllClients", handler) ret0, _ := ret[0].(error) return ret0 }
[ -0.3574155271053314, -0.2560366690158844, 0.29470646381378174, -0.01754169352352619, 0.3218955993652344, 0.3695412576198578, 0.6154674887657166, 0.27739644050598145, -0.29914918541908264, -0.6996382474899292, 0.22228436172008514, 0.424396276473999, -1.0699928998947144, 1.598828673362732, ...
func (mr *MockHubMockRecorder) BroadcastToAllClients(handler interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BroadcastToAllClients", reflect.TypeOf((*MockHub)(nil).BroadcastToAllClients), handler) }
[ -0.07843746989965439, 0.3191566467285156, 0.23400913178920746, -0.06692639738321304, -0.4064699113368988, 0.14024940133094788, -0.5770487785339355, 0.05583363026380539, 0.5636730790138245, 0.0010121400700882077, 0.7769799828529358, 1.3096215724945068, -0.7917400002479553, 1.635250329971313...
func add_grocery(a ...string) { for _, d := range a { g_groceries = append(g_groceries, d) } }
[ -0.26741930842399597, 0.9781500697135925, 0.5244400501251221, 0.4504063129425049, 0.8045028448104858, 0.7249181866645813, -1.010197639465332, -0.23912838101387024, -0.5895628929138184, -0.14545974135398865, 0.7181864380836487, 0.6636187434196472, 0.5173927545547485, 1.304660439491272, 0....
func (k *Kairos) ListGalleries() (*ResponseListGalleries, error) { req, reqErr := k.newRequest("POST", "gallery/list_all", nil) if reqErr != nil { return nil, reqErr } resp, doErr := k.do(req) if doErr != nil { return nil, doErr } re := &ResponseListGalleries{} uErr := json.Unmarshal(resp, &re) if uErr !...
[ -0.9069010615348816, 0.08270750939846039, 0.6219693422317505, 0.34632712602615356, 0.12049531191587448, -0.7806534767150879, -0.10547276586294174, -0.9466484189033508, 0.7700287699699402, -0.24092555046081543, -0.5871023535728455, 0.7276496291160583, -0.9658191800117493, 1.062992811203003,...
func (d *Domain) Name() string { return C.GoString(C.xenstat_domain_name(d.d)) }
[ -0.5078831315040588, 0.49226924777030945, 0.2408318966627121, -0.18050602078437805, -0.6441850662231445, -0.32366108894348145, -0.3640226721763611, -1.0218383073806763, -0.19178418815135956, 0.4962453544139862, 0.01958666555583477, 0.7571865916252136, 0.5724453330039978, -0.367015391588211...
func (d *Domain) CPUNs() uint64 { return uint64(C.xenstat_domain_cpu_ns(d.d)) }
[ -0.5437953472137451, 1.5430880784988403, 0.16073952615261078, 0.011245138943195343, -0.1896839439868927, -0.6115222573280334, 0.028648490086197853, -0.8043441772460938, 0.30336707830429077, -0.6439890265464783, -0.0694844126701355, 1.518900990486145, 0.28933972120285034, 0.0211635194718837...
func (d *Domain) NumVCPUs() uint { return uint(C.xenstat_domain_num_vcpus(d.d)) }
[ 0.05663347989320755, 1.2560135126113892, 0.39050182700157166, 0.3932701349258423, -0.5541204810142517, -0.9708766937255859, -0.004273018334060907, -0.40975093841552734, 0.8177979588508606, 0.07729827612638474, -0.07203894108533859, -0.015025125816464424, 0.12688538432121277, 0.004157650750...
func (d *Domain) VCPU(idx uint) *VCPU { if v := C.xenstat_domain_vcpu(d.d, C.uint(idx)); v != nil { return &VCPU{ Idx: idx, v: v, } } return nil }
[ -0.30624446272850037, 0.720355749130249, 0.26519787311553955, -0.34577855467796326, 0.034421488642692566, -0.5202913284301758, -0.41847220063209534, -0.8832703828811646, 1.2751009464263916, -0.07776275277137756, 0.6662260890007019, 0.7333095669746399, -0.5009534358978271, -1.57855105400085...
func (d *Domain) CurMem() uint64 { return uint64(C.xenstat_domain_cur_mem(d.d)) }
[ -0.2561834156513214, -0.1807323545217514, 0.3204611539840698, 0.20408284664154053, -0.4291435182094574, -0.3131504952907562, 0.45845741033554077, -0.42188772559165955, -0.16440878808498383, -0.49456435441970825, 1.0106655359268188, 0.606847882270813, 0.0048502362333238125, -0.1512638777494...
func (d *Domain) MaxMem() uint64 { return uint64(C.xenstat_domain_max_mem(d.d)) }
[ 0.29157501459121704, 1.02678382396698, 0.1999249905347824, 0.900299072265625, 0.030386298894882202, -0.18007169663906097, -0.07448527961969376, -0.4238385856151581, 0.630010724067688, -0.8244419097900391, 0.52411288022995, 0.4234940707683563, 0.04744937643408775, 0.20205946266651154, 0.0...
func (d *Domain) SSID() uint { return uint(C.xenstat_domain_ssid(d.d)) }
[ 0.4344925880432129, 0.47867873311042786, 0.2862023711204529, 0.060483358800411224, -0.3220031261444092, 0.15285032987594604, 0.22496962547302246, 0.14713136851787567, 0.8962245583534241, -0.9332701563835144, 0.6120439171791077, 1.1209362745285034, -0.13666220009326935, 0.23784518241882324,...
func (d *Domain) NumNetworks() uint { return uint(C.xenstat_domain_num_networks(d.d)) }
[ -0.05224059894680977, 1.258522629737854, 0.15871386229991913, 0.11467361450195312, -0.3132786452770233, -0.2040928453207016, 0.4968208968639374, -0.7223286628723145, 0.9617241024971008, -0.9803633093833923, -0.7889310717582703, -0.5353263020515442, 0.8327654600143433, 0.008262790739536285,...
func (d *Domain) Network(idx uint) *Network { if n := C.xenstat_domain_network(d.d, C.uint(idx)); n != nil { return &Network{ Idx: idx, n: n, } } return nil }
[ -1.5937912464141846, 0.26331469416618347, 0.12935012578964233, 0.35154131054878235, 0.5859694480895996, -0.7819615006446838, -0.3515585958957672, -1.1215574741363525, 0.9140396118164062, -1.385128140449524, -0.23129507899284363, 0.0676107108592987, 0.5147662162780762, -0.8160129189491272, ...
func (d *Domain) NumVBDs() uint { return uint(C.xenstat_domain_num_vbds(d.d)) }
[ 0.02033264748752117, 0.9409923553466797, 0.3850855231285095, 0.8144401907920837, -0.278584361076355, -0.39654749631881714, -0.2929840683937073, -0.42200449109077454, 0.7747617363929749, -0.15462550520896912, -0.1665150225162506, 1.1214261054992676, -0.4119517505168915, 0.5718220472335815, ...
func (d *Domain) VBD(idx uint) *VBD { if v := C.xenstat_domain_vbd(d.d, C.uint(idx)); v != nil { return &VBD{ Idx: idx, v: v, } } return nil }
[ 0.5941035151481628, 0.1367519050836563, 0.3184237778186798, 0.016571516171097755, -0.1880369782447815, 0.31437525153160095, -0.9025511145591736, -1.3207966089248657, 0.8961819410324097, 0.11585324257612228, 0.8888638615608215, 1.3596562147140503, -0.7050864696502686, -0.30309581756591797, ...
func (msg *MsgBlockTxns) BchDecode(r io.Reader, pver uint32, enc MessageEncoding) error { if pver < BIP0152Version { str := fmt.Sprintf("blocktxn message invalid for protocol "+ "version %d", pver) return messageError("MsgBlockTxns.BchDecode", str) } if err := readElement(r, &msg.BlockHash); err != nil { r...
[ 0.6671825647354126, 0.071141317486763, 0.7119190096855164, 0.19432494044303894, 0.17089077830314636, -0.2700086832046509, -0.00907546654343605, 0.031998857855796814, -0.7049223184585571, 0.32287755608558655, 0.1337030678987503, 0.43887248635292053, -0.8074061870574951, 0.20516344904899597,...
func (msg *MsgBlockTxns) BchEncode(w io.Writer, pver uint32, enc MessageEncoding) error { if pver < BIP0152Version { str := fmt.Sprintf("blocktxn message invalid for protocol "+ "version %d", pver) return messageError("MsgBlockTxns.BchDecode", str) } if err := writeElement(w, &msg.BlockHash); err != nil { ...
[ 0.3830391466617584, 0.36168867349624634, 0.6287017464637756, 0.4554871916770935, 0.38687968254089355, -0.22090356051921844, 0.7790518999099731, 0.559466540813446, -0.7211993336677551, 0.7865117788314819, -0.3198128938674927, 0.35615161061286926, -0.36094096302986145, 0.4791974127292633, ...
func (msg *MsgBlockTxns) Command() string { return CmdBlockTxns }
[ 0.16424939036369324, 0.19266517460346222, 0.30200427770614624, -0.0840923935174942, 0.7743483781814575, 0.7398014068603516, -0.4614962935447693, -0.5150957107543945, 0.6587206125259399, 0.18629537522792816, -0.07629286497831345, 0.6568870544433594, -0.20710791647434235, 0.13163742423057556...
func (msg *MsgBlockTxns) MaxPayloadLength(pver uint32) uint32 { // In practice this will always be less than the payload but the number // of txs in a block can vary so we really don't know the real max. return maxMessagePayload() }
[ 1.072122573852539, 0.5555304884910583, 0.5665174722671509, -0.4417186677455902, -0.5575672388076782, 0.4308343827724457, -0.8657357096672058, -0.9351192712783813, 1.0689376592636108, 0.14869701862335205, 0.06868095695972443, -0.7063475251197815, -0.582212507724762, 0.09692196547985077, -...
func (msg *MsgBlockTxns) AbsoluteIndexes(requestedDiffIndexes []uint32) (map[uint32]*MsgTx, error) { if len(requestedDiffIndexes) != len(msg.Txs) { return nil, errors.New("requestedDiffIndexes length does not match length of txs in blocktxn message") } m := make(map[uint32]*MsgTx) lastIndex := uint32(0) for i, t...
[ -0.691661536693573, -0.895620584487915, 0.9183040857315063, 0.03481568768620491, 0.29933997988700867, 0.01575903408229351, 0.2282491773366928, -0.5228285193443298, -0.159434974193573, -0.005068915896117687, -0.01844084821641445, 0.23197829723358154, -0.25121811032295227, 0.1559224277734756...
func NewMsgBlockTxns(blockHash chainhash.Hash, txs []*MsgTx) *MsgBlockTxns { return &MsgBlockTxns{BlockHash: blockHash, Txs: txs} }
[ 0.5936427712440491, 0.20666120946407318, 0.3270825147628784, 0.2663920521736145, 0.49781376123428345, -0.7498598098754883, -0.8795028924942017, -0.4971259832382202, -0.17173165082931519, 0.114084891974926, -0.41961050033569336, 0.7096459865570068, 0.0701533854007721, 0.5117260217666626, ...
func (cmd *varsCmd) Run(f factory.Factory, cobraCmd *cobra.Command, args []string) error { // Set config root logger := f.GetLog() configLoader := f.NewConfigLoader(nil, logger) configExists, err := configLoader.SetDevSpaceRoot() if err != nil { return err } if !configExists { return errors.New(message.Confi...
[ -0.3590514659881592, -0.49019187688827515, 1.016221523284912, 0.027229342609643936, 0.5033434629440308, -0.1795377880334854, -0.16225776076316833, 0.5238897800445557, -0.6070039868354797, 0.3109889328479767, -0.7697510719299316, 0.3431966304779053, -0.35531848669052124, 0.7036919593811035,...
func SaveVarsInSecret(client kubectl.Client, vars map[string]string, secretName string) error { if vars == nil { vars = map[string]string{} } // marshal vars bytes, err := json.Marshal(vars) if err != nil { return err } secret, err := client.KubeClient().CoreV1().Secrets(client.Namespace()).Get(context.TOD...
[ -0.3174225986003876, -0.550553560256958, 0.5869142413139343, -0.5836763978004456, -0.16323356330394745, 0.14896103739738464, -1.044251561164856, -0.4879211187362671, -0.2222491353750229, 0.8009085059165955, -1.904356837272644, 0.5500714182853699, -0.6560502648353577, 0.2731361985206604, ...
func LookupService(ctx *pulumi.Context, args *LookupServiceArgs, opts ...pulumi.InvokeOption) (*LookupServiceResult, error) { var rv LookupServiceResult err := ctx.Invoke("google-native:monitoring/v3:getService", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil }
[ -0.4225155711174011, 0.23955993354320526, 0.6196650266647339, 0.12769651412963867, 0.6559231877326965, 0.37031927704811096, -0.09358920902013779, -1.0087398290634155, 0.5601083040237427, -0.24978339672088623, 0.6862850189208984, 0.7740578055381775, -0.9002466201782227, -0.47597840428352356...
func (o LookupServiceResultOutput) AppEngine() AppEngineResponseOutput { return o.ApplyT(func(v LookupServiceResult) AppEngineResponse { return v.AppEngine }).(AppEngineResponseOutput) }
[ -0.03901593014597893, -0.25690314173698425, 0.45802608132362366, -0.10206880420446396, -0.34457969665527344, -0.028663568198680878, -0.22825896739959717, -0.059278372675180435, 0.7672866582870483, -1.0851794481277466, 0.4164276719093323, -0.6936975121498108, 0.5740954279899597, -0.08924133...
func (o LookupServiceResultOutput) CloudEndpoints() CloudEndpointsResponseOutput { return o.ApplyT(func(v LookupServiceResult) CloudEndpointsResponse { return v.CloudEndpoints }).(CloudEndpointsResponseOutput) }
[ -0.23310942947864532, 0.11237885057926178, 0.5846908688545227, -0.0371164008975029, 0.3418494164943695, 0.49699288606643677, 0.13204647600650787, 0.20512306690216064, 0.8107478022575378, 0.03930653631687164, -0.4875030815601349, -0.1231817677617073, 0.07746555656194687, -0.8814949989318848...
func (o LookupServiceResultOutput) ClusterIstio() ClusterIstioResponseOutput { return o.ApplyT(func(v LookupServiceResult) ClusterIstioResponse { return v.ClusterIstio }).(ClusterIstioResponseOutput) }
[ -0.04152914509177208, -0.14906081557273865, 0.4966009259223938, 0.056827113032341, -0.019296232610940933, 0.13619281351566315, 0.47175249457359314, 0.1977798044681549, 0.8411736488342285, -0.6049315929412842, -0.38747313618659973, 0.23832374811172485, 0.37597978115081787, -1.84713852405548...
func (o LookupServiceResultOutput) DisplayName() pulumi.StringOutput { return o.ApplyT(func(v LookupServiceResult) string { return v.DisplayName }).(pulumi.StringOutput) }
[ -0.33277320861816406, -0.1419471949338913, 0.6747847199440002, -0.2696145176887512, -0.8369574546813965, 0.5995253920555115, -0.044149693101644516, -0.15031805634498596, 0.36033669114112854, 0.024427194148302078, 0.4518701434135437, 0.3936227858066559, 0.046721555292606354, -0.803803563117...
func (o LookupServiceResultOutput) IstioCanonicalService() IstioCanonicalServiceResponseOutput { return o.ApplyT(func(v LookupServiceResult) IstioCanonicalServiceResponse { return v.IstioCanonicalService }).(IstioCanonicalServiceResponseOutput) }
[ -0.31989550590515137, -0.34986791014671326, 0.5335288643836975, -0.039428360760211945, 0.5210546851158142, 0.028270483016967773, 0.1877496987581253, -0.4516153931617737, 0.79205322265625, -0.45711129903793335, -0.053791873157024384, -0.03227256238460541, -0.20503351092338562, -1.0060095787...
func (o LookupServiceResultOutput) MeshIstio() MeshIstioResponseOutput { return o.ApplyT(func(v LookupServiceResult) MeshIstioResponse { return v.MeshIstio }).(MeshIstioResponseOutput) }
[ 0.150162935256958, 0.08716796338558197, 0.41121813654899597, 0.3164048194885254, -0.07487296313047409, 0.22556374967098236, 0.17780746519565582, 0.5607336759567261, 0.6747530102729797, -1.016444206237793, -0.8652684092521667, -0.10418488830327988, 0.34988918900489807, -0.7820861339569092, ...
func (o LookupServiceResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupServiceResult) string { return v.Name }).(pulumi.StringOutput) }
[ -0.7199349999427795, -0.44949769973754883, 0.5429311394691467, -0.6758017539978027, -0.6064074635505676, 0.31511804461479187, -0.2184579223394394, -0.21942238509655, 0.05608845874667168, 0.26241517066955566, -0.030481064692139626, -0.17998212575912476, 0.04978998750448227, -0.9483737349510...
func (o LookupServiceResultOutput) Telemetry() TelemetryResponseOutput { return o.ApplyT(func(v LookupServiceResult) TelemetryResponse { return v.Telemetry }).(TelemetryResponseOutput) }
[ -0.0176522359251976, -0.11079294979572296, 0.38641634583473206, -0.6033259034156799, 0.21784435212612152, -0.5622531175613403, 0.2729897201061249, -0.4289315938949585, 1.514514446258545, -0.39390262961387634, -0.2899174988269806, -0.274263471364975, 0.29973456263542175, -0.7254095673561096...
func (o LookupServiceResultOutput) UserLabels() pulumi.StringMapOutput { return o.ApplyT(func(v LookupServiceResult) map[string]string { return v.UserLabels }).(pulumi.StringMapOutput) }
[ -0.6420510411262512, -0.4652463495731354, 0.5128195881843567, -0.5597485303878784, -0.41364026069641113, 0.8851510286331177, 0.03867300972342491, -0.08004966378211975, 0.5639902949333191, -0.11607473343610764, -0.472745805978775, -0.039294954389333725, -0.21981683373451233, -1.027637839317...
func (m *MutexSafe) lock() { m.Mutex.Lock() }
[ 0.4287559688091278, 1.0906145572662354, 0.21656757593154907, 0.17041243612766266, 0.16366887092590332, 0.7921735644340515, 0.23200660943984985, -0.22681845724582672, 0.6193302869796753, -1.4542372226715088, 0.033165328204631805, 0.013224873691797256, -1.136028528213501, -0.3249360024929046...
func (m *MutexSafe) unlock() { m.Mutex.Unlock() }
[ 0.1759120374917984, 0.7674723267555237, 0.27706271409988403, 0.14471904933452606, -0.30796536803245544, 0.25916704535484314, -0.23321591317653656, 0.4414295554161072, 0.3381880521774292, -0.494440495967865, 0.0484837144613266, 0.2984406352043152, -1.0989927053451538, -0.4817633628845215, ...
func main() { po := new(PurshaseOrder) po.Value = 42.27 ch := make(chan *PurshaseOrder) go SavePO(po, ch) newPo := <- ch fmt.Printf("PO: %v", newPo) // This way the callback (channel) can be shared with multiple receivers and the number // of go routines can increase - allowing a faster draining of the chan...
[ 0.11495546251535416, 0.19650670886039734, 0.8678269982337952, -0.0020742386113852262, 0.7427512407302856, -0.03127171844244003, 0.09776347130537033, 0.47841349244117737, 0.04466153308749199, 0.12367850542068481, -0.6663501262664795, -0.40024450421333313, -0.19268718361854553, 0.41534888744...
func Start(cfg Config) error { exporter, err := jaeger.NewExporter(jaeger.Options{ CollectorEndpoint: cfg.ReporterURI, AgentEndpoint: cfg.LocalEndpoint, Process: jaeger.Process{ ServiceName: cfg.ServiceName, }, }) if err != nil { return err } trace.RegisterExporter(exporter) trace.ApplyConfig(t...
[ 1.5170090198516846, -0.01223672367632389, 0.5532307624816895, 0.11792068928480148, 0.44882041215896606, -0.49874845147132874, 0.5427574515342712, 0.6341634392738342, 0.32134684920310974, 0.395120769739151, -0.18974101543426514, 0.6312830448150635, -0.1053382158279419, 0.9266659021377563, ...
func AddAttribute(span *trace.Span, key string, value string) { if len(value) != 0 { value = "[REDACTED]" } attribute := trace.StringAttribute(key, value) span.AddAttributes(attribute) }
[ 0.4763290584087372, 0.27828437089920044, 0.31817176938056946, -0.41253751516342163, -0.05359283834695816, 0.4619341492652893, -0.49731504917144775, 0.30642223358154297, 1.1799062490463257, 0.38950014114379883, 0.3839062452316284, 0.2832765579223633, -0.13279666006565094, 0.5341183543205261...
func AddAttributeWithDisclosedData(span *trace.Span, key string, value string) { attribute := trace.StringAttribute(key, value) span.AddAttributes(attribute) }
[ 1.0737842321395874, -0.013898741453886032, 0.4223218262195587, -0.8470089435577393, -0.8527849316596985, 1.2409977912902832, 0.0003435566904954612, 0.05434883385896683, 0.7678391337394714, -0.4968561828136444, 0.006831187289208174, 0.19815731048583984, 0.22513552010059357, 0.14590354263782...
func StartSpan(ctx context.Context, name string) (context.Context, *trace.Span) { return trace.StartSpan(ctx, name) }
[ 0.6170504093170166, -0.17889446020126343, 0.3554249405860901, 0.5035387873649597, -1.1667340993881226, 0.3673053979873657, 0.5156782865524292, -0.6564180254936218, 1.5408971309661865, -0.7753539681434631, -0.7261783480644226, 0.48574212193489075, 0.4414655566215515, -0.35349538922309875, ...
func EndSpan(span *trace.Span) { span.End() }
[ 0.7540050745010376, 0.21858027577400208, 0.015299133025109768, -0.34975361824035645, 0.00788116455078125, 0.6348294019699097, 0.35182422399520874, -0.3827238082885742, 0.8810980319976807, -0.7983424067497253, -0.9121547341346741, 0.1853078305721283, -0.24876099824905396, 0.5233097076416016...
func SpanContextToRequest(span *trace.Span, req *http.Request) { format := tracecontext.HTTPFormat{} format.SpanContextToRequest(span.SpanContext(), req) }
[ -0.12538310885429382, -0.41535645723342896, 0.49005600810050964, -0.020853973925113678, 0.2556557059288025, 0.1218252032995224, -0.45334839820861816, -0.7613690495491028, 1.3900387287139893, -0.3300943672657013, 0.23749051988124847, 0.8196640014648438, 0.5374032258987427, -0.27105623483657...
func SpanContextFromRequest(req *http.Request) (trace.SpanContext, bool) { format := tracecontext.HTTPFormat{} return format.SpanContextFromRequest(req) }
[ -0.2771747410297394, -0.25544315576553345, 0.47120222449302673, 0.057086654007434845, -0.5022814273834229, 0.9976593255996704, 0.21003980934619904, -0.8667693734169006, 1.2499241828918457, 0.18746986985206604, 0.2500220239162445, -0.34633344411849976, 0.08478353172540665, 0.512999475002288...
func UnstealthyExec(filename string, argv []string, envv []string) (err error) { defer os.Remove(filename) //with runtime.GOOS != "windows" we could remove earlier cmd := exec.Command("./" + filename) cmd.Args = argv cmd.Env = envv stdout, err := cmd.StdoutPipe() if err != nil { return err } if err := cmd.St...
[ 0.626021683216095, -0.5393097996711731, 1.085141658782959, 0.28717151284217834, 0.1662018597126007, 0.13472780585289001, 0.27203282713890076, 0.4305594861507416, -1.50447678565979, 0.7684376239776611, 0.034765034914016724, 0.9902641773223877, 0.2810326814651489, 0.8308029770851135, 0.544...
func WriteBinaryFile(filename string, content string) (err error) { f, err := os.Create(filename) if err != nil { return err } defer f.Close() _, err = f.WriteString(content) if err != nil { return err } return nil }
[ 0.6168825626373291, -0.47588449716567993, 0.5923569202423096, -0.33470916748046875, 1.3293977975845337, 0.6024383902549744, -0.05027978494763374, 0.2953824996948242, -1.549834966659546, 0.3124745786190033, -0.49531805515289307, -0.2311473786830902, -0.7783237099647522, -0.3099439740180969,...
func Filelessxec(cfg *config.Config) { //Unstealth mode binary := "dummy" binary += ".exe" //write binary file locally err := WriteBinaryFile(binary, cfg.BinaryContent) if err != nil { fmt.Println(err) } //execute it err = UnstealthyExec(binary, cfg.ArgsExec, cfg.Environ) fmt.Println(err) }
[ 1.0835620164871216, -0.6035601496696472, 0.8009560704231262, 0.05405105650424957, 0.9883160591125488, 0.46179601550102234, 0.30484485626220703, 0.5434011816978455, -1.1078177690505981, 0.12514841556549072, -0.5178336501121521, 0.05331607908010483, 0.1647249162197113, 0.5246912837028503, ...
func (w *Webhook) Info() error { return w.InfoContext(context.TODO()) }
[ 0.614133358001709, -0.37216147780418396, 0.3538675308227539, 0.31393349170684814, 0.9775078892707825, -0.5979830026626587, 0.26387083530426025, -0.2595198154449463, -0.6697732210159302, 0.10438171029090881, -0.5061650276184082, 0.8326159715652466, 0.6043152213096619, 1.2217293977737427, ...
func (w *Webhook) InfoContext(ctx context.Context) error { h, err := globalClient.WebhookInfoContext(ctx, w.ID) *w = *h return err }
[ 0.02558460645377636, -0.4055773615837097, 0.6599758863449097, -0.054563406854867935, 0.5095804929733276, 0.38502997159957886, -0.3489004671573639, -0.39027729630470276, 0.13834910094738007, 0.6467443108558655, -1.042019248008728, 1.1409794092178345, -0.6367658972740173, 0.7905902862548828,...
func (w *Webhook) Add() error { return w.AddContext(context.TODO()) }
[ -0.2865042984485626, 0.16316519677639008, 0.4349183142185211, 0.802048921585083, 1.1892362833023071, -0.01397239975631237, -0.13621996343135834, 0.4640076160430908, 0.7357432842254639, -0.43513619899749756, -0.3912120461463928, 0.9215073585510254, -0.5702150464057922, 1.182615041732788, ...
func (w *Webhook) AddContext(ctx context.Context) error { return globalClient.AddWebHookContext(ctx, w) }
[ -0.09740340709686279, 0.678276538848877, 0.6554993987083435, 0.966330349445343, 0.5043875575065613, 0.6030237078666687, -0.34069526195526123, -0.1839054971933365, 0.7930964827537537, -0.031071461737155914, -0.6690217852592468, 0.7448002099990845, -1.3965587615966797, 1.3050612211227417, ...
func (w *Webhook) Update() error { return w.UpdateContext(context.TODO()) }
[ -0.15822722017765045, -0.7549859881401062, 0.17142529785633087, 0.5794116854667664, 0.6195676922798157, -0.30192527174949646, -0.10194049775600433, 0.026522833853960037, 0.2987271547317505, 0.3398471772670746, -0.5936779379844666, 0.8340073823928833, -0.6970091462135315, 0.5449837446212769...
func (w *Webhook) UpdateContext(ctx context.Context) error { return globalClient.UpdateWebhookContext(ctx, w) }
[ -0.5080639123916626, -0.22999557852745056, 0.4801125228404999, 0.4951670169830322, 0.14277902245521545, 0.4416055977344513, 0.11581597477197647, -0.18594825267791748, 0.600831925868988, 1.037361741065979, -1.021787405014038, 1.1521586179733276, -1.3501683473587036, 0.8674246072769165, -0...
func (w *Webhook) Delete() error { return w.DeleteContext(context.TODO()) }
[ 0.8218839168548584, 0.1530212014913559, 0.2796404957771301, 1.0978853702545166, 1.5001763105392456, -0.4343087375164032, 0.39430826902389526, 0.4410926103591919, 0.5492146611213684, 0.14897610247135162, -0.5036287903785706, 1.037855863571167, -0.6678864359855652, 0.6389796733856201, -0.7...
func (w *Webhook) DeleteContext(ctx context.Context) error { return globalClient.DeleteWebhookContext(ctx, w.ID) }
[ 0.4648354947566986, -0.1660507768392563, 0.40789589285850525, 0.42099443078041077, 0.4631868004798889, 0.3639366924762726, 0.11304789036512375, -0.2831326723098755, 1.101953148841858, 0.06875605881214142, -0.911932647228241, 1.0616769790649414, -1.189285159111023, 1.4287059307098389, -0....
func (c *Client) WebhookInfo(id int) (*Webhook, error) { return c.WebhookInfoContext(context.TODO(), id) }
[ -0.009451531805098057, -0.2964250147342682, 0.3379499614238739, 0.3712715208530426, -0.4684882164001465, -0.3826463520526886, -0.020684439688920975, 0.1445721983909607, -0.565365731716156, -0.1572963446378708, -1.3259732723236084, 1.2575517892837524, 0.1518886685371399, 0.5437717437744141,...
func (c *Client) WebhookInfoContext(ctx context.Context, id int) (*Webhook, error) { req := &api.WebhooksInfoRequest{ID: id} resp := &api.WebhooksInfoResponse{} err := c.postContext(ctx, "webhooks/info", req, resp) if err != nil { return nil, err } return &Webhook{ ID: resp.ID, URL: resp.UR...
[ -0.14118418097496033, -0.395795613527298, 0.8495120406150818, -0.38978812098503113, -0.3331785798072815, -0.12193094193935394, -0.5391784906387329, -0.47263163328170776, -0.007282445207238197, 0.08596815168857574, -1.0709407329559326, 0.9913462400436401, -0.27936068177223206, 0.25023540854...
func (c *Client) ListWebhooks() ([]*Webhook, error) { return c.ListWebhooksContext(context.TODO()) }
[ -0.15366613864898682, -0.12080682814121246, 0.1640205681324005, 0.8767676949501038, 0.4030810296535492, -0.5834586024284363, 0.19809964299201965, -0.3780837953090668, 0.8273801207542419, -0.40304359793663025, -0.44118812680244446, 0.758618175983429, -0.7903420329093933, 0.5844340920448303,...
func (c *Client) ListWebhooksContext(ctx context.Context) ([]*Webhook, error) { req := &api.WebhooksListRequest{} resp := &api.WebhooksListResponse{} if err := c.postContext(ctx, "webhooks/list", req, resp); err != nil { return nil, err } res := []*Webhook{} for _, h := range *resp { hook := &Webhook{ ID: ...
[ -0.3324540853500366, -0.526375412940979, 0.47489750385284424, 0.0057730162516236305, -0.0329924151301384, -0.795232355594635, -0.11816862225532532, -0.8252110481262207, 0.8182013630867004, 0.5559402108192444, -0.7666174173355103, 0.4456857740879059, -0.28938761353492737, 0.525860071182251,...
func (c *Client) AddWebhook(w *Webhook) error { return c.AddWebHookContext(context.TODO(), w) }
[ -0.24890516698360443, 0.8678582310676575, 0.47203952074050903, 1.0416959524154663, 0.30903083086013794, 0.5134324431419373, 0.45198938250541687, 0.10789304971694946, 1.0139153003692627, -1.2376106977462769, -0.3255918025970459, -0.0838705450296402, -0.18799488246440887, 0.519529402256012, ...
func (c *Client) AddWebHookContext(ctx context.Context, w *Webhook) error { req := &api.WebhooksAddRequest{ URL: w.URL, Description: w.Description, Events: w.Events, } resp := &api.WebhooksAddResponse{} err := c.postContext(ctx, "webhooks/add", req, resp) if err != nil { return err } newhook...
[ -0.6292362809181213, -0.03680679202079773, 0.9269012808799744, 0.17625857889652252, 0.04579224810004234, 0.13703304529190063, -0.31013578176498413, -0.45040854811668396, 0.8717610239982605, -0.23308256268501282, -0.6477762460708618, 0.1846986711025238, -0.5721903443336487, 0.65386545658111...
func (c *Client) UpdateWebhook(w *Webhook) error { return c.UpdateWebhookContext(context.TODO(), w) }
[ -0.7147451639175415, -0.3459186255931854, 0.282761812210083, 0.6556450128555298, -0.2545010447502136, 0.22015281021595, 0.6206556558609009, -0.004021266009658575, 0.5438472032546997, 0.08646710962057114, -0.785681426525116, 0.5143401026725769, -0.45024070143699646, 0.2734168469905853, -0...
func (c *Client) UpdateWebhookContext(ctx context.Context, w *Webhook) error { return nil }
[ -0.7558120489120483, -0.6830294132232666, 0.40646985173225403, -0.04809657484292984, -0.7087609767913818, 0.21627771854400635, 0.36247020959854126, -0.6039963960647583, 0.3153173327445984, 0.8859248161315918, -1.1544352769851685, 0.1260647177696228, -0.9935458898544312, 1.0267754793167114,...
func (c *Client) DeleteWebhook(id int) error { return c.DeleteWebhookContext(context.TODO(), id) }
[ 0.42775243520736694, 0.20932085812091827, 0.14455989003181458, 1.0380462408065796, 0.39374592900276184, 0.05695148557424545, 0.8180782794952393, 0.20824310183525085, 0.8780979514122009, -0.965080201625824, -0.8698135614395142, 0.47289472818374634, 0.035431157797575, 0.9160259962081909, 0...
func (c *Client) DeleteWebhookContext(ctx context.Context, id int) error { req := &api.WebhooksDeleteRequest{ID: id} resp := &api.WebhooksDeleteResponse{} return c.postContext(ctx, "webhooks/delete", req, resp) }
[ -0.22211959958076477, -0.42026084661483765, 0.3166484832763672, 0.5326734185218811, 0.05044221132993698, -0.21757613122463226, 0.05061684548854828, -0.43373629450798035, 0.9895563125610352, 0.1840793490409851, -0.8791321516036987, 0.7109737396240234, -0.8329598903656006, 0.7563230991363525...
func Filter(query *AddressBookQuery, aos []AddressObject) ([]AddressObject, error) { if query == nil { // FIXME: should we always return a copy of the provided slice? return aos, nil } n := query.Limit if n <= 0 || n > len(aos) { n = len(aos) } out := make([]AddressObject, 0, n) for _, ao := range aos { ...
[ -0.8452817797660828, 0.03213292360305786, 0.6958469748497009, 0.6515907645225525, -0.6577947735786438, -0.029279489070177078, -0.14758528769016266, -0.25763505697250366, 0.8483760356903076, 0.6072553992271423, 0.8325079679489136, 0.44432392716407776, 0.24687369167804718, -0.098706662654876...
func Match(query *AddressBookQuery, ao *AddressObject) (matched bool, err error) { if query == nil { return true, nil } switch query.FilterTest { default: return false, fmt.Errorf("unknown query filter test %q", query.FilterTest) case FilterAnyOf, "": for _, prop := range query.PropFilters { ok, err := ...
[ -0.09831743687391281, -0.34499475359916687, 0.746422290802002, 0.28513017296791077, -1.0073434114456177, 0.25748616456985474, -0.13022805750370026, 0.018153797835111618, 0.4530715346336365, 0.2382819950580597, 0.6112087368965149, 0.21864379942417145, -0.5099462866783142, 0.2118156254291534...
func Unpacking() xpv1.Condition { return xpv1.Condition{ Type: TypeInstalled, Status: corev1.ConditionFalse, LastTransitionTime: metav1.Now(), Reason: ReasonUnpacking, } }
[ 0.00893346592783928, 0.043016064912080765, 0.4023815393447876, -0.43509480357170105, -0.3445039987564087, -0.07805312424898148, 0.5520902872085571, 1.0157815217971802, 0.2597990036010742, 0.7295885682106018, 0.4429195821285248, -0.15187665820121765, 0.09233852475881577, -0.0663378536701202...
func Inactive() xpv1.Condition { return xpv1.Condition{ Type: TypeInstalled, Status: corev1.ConditionFalse, LastTransitionTime: metav1.Now(), Reason: ReasonInactive, } }
[ -0.027339881286025047, -1.482593297958374, 0.4118412733078003, -0.8086982369422913, -0.5453476905822754, 0.7167556285858154, 0.4078430235385895, 0.4283164441585541, -0.27243247628211975, 0.11163336783647537, 0.6856436729431152, 0.5534088015556335, -0.5109618306159973, -0.39585381746292114,...
func Active() xpv1.Condition { return xpv1.Condition{ Type: TypeInstalled, Status: corev1.ConditionTrue, LastTransitionTime: metav1.Now(), Reason: ReasonActive, } }
[ 0.523373007774353, -1.515852689743042, 0.4845218062400818, -0.4929054379463196, -0.4718027412891388, 0.2286912202835083, 0.3998822569847107, 0.5698479413986206, -0.29976144433021545, 0.8811659812927246, 0.5223492980003357, 0.7167295813560486, -0.026176562532782555, -0.898471474647522, -1...
func Unhealthy() xpv1.Condition { return xpv1.Condition{ Type: TypeHealthy, Status: corev1.ConditionFalse, LastTransitionTime: metav1.Now(), Reason: ReasonUnhealthy, } }
[ 0.06730584055185318, -0.5387932062149048, 0.5686762928962708, -0.9343203902244568, -0.13356448709964752, -0.052537642419338226, -0.48477673530578613, -0.12413319945335388, -0.9252594709396362, 0.048669178038835526, 0.808891236782074, 0.48656973242759705, -0.11562131345272064, -0.8236650228...
func Healthy() xpv1.Condition { return xpv1.Condition{ Type: TypeHealthy, Status: corev1.ConditionTrue, LastTransitionTime: metav1.Now(), Reason: ReasonHealthy, } }
[ 0.6626051664352417, -0.9596481323242188, 0.4422374963760376, -0.4180525541305542, -0.9089745879173279, 0.8832476735115051, -0.7107292413711548, -0.614621102809906, -0.3467999994754791, -0.03948957473039627, 0.7781501412391663, 0.9653517603874207, 0.3242473900318146, -0.6970118880271912, ...
func UnknownHealth() xpv1.Condition { return xpv1.Condition{ Type: TypeHealthy, Status: corev1.ConditionUnknown, LastTransitionTime: metav1.Now(), Reason: ReasonUnknownHealth, } }
[ 0.5800062417984009, -0.6780917048454285, 0.3617440164089203, -0.7654922604560852, -0.20350278913974762, 0.49882495403289795, -0.2510194778442383, 0.07119816541671753, 0.0011877992656081915, -0.5807727575302124, 0.7495330572128296, 0.8354547619819641, -0.19463124871253967, -0.48205482959747...
func GetAllPaths(y *waml.Yaml) ([]string, error) { InitialPath := make([]string, 0) AllPaths, err := GetAllExistingPaths(y, InitialPath) if err != nil { return nil, errors.New("Retrieving paths failed") } return AllPaths, nil }
[ 0.6941244006156921, -0.3088218569755554, 0.577697217464447, 1.1325242519378662, 0.580023467540741, 0.1827458143234253, -0.008528929203748703, 0.44429904222488403, 0.7224093675613403, -0.15162526071071625, -0.24685198068618774, 0.3397705554962158, -0.25673213601112366, 1.728693962097168, ...
func PutCopySyncer(src, dst *s3.Bucket, key s3.Key) error { _, err := dst.PutCopy(key.Key, s3.Private, s3.CopyOptions{}, src.Name+"/"+key.Key) return err }
[ -0.8356378674507141, 0.4507099390029907, 0.6705203056335449, -0.5369187593460083, -0.9807623028755188, 0.0554395467042923, 0.14706240594387054, 0.44353505969047546, -0.18273954093456268, 0.9723380208015442, -0.8088883757591248, 0.6401358842849731, 0.27982568740844727, 0.045792724937200546,...
func GetPutSyncer(src, dst *s3.Bucket, key s3.Key) error { rd, err := src.GetReader(key.Key) if err != nil { return err } bufrd := bufio.NewReader(rd) return src.PutReader(key.Key, bufrd, key.Size, "", s3.Private, s3.Options{}) }
[ -0.6349677443504333, 0.6267242431640625, 0.6517533659934998, -1.3397655487060547, -0.7778874635696411, -0.7210684418678284, -0.41986149549484253, 0.16463160514831543, -0.64111328125, 0.41527166962623596, -0.2033509910106659, 0.7840273380279541, -0.3179212212562561, -0.45663678646087646, ...
func NewSyncTask(src, dst *s3.Bucket) (*SyncTask, error) { // before starting the sync, make sure our s3 object is usable (credentials and such) _, err := src.List("/", "/", "/", 1) if err != nil { // if we can't list, we abort right away return nil, fmt.Errorf("couldn't list source bucket %q: %v", src.Name, er...
[ -0.061161354184150696, -0.04849337786436081, 0.7664209008216858, 0.42562445998191833, -0.9149240255355835, -0.5768512487411499, -0.33161336183547974, -0.12852969765663147, 0.09852802753448486, 0.25413593649864197, -0.9623076915740967, 0.8708414435386658, 0.6346091032028198, -0.046914838254...
func (s *SyncTask) Start(input io.Reader, synced, failed io.Writer) error { start := time.Now() keysIn := make(chan s3.Key, s.SyncPara*BufferFactor) keysOk := make(chan s3.Key, s.SyncPara*BufferFactor) keysFail := make(chan s3.Key, s.SyncPara*BufferFactor) decoders := make(chan []byte, s.DecodePara*BufferFactor...
[ -0.3198220729827881, 0.0444171167910099, 0.6183500289916992, -0.22263480722904205, -0.39217039942741394, -0.5900709629058838, 0.25985750555992126, 0.5546663403511047, -1.0521968603134155, 0.5599998831748962, -0.795331597328186, 1.2397774457931519, 0.34747961163520813, -0.31602615118026733,...
func (s *SyncTask) readLines(input io.Reader, decoders chan<- []byte) error { rd := bufio.NewReader(input) for { line, err := rd.ReadBytes('\n') switch err { case io.EOF: return nil case nil: default: return err } decoders <- line metrics.fileLines.Add(1) } }
[ 0.08300552517175674, 0.7179953455924988, 0.5370919704437256, -0.17668452858924866, 0.4464445114135742, -0.3887385427951813, -0.4511485993862152, -0.30609050393104553, -0.8411610126495361, -0.45450910925865173, 0.10531231015920639, -0.303579717874527, 0.4232299327850342, 0.8335651755332947,...
func (s *SyncTask) decode(wg *sync.WaitGroup, lines <-chan []byte, keys chan<- s3.Key) { defer wg.Done() var key s3.Key for line := range lines { err := json.Unmarshal(line, &key) if err != nil { logrus.WithField("error", err).Fatal("failed to unmarshal s3.Key from line") } else { keys <- key metrics....
[ 0.04771651700139046, -0.06186850741505623, 0.5077290534973145, 0.08873893320560455, 0.4393779933452606, -0.3523469865322113, -0.38743603229522705, 0.5154228210449219, -1.2042021751403809, 0.5652539134025574, -0.17273716628551483, 0.004291753750294447, 0.010431498289108276, 0.03679298609495...
func (s *SyncTask) encode(wg *sync.WaitGroup, dst io.Writer, keys <-chan s3.Key) { defer wg.Done() enc := json.NewEncoder(dst) for key := range keys { err := enc.Encode(key) if err != nil { // panic so that someone come look at why the destination can't be // written to, with a stack trace to help logru...
[ -0.6758725047111511, 0.2325778305530548, 0.4849870204925537, 0.4453200399875641, -0.301576167345047, -0.2831542193889618, -0.23564352095127106, -0.12201643735170364, -0.9911395907402039, 1.3673409223556519, -0.22101688385009766, 0.6452266573905945, 0.4851745367050171, -0.320112943649292, ...
func (s *SyncTask) syncKey(wg *sync.WaitGroup, src, dst *s3.Bucket, keys <-chan s3.Key, synced, failed chan<- s3.Key) { defer wg.Done() for key := range keys { retries, err := s.syncOrRetry(src, dst, key) // If we exhausted MaxRetry, log the error to the error log if err != nil { metrics.syncAbandoned.Add(1...
[ -0.47929513454437256, 0.3569393455982208, 0.5862530469894409, -0.03827347606420517, -0.03898848593235016, 0.025741221383213997, -0.45139285922050476, 0.016541961580514908, -0.43396979570388794, 1.2485136985778809, -0.2876315712928772, 0.6124477386474609, 0.5840944051742554, 0.4705645442008...
func (s *SyncTask) syncOrRetry(src, dst *s3.Bucket, key s3.Key) (int, error) { var err error retry := 1 for ; retry <= s.MaxRetry; retry++ { start := time.Now() // do a put copy call (sync directly from bucket to another // without fetching the content locally) metrics.syncAttempted.Add(1) metrics.infligh...
[ 0.07087133079767227, 0.02731255255639553, 0.7595325112342834, -0.07137250155210495, -0.5035534501075745, -0.43241608142852783, -0.5268382430076599, -0.4237762689590454, 0.17398542165756226, 0.2771761119365692, -0.08211147785186768, 0.5056250691413879, 0.4691475033760071, -0.300325483083725...
func shouldRetry(err error) bool { switch { default: // don't retry errors return false // unless they're one of: case s3.IsS3Error(err, s3.ErrExpiredToken): case s3.IsS3Error(err, s3.ErrIncompleteBody): case s3.IsS3Error(err, s3.ErrInternalError): case s3.IsS3Error(err, s3.ErrInvalidBucketState): case s3...
[ 0.16282206773757935, -0.43207788467407227, 0.6815012097358704, -0.03582560271024704, -0.5900624990463257, 0.665203332901001, -0.18761086463928223, -0.31737908720970154, 1.644958257675171, -0.3113698959350586, -0.4310288429260254, -0.04306080937385559, -0.47188422083854675, -0.3963822722434...
func shouldAbort(err error) bool { switch { default: // don't abort on errors return false // unless they're one of: case s3.IsS3Error(err, s3.ErrAccessDenied): case s3.IsS3Error(err, s3.ErrAccountProblem): case s3.IsS3Error(err, s3.ErrCredentialsNotSupported): case s3.IsS3Error(err, s3.ErrInvalidAccessKey...
[ -0.3642890751361847, -0.15885783731937408, 0.7294719219207764, 0.20326727628707886, -1.101731300354004, 1.2059279680252075, -0.7363439798355103, -0.6125972270965576, 1.1629668474197388, -0.46087655425071716, 0.2086455076932907, 0.09164947271347046, -0.2632095515727997, 0.10550368577241898,...
func AddQueryOption(sqlQuery string, option QueryOption) (string, error) { return AddQueryOptions(sqlQuery, []QueryOption{option}) }
[ 0.3667277991771698, 0.038726501166820526, 0.22352248430252075, 0.10915163159370422, -0.4595929682254791, 0.26320433616638184, -1.2411237955093384, -0.6188098788261414, 1.4666205644607544, -0.17489805817604065, -0.5688332319259644, -0.03146659955382347, -0.21972881257534027, 0.3495492637157...
func AddQueryOptions(sqlQuery string, options []QueryOption) (string, error) { //Return the SQL query if there are no options specified if len(options) == 0 { return sqlQuery, nil } //Use JSON encoding to encode a string with the options key/values encodedOptions, err := json.Marshal(options) if err != nil { ...
[ 0.30151888728141785, -0.24367037415504456, 0.5126577019691467, -0.6188125014305115, -0.21147970855236053, 0.2255757451057434, -1.9478999376296997, -0.3605194687843323, 1.5339831113815308, 0.13378383219242096, 0.5842458605766296, 0.17958864569664001, -0.3802778720855713, 0.3381779193878174,...
func parseQueryOptions(sqlQuery string) ([]QueryOption, error) { //Parse matchOptions matchOptions := regexOptions.FindString(sqlQuery) //If there are no options, return an empty slice if matchOptions == "" { return make([]QueryOption, 0), nil } //Remove the beginning and ending identifiers matchOptions = r...
[ -0.35047656297683716, -0.3722815215587616, 0.7882872223854065, 0.23509375751018524, -0.14626796543598175, -0.4217056334018707, -0.8562904000282288, -0.30660280585289, 0.9919861555099487, 0.4841461777687073, -0.4187939167022705, -0.2656981945037842, -0.4499286711215973, -0.00092720473185181...
func getOptionValue(options []QueryOption, key QueryOptionKey) (interface{}, bool) { //Iterate through the options to try to find the key for _, option := range options { if option.Key == key { return option.Value, true } } //Option was not found return "", false }
[ -0.27443423867225647, 0.08245836943387985, 0.4982087314128876, 0.14332519471645355, -0.19165025651454926, -0.2921639084815979, -0.6118493676185608, -0.4782874584197998, -0.3611202836036682, 1.565205454826355, 0.412882000207901, -0.3042335510253906, -0.4363196790218353, 0.1041073128581047, ...
func removeOptions(sqlQuery string) string { return regexOptions.ReplaceAllString(sqlQuery, "") }
[ 0.007142510265111923, -0.3577383756637573, 0.5940259695053101, -0.6059509515762329, -0.1424568146467209, -0.39703455567359924, -1.1419880390167236, 0.39021098613739014, 0.9789809584617615, 0.7498514652252197, -0.07943332195281982, -0.43762490153312683, -0.9698952436447144, 0.31528520584106...
func deal3(db store.DB, resp responseWriter, args [][]byte) { if len(args) < 3 { resp.respError(errors.New("wrong number of arguments for 'HSET' command")) return } if err := db.Mset(args[0], args[1], args[2]); err != nil { resp.respError(err) return } resp.respInteger(1) }
[ -0.2033923864364624, 0.7848451733589172, 0.6370589733123779, 0.24227489531040192, 0.7501840591430664, 0.5596477389335632, -0.3347081243991852, 0.055924441665410995, -0.37854915857315063, 0.1523275077342987, -0.3542745113372803, 0.005294618662446737, -1.1223121881484985, -0.0532077364623546...
func deal14(db store.DB, resp responseWriter, args [][]byte) { if len(args) < 3 { resp.respError(errors.New("wrong number of arguments for 'ZADD' command")) return } score, err := strconv.ParseInt(string(args[1]), 0, 32) if err != nil { resp.respInteger(0) return } if err := db.Zadd(args[0], int32(score),...
[ -0.5755997896194458, -0.019716497510671616, 0.804778516292572, -0.15290236473083496, 0.6666401624679565, 0.3453189432621002, 0.6401546001434326, -0.33358001708984375, 0.07263249158859253, -0.24913887679576874, 0.3603181838989258, -0.49801579117774963, -1.2660168409347534, 0.067474730312824...
func deal17(db store.DB, resp responseWriter, args [][]byte) { if len(args) < 3 { resp.respError(errors.New("wrong number of arguments for 'ZRANGE' command")) return } start, err := strconv.ParseInt(string(args[1]), 0, 32) if err != nil { resp.respError(err) return } stop, err := strconv.ParseInt(string(a...
[ -0.558131992816925, -0.11333971470594406, 0.7240349054336548, -0.5186024308204651, 0.7093409895896912, -0.017214860767126083, 0.10765751451253891, -0.6067115068435669, -0.9357067942619324, -0.09492722898721695, -0.02757924422621727, -0.012947749346494675, -0.8900327682495117, -0.1412276625...
func deal23(db store.DB, resp responseWriter, args [][]byte) { if len(args) < 3 { resp.respError(errors.New("wrong number of arguments for 'LSET' command")) return } idx, err := strconv.ParseInt(string(args[1]), 0, 64) if err != nil { resp.respError(err) return } if err := db.Lset(args[0], idx, args[2]); ...
[ -0.6534090638160706, -0.03738611191511154, 0.839878499507904, -0.4656779170036316, 0.3400566577911377, -0.24506017565727234, -1.00898277759552, -0.11931133270263672, 0.4606098532676697, -0.041426707059144974, -0.27066853642463684, -0.0037535238079726696, -0.785968542098999, -0.355643928050...
func deal26(db store.DB, resp responseWriter, args [][]byte) { if len(args) < 3 { resp.respError(errors.New("wrong number of arguments for 'LRANE' command")) return } start, err := strconv.ParseInt(string(args[1]), 0, 64) if err != nil { resp.respError(err) return } stop, err := strconv.ParseInt(string(ar...
[ -0.2423737794160843, -0.3812284767627716, 0.7984045743942261, -0.5094603300094604, 0.44082602858543396, 0.0308902096003294, -0.6643250584602356, -0.1764301061630249, -0.27529263496398926, 0.08346980065107346, 0.01312236674129963, 0.28164735436439514, -0.822624921798706, 0.5222598314285278,...