text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (o *InlineResponse200115) SetPostStatus(v string) {
o.PostStatus = &v
} | [
0.6370730400085449,
-0.42684948444366455,
-0.4194629192352295,
-0.3585154116153717,
-0.9015018939971924,
0.22870028018951416,
-1.0455551147460938,
-0.5490880012512207,
-0.2697700560092926,
-0.277910053730011,
-1.1058427095413208,
-0.14927375316619873,
-0.4507136642932892,
-0.78832709789276... |
func (o *InlineResponse200115) GetPostedOn() string {
if o == nil || o.PostedOn == nil {
var ret string
return ret
}
return *o.PostedOn
} | [
0.44267863035202026,
-0.09769108891487122,
0.33593082427978516,
0.6318260431289673,
-0.8344982862472534,
0.6145704984664917,
0.11193053424358368,
0.6694128513336182,
-0.453249454498291,
-1.0229384899139404,
-0.8664067983627319,
-0.8706285357475281,
-1.1309733390808105,
1.0296565294265747,
... |
func (o *InlineResponse200115) GetPostedOnOk() (*string, bool) {
if o == nil || o.PostedOn == nil {
return nil, false
}
return o.PostedOn, true
} | [
-0.4455520510673523,
0.6732597947120667,
0.47359538078308105,
0.8063565492630005,
-0.26456424593925476,
0.19090215861797333,
0.02340587042272091,
0.9493616223335266,
-0.409356951713562,
-0.28865736722946167,
-1.2088896036148071,
-0.5960426926612854,
-0.10450845956802368,
0.8159375786781311... |
func (o *InlineResponse200115) HasPostedOn() bool {
if o != nil && o.PostedOn != nil {
return true
}
return false
} | [
0.4148404002189636,
0.0017076664371415973,
0.26756247878074646,
0.06365762650966644,
0.39059334993362427,
0.16342303156852722,
-0.6350737810134888,
1.3765119314193726,
-1.0241345167160034,
-1.0325788259506226,
-1.4233722686767578,
-0.9042000770568848,
-0.58348548412323,
1.044460654258728,
... |
func (o *InlineResponse200115) SetPostedOn(v string) {
o.PostedOn = &v
} | [
0.2680034041404724,
-0.811151921749115,
-0.0375111848115921,
-0.21890252828598022,
-1.251412272453308,
0.2644725739955902,
-0.6840686798095703,
-0.011970584280788898,
-0.4657725989818573,
-0.5437384843826294,
-0.9697871804237366,
0.4403338134288788,
-1.1670103073120117,
-0.0531414151191711... |
func (o *InlineResponse200115) GetPrivate() string {
if o == nil || o.Private == nil {
var ret string
return ret
}
return *o.Private
} | [
-0.42352592945098877,
1.0736219882965088,
0.25809401273727417,
0.9809508919715881,
-0.005612801760435104,
-0.7175934910774231,
0.4374409317970276,
-0.9870713353157043,
0.6010504961013794,
-1.3823268413543701,
-0.14740127325057983,
-0.5000934600830078,
-0.6022037863731384,
0.154507130384445... |
func (o *InlineResponse200115) GetPrivateOk() (*string, bool) {
if o == nil || o.Private == nil {
return nil, false
}
return o.Private, true
} | [
-0.5682421922683716,
0.5623830556869507,
0.519129753112793,
0.8727338910102844,
0.22242362797260284,
-0.6795758008956909,
0.45560920238494873,
-0.06343258917331696,
0.25902098417282104,
0.1250748485326767,
-1.1382322311401367,
-0.3492264151573181,
-0.41436371207237244,
0.26525235176086426,... |
func (o *InlineResponse200115) HasPrivate() bool {
if o != nil && o.Private != nil {
return true
}
return false
} | [
-0.2596287131309509,
1.0948575735092163,
0.5151507258415222,
0.4634781777858734,
0.8227859139442444,
-0.9362764358520508,
0.03773549571633339,
-0.28741562366485596,
0.3325499892234802,
-1.4313342571258545,
-1.0568264722824097,
-0.7117049098014832,
-0.7189821600914001,
-0.07936125248670578,... |
func (o *InlineResponse200115) SetPrivate(v string) {
o.Private = &v
} | [
-0.2513181269168854,
0.412406325340271,
-0.018565421923995018,
0.28276368975639343,
-1.0949923992156982,
-0.8326883912086487,
-0.06306479126214981,
-1.741369366645813,
0.18393442034721375,
-0.7597105503082275,
-0.15077929198741913,
0.9322851300239563,
-0.5521502494812012,
-0.85214728116989... |
func (o *InlineResponse200115) GetProject() InlineResponse2002People12345Company {
if o == nil || o.Project == nil {
var ret InlineResponse2002People12345Company
return ret
}
return *o.Project
} | [
0.30102232098579407,
0.9680646657943726,
0.12783481180667877,
1.3051834106445312,
0.16683097183704376,
-0.3702290654182434,
1.197620153427124,
0.19822607934474945,
0.6293779611587524,
-0.793433666229248,
0.05880831927061081,
-1.6434932947158813,
-1.174121618270874,
-0.03196367621421814,
... |
func (o *InlineResponse200115) GetProjectOk() (*InlineResponse2002People12345Company, bool) {
if o == nil || o.Project == nil {
return nil, false
}
return o.Project, true
} | [
-0.3567855954170227,
0.45514729619026184,
0.1731034368276596,
1.2285511493682861,
-0.11703342199325562,
0.3066810667514801,
0.6952753663063049,
0.7854081988334656,
0.16737820208072662,
0.5880549550056458,
-0.15780963003635406,
-0.9227094650268555,
-0.4810797870159149,
-0.12570226192474365,... |
func (o *InlineResponse200115) HasProject() bool {
if o != nil && o.Project != nil {
return true
}
return false
} | [
0.24221180379390717,
0.9725009799003601,
-0.002791663631796837,
0.8785386085510254,
0.6301565766334534,
-0.3787791132926941,
-0.32772862911224365,
0.5692381858825684,
0.38909128308296204,
-0.9759405255317688,
-0.33064794540405273,
-1.5901975631713867,
-0.494115948677063,
-0.620897173881530... |
func (o *InlineResponse200115) SetProject(v InlineResponse2002People12345Company) {
o.Project = &v
} | [
0.05884809419512749,
0.11933990567922592,
-0.07987692952156067,
0.8944463729858398,
-0.30948445200920105,
-0.2242443710565567,
0.25705772638320923,
-0.3967268168926239,
-0.09091997891664505,
-0.1424241065979004,
-0.023670224472880363,
-0.6053795218467712,
-0.7384586334228516,
-0.9185864925... |
func (o *InlineResponse200115) GetReactions() InlineResponse2008Reactions {
if o == nil || o.Reactions == nil {
var ret InlineResponse2008Reactions
return ret
}
return *o.Reactions
} | [
0.26033833622932434,
0.46249866485595703,
0.24467283487319946,
0.32680147886276245,
0.588629961013794,
-1.0281801223754883,
0.8623013496398926,
-0.2851991057395935,
1.9559555053710938,
-1.0954015254974365,
-0.5057343244552612,
-1.6112442016601562,
-0.9969019293785095,
-0.2884311079978943,
... |
func (o *InlineResponse200115) GetReactionsOk() (*InlineResponse2008Reactions, bool) {
if o == nil || o.Reactions == nil {
return nil, false
}
return o.Reactions, true
} | [
0.7330633997917175,
0.35654526948928833,
0.4490356147289276,
0.01760539971292019,
0.48653995990753174,
-0.4616423547267914,
0.9669514894485474,
-0.2800806760787964,
0.8785141110420227,
-0.10479944944381714,
-0.8825393319129944,
-1.251969814300537,
0.006797734182327986,
-0.2160673886537552,... |
func (o *InlineResponse200115) HasReactions() bool {
if o != nil && o.Reactions != nil {
return true
}
return false
} | [
0.7636048793792725,
1.1537660360336304,
0.31369906663894653,
-0.49658867716789246,
1.3305530548095703,
-0.969610333442688,
0.32483264803886414,
0.1808430403470993,
0.8927954435348511,
-1.7529609203338623,
-0.8195401430130005,
-1.555422067642212,
-0.5550148487091064,
-0.35246074199676514,
... |
func (o *InlineResponse200115) SetReactions(v InlineResponse2008Reactions) {
o.Reactions = &v
} | [
0.178561732172966,
-0.20534411072731018,
0.01932474970817566,
-0.2455608993768692,
0.30850252509117126,
-0.8336079120635986,
0.203411266207695,
-0.9634870290756226,
1.1395376920700073,
-0.7105970978736877,
-0.5821157097816467,
0.3413842022418976,
-0.3618282675743103,
-1.2131232023239136,
... |
func (o *InlineResponse200115) GetTags() []map[string]interface{} {
if o == nil || o.Tags == nil {
var ret []map[string]interface{}
return ret
}
return *o.Tags
} | [
0.16806796193122864,
0.7103663682937622,
-0.04267458617687225,
0.4282820224761963,
0.5512604713439941,
-0.9679698944091797,
0.14012934267520905,
-0.487006813287735,
0.7403334379196167,
-0.6114495396614075,
-0.2341483235359192,
-1.151894211769104,
-0.5726813077926636,
1.3722659349441528,
... |
func (o *InlineResponse200115) GetTagsOk() (*[]map[string]interface{}, bool) {
if o == nil || o.Tags == nil {
return nil, false
}
return o.Tags, true
} | [
0.5806013941764832,
1.515138864517212,
0.16134421527385712,
0.5637228488922119,
0.7037537097930908,
-1.0703010559082031,
-0.3091180920600891,
-0.3482106924057007,
-0.2605571448802948,
0.355193555355072,
-1.1702830791473389,
-0.8113383054733276,
0.30280235409736633,
0.5825459361076355,
-0... |
func (o *InlineResponse200115) HasTags() bool {
if o != nil && o.Tags != nil {
return true
}
return false
} | [
0.8072978258132935,
1.2982228994369507,
-0.2176400125026703,
-0.05006150156259537,
0.6593433022499084,
-0.6964320540428162,
-0.2075134962797165,
0.00956704467535019,
0.15460845828056335,
-1.0783079862594604,
-0.4145219624042511,
-1.1304641962051392,
-0.43264487385749817,
0.4818131625652313... |
func (o *InlineResponse200115) GetTextBody() string {
if o == nil || o.TextBody == nil {
var ret string
return ret
}
return *o.TextBody
} | [
0.13888652622699738,
0.5598740577697754,
0.32328709959983826,
0.4966696500778198,
0.17253458499908447,
-0.6258037686347961,
-0.0257998276501894,
-0.17325468361377716,
1.2333735227584839,
0.2672232985496521,
-0.396328866481781,
-1.7323004007339478,
-0.9914965629577637,
1.1742790937423706,
... |
func (o *InlineResponse200115) GetTextBodyOk() (*string, bool) {
if o == nil || o.TextBody == nil {
return nil, false
}
return o.TextBody, true
} | [
0.32333841919898987,
0.31659382581710815,
0.4367440938949585,
-0.1025189533829689,
0.05013997107744217,
-0.24345865845680237,
-0.21512523293495178,
0.9285672903060913,
0.026238663122057915,
1.5225727558135986,
-1.2227303981781006,
-1.5243955850601196,
-0.09053365886211395,
1.22914159297943... |
func (o *InlineResponse200115) HasTextBody() bool {
if o != nil && o.TextBody != nil {
return true
}
return false
} | [
0.0889083743095398,
0.40840229392051697,
0.36926284432411194,
-0.20107200741767883,
1.1535494327545166,
-0.8706912994384766,
-0.3135738968849182,
0.6260513067245483,
0.803267776966095,
0.30189257860183716,
-1.0364444255828857,
-1.2788079977035522,
-0.9872554540634155,
0.815779983997345,
... |
func (o *InlineResponse200115) SetTextBody(v string) {
o.TextBody = &v
} | [
0.1847115159034729,
0.12897659838199615,
-0.4348580539226532,
-0.1182495653629303,
-0.5606745481491089,
-0.9033098220825195,
-0.22476164996623993,
-1.0316400527954102,
0.6330745816230774,
0.5290346741676331,
-0.8644195795059204,
0.07050088047981262,
-1.0216487646102905,
0.22271881997585297... |
func (o *InlineResponse200115) GetTitle() string {
if o == nil || o.Title == nil {
var ret string
return ret
}
return *o.Title
} | [
0.3373887240886688,
0.7655813694000244,
0.17463810741901398,
0.8642705082893372,
0.17012222111225128,
-0.7300476431846619,
0.37840738892555237,
-0.2508527934551239,
1.0662604570388794,
-0.5084095001220703,
0.0316723994910717,
-1.7265194654464722,
-1.0946377515792847,
0.10651034116744995,
... |
func (o *InlineResponse200115) GetTitleOk() (*string, bool) {
if o == nil || o.Title == nil {
return nil, false
}
return o.Title, true
} | [
-0.19313795864582062,
0.26446881890296936,
0.48623353242874146,
0.6302613019943237,
-0.21779680252075195,
0.0784020647406578,
-0.07981228828430176,
0.1312185823917389,
0.2940812110900879,
0.6449135541915894,
-0.691971480846405,
-1.201103925704956,
-0.19548581540584564,
0.4585038125514984,
... |
func (o *InlineResponse200115) HasTitle() bool {
if o != nil && o.Title != nil {
return true
}
return false
} | [
0.4891810715198517,
0.524679958820343,
0.31140828132629395,
0.5028176307678223,
0.478228896856308,
-0.7399505972862244,
-0.562504231929779,
0.3096110224723816,
0.9595715403556824,
-0.5231519341468811,
-0.6917515993118286,
-1.50469970703125,
-0.9238297343254089,
-0.18445870280265808,
0.15... |
func (o *InlineResponse200115) SetTitle(v string) {
o.Title = &v
} | [
0.16037717461585999,
-0.058897487819194794,
-0.2564156949520111,
0.4594593346118927,
-0.8975275754928589,
-0.522596538066864,
-0.09429098665714264,
-0.9932513236999512,
0.9030141830444336,
-0.175749734044075,
-0.18323971331119537,
0.13821442425251007,
-0.9083033204078674,
-0.98401576280593... |
func (o *InlineResponse200115) GetUserDisplayPostedDate() string {
if o == nil || o.UserDisplayPostedDate == nil {
var ret string
return ret
}
return *o.UserDisplayPostedDate
} | [
0.7664136290550232,
-0.08578601479530334,
0.3786385655403137,
0.8878486156463623,
-1.8088785409927368,
0.6112613677978516,
0.41242367029190063,
-0.9767268896102905,
0.6735025644302368,
-0.5444924831390381,
-0.5738538503646851,
-0.9910573959350586,
-0.07209140062332153,
0.927952766418457,
... |
func (o *InlineResponse200115) GetUserDisplayPostedDateOk() (*string, bool) {
if o == nil || o.UserDisplayPostedDate == nil {
return nil, false
}
return o.UserDisplayPostedDate, true
} | [
0.21074923872947693,
-0.03427588567137718,
0.5711705088615417,
0.4795082211494446,
-1.87078857421875,
0.8197298645973206,
0.9360709190368652,
0.12629033625125885,
0.2952427566051483,
0.5242123007774353,
-0.9659020900726318,
-0.8729879856109619,
0.7091917991638184,
0.9161616563796997,
-0.... |
func (o *InlineResponse200115) HasUserDisplayPostedDate() bool {
if o != nil && o.UserDisplayPostedDate != nil {
return true
}
return false
} | [
0.7068145871162415,
0.3783020079135895,
0.3422795832157135,
0.253717839717865,
-1.1110572814941406,
0.07096739113330841,
0.4595504403114319,
0.029905356466770172,
0.09471733868122101,
-0.676879346370697,
-0.815913736820221,
-1.0486456155776978,
0.7108035683631897,
1.0439351797103882,
-0.... |
func (o *InlineResponse200115) SetUserDisplayPostedDate(v string) {
o.UserDisplayPostedDate = &v
} | [
0.5233754515647888,
-0.5319769382476807,
-0.2190917581319809,
-0.02934287115931511,
-2.0599300861358643,
0.70879727602005,
0.39184752106666565,
-0.7662031650543213,
0.2741929590702057,
-0.3252178728580475,
-0.532961905002594,
0.05330129712820053,
0.21831998229026794,
0.29106512665748596,
... |
func (o *InlineResponse200115) GetUserDisplayPostedTime() string {
if o == nil || o.UserDisplayPostedTime == nil {
var ret string
return ret
}
return *o.UserDisplayPostedTime
} | [
0.5729915499687195,
-0.027941109612584114,
0.5456193089485168,
1.0971903800964355,
-1.767640471458435,
0.5336374044418335,
0.6508804559707642,
-1.1212866306304932,
0.4674277603626251,
0.11079376190900803,
-0.7169578075408936,
-1.3925116062164307,
-0.5040713548660278,
1.1211836338043213,
... |
func (o *InlineResponse200115) GetUserDisplayPostedTimeOk() (*string, bool) {
if o == nil || o.UserDisplayPostedTime == nil {
return nil, false
}
return o.UserDisplayPostedTime, true
} | [
0.28858640789985657,
-0.09089149534702301,
0.6791525483131409,
0.662568986415863,
-1.881841778755188,
0.7553696632385254,
1.091927409172058,
-0.05317292734980583,
-0.026367973536252975,
1.1594741344451904,
-1.04280424118042,
-1.1884862184524536,
0.5076553225517273,
1.141690969467163,
-0.... |
func (o *InlineResponse200115) HasUserDisplayPostedTime() bool {
if o != nil && o.UserDisplayPostedTime != nil {
return true
}
return false
} | [
0.53806072473526,
0.37027707695961,
0.5251352787017822,
0.546170711517334,
-1.1507781744003296,
0.212873175740242,
0.5714433789253235,
-0.13320618867874146,
-0.21541734039783478,
0.2333521544933319,
-1.2151495218276978,
-1.3180017471313477,
0.3170336186885834,
1.5045239925384521,
-0.8590... |
func (o *InlineResponse200115) SetUserDisplayPostedTime(v string) {
o.UserDisplayPostedTime = &v
} | [
0.4617915451526642,
-0.5904944539070129,
-0.13379697501659393,
0.17142033576965332,
-2.136232376098633,
0.6253771781921387,
0.5686980485916138,
-0.954803466796875,
0.04431597888469696,
0.5127407908439636,
-0.7280829548835754,
-0.36840301752090454,
-0.09940187633037567,
0.5339476466178894,
... |
func (o *InlineResponse200115) GetUserFollowing() bool {
if o == nil || o.UserFollowing == nil {
var ret bool
return ret
}
return *o.UserFollowing
} | [
0.10481487214565277,
0.3154594600200653,
0.5679670572280884,
1.1191620826721191,
-0.8965607285499573,
0.3430558741092682,
0.3119882047176361,
-0.596064031124115,
0.7136998772621155,
-0.2775535583496094,
-0.6017257571220398,
-1.1644827127456665,
-0.35267242789268494,
0.036529332399368286,
... |
func (o *InlineResponse200115) GetUserFollowingOk() (*bool, bool) {
if o == nil || o.UserFollowing == nil {
return nil, false
}
return o.UserFollowing, true
} | [
0.06199297681450844,
0.10261443257331848,
0.4480013847351074,
1.0340824127197266,
-1.2631036043167114,
0.8824055790901184,
0.6296917200088501,
0.2846457064151764,
0.10209804028272629,
0.5240296721458435,
-1.0524115562438965,
-1.2361923456192017,
0.4985193610191345,
0.4402555525302887,
-0... |
func (o *InlineResponse200115) HasUserFollowing() bool {
if o != nil && o.UserFollowing != nil {
return true
}
return false
} | [
0.5879056453704834,
0.6717624664306641,
0.37306833267211914,
1.074009895324707,
-0.2189924418926239,
-0.003921430557966232,
0.36088740825653076,
0.3242284655570984,
0.4484838843345642,
-0.3765108585357666,
-1.030080795288086,
-1.3695576190948486,
0.22900202870368958,
0.12051084637641907,
... |
func (o *InlineResponse200115) SetUserFollowing(v bool) {
o.UserFollowing = &v
} | [
-0.22264550626277924,
0.5501390099525452,
0.14938583970069885,
0.597041666507721,
-1.1455408334732056,
0.5681414008140564,
0.5065476894378662,
-0.7512754797935486,
-0.2564895451068878,
0.8471732139587402,
-0.6191049218177795,
-0.3945310413837433,
0.18542923033237457,
-0.3431466221809387,
... |
func (e *env) get(key string) (*object, error) {
ee, err := e.find(key)
if err != nil {
return nil, err
}
return ee.m[key], nil
} | [
-1.0041805505752563,
-0.3930950164794922,
0.6212060451507568,
-0.29559388756752014,
0.29307782649993896,
0.400191068649292,
-0.24481737613677979,
-0.3602359890937805,
-0.7306543588638306,
0.7310366034507751,
0.31169846653938293,
0.8156896233558655,
-0.06187216937541962,
0.03630876541137695... |
func (e *env) find(key string) (*env, error) {
_, ok := e.m[key]
if ok {
return e, nil
}
if e.outer != nil {
return e.outer.find(key)
}
return nil, fmt.Errorf("%q not found", key)
} | [
-0.5404878854751587,
-0.009448450990021229,
0.5781126022338867,
-0.01363239623606205,
-0.6536075472831726,
0.24425792694091797,
0.0622507743537426,
-0.28673312067985535,
-0.8006684184074402,
0.7226763963699341,
1.0625221729278564,
0.32671353220939636,
-0.5926807522773743,
1.799881339073181... |
func (e *env) define(key string, value *object) {
e.m[key] = value
} | [
-0.5829117298126221,
-0.6376915574073792,
0.5137947797775269,
0.5476547479629517,
0.0031571565195918083,
0.5365265607833862,
-1.1228516101837158,
0.34351450204849243,
-1.090812087059021,
0.8613055348396301,
-0.5812063217163086,
0.5672789812088013,
0.8129431009292603,
0.8565577268600464,
... |
func (e *env) set(key string, value *object) error {
ee, err := e.find(key)
if err != nil {
return err
}
ee.define(key, value)
return nil
} | [
-0.5641103982925415,
-0.24489937722682953,
0.5380246639251709,
-0.037173427641391754,
0.3997173607349396,
0.4586179554462433,
-0.3876569867134094,
-0.09512396156787872,
-0.8347291946411133,
1.2155159711837769,
-0.014390669763088226,
0.6623053550720215,
0.36643925309181213,
0.75124555826187... |
func (s *Server) getServerStatus(c echo.Context) error {
return c.JSON(http.StatusOK,
struct {
Status string `json:"status"`
LastUpTime time.Time `json:"last_up_time"`
LastDownTime time.Time `json:"last_down_time"`
}{
Status: s.Status.String(),
LastUpTime: s.LastUpTime,
LastDo... | [
-1.0628845691680908,
-0.8710896372795105,
0.6315465569496155,
-0.5565982460975647,
0.17926372587680817,
-0.6161031126976013,
-0.39484256505966187,
0.19001558423042297,
0.20453472435474396,
0.3480360507965088,
-1.4399709701538086,
1.2216962575912476,
-0.2521142065525055,
0.7946516871452332,... |
func UpdateResource(r rest.Updater, scope *RequestScope, admit admission.Interface) http.HandlerFunc {
return func(w http.ResponseWriter, req *http.Request) {
ctx := req.Context()
// For performance tracking purposes.
ctx, span := tracing.Start(ctx, "Update", traceFields(req)...)
defer span.End(500 * time.Mill... | [
-0.5439500212669373,
-0.22962255775928497,
0.7611204385757446,
0.14242851734161377,
-1.1819868087768555,
-0.027678614482283592,
0.6455320715904236,
-0.6471846699714661,
0.04357238858938217,
1.6699142456054688,
1.2306021451950073,
0.4912327826023102,
-0.5532748103141785,
-0.3083551228046417... |
func updateToCreateOptions(uo *metav1.UpdateOptions) *metav1.CreateOptions {
if uo == nil {
return nil
}
co := &metav1.CreateOptions{
DryRun: uo.DryRun,
FieldManager: uo.FieldManager,
FieldValidation: uo.FieldValidation,
}
co.TypeMeta.SetGroupVersionKind(metav1.SchemeGroupVersion.WithKind("Crea... | [
-0.3447994887828827,
-0.15641942620277405,
0.39689764380455017,
-0.33749571442604065,
0.7060813903808594,
0.19635017216205597,
0.6600194573402405,
-0.4037587642669678,
0.18710991740226746,
0.7694927453994751,
-0.14054365456104279,
0.26401185989379883,
-0.07125205546617508,
0.46400645375251... |
func NewMockInterface(ctrl *gomock.Controller) *MockInterface {
mock := &MockInterface{ctrl: ctrl}
mock.recorder = &MockInterfaceMockRecorder{mock}
return mock
} | [
0.03624431788921356,
0.14010052382946014,
0.29358938336372375,
0.40011680126190186,
0.31651443243026733,
0.13172577321529388,
0.7229273915290833,
-0.48795658349990845,
0.16990791261196136,
0.5501270890235901,
-0.6712107062339783,
-0.7452684044837952,
-1.5212132930755615,
0.945088803768158,... |
func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder {
return m.recorder
} | [
0.10692603886127472,
0.40569788217544556,
0.42252954840660095,
0.2176692932844162,
0.22204992175102234,
0.4638596773147583,
0.7718325257301331,
-0.4018505811691284,
0.25822633504867554,
-0.16622744500637054,
0.756183385848999,
0.1652585119009018,
-1.4024773836135864,
0.6500271558761597,
... |
func (m *MockInterface) Init(pipelineData *pipeline.Data, config config.Interface, client *http.Client) error {
ret := m.ctrl.Call(m, "Init", pipelineData, config, client)
ret0, _ := ret[0].(error)
return ret0
} | [
-0.6380504965782166,
-0.31296372413635254,
0.309369295835495,
-0.1870957314968109,
0.5979365706443787,
1.0993653535842896,
1.0490671396255493,
0.08053114265203476,
-1.761346697807312,
-0.17738065123558044,
0.07798544317483902,
0.03874113783240318,
-0.924224317073822,
0.1975802332162857,
... |
func (mr *MockInterfaceMockRecorder) Init(pipelineData, config, client interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockInterface)(nil).Init), pipelineData, config, client)
} | [
-0.08260655403137207,
0.4668336808681488,
0.4427646994590759,
-0.41251417994499207,
-0.048541776835918427,
0.9229264259338379,
-0.2480434775352478,
-0.3864058256149292,
-0.5457701683044434,
0.6785899996757507,
0.6914353370666504,
1.002596139907837,
-0.7209413051605225,
1.015472173690796,
... |
func (m *MockInterface) RetrievePayload() (*scm.Payload, error) {
ret := m.ctrl.Call(m, "RetrievePayload")
ret0, _ := ret[0].(*scm.Payload)
ret1, _ := ret[1].(error)
return ret0, ret1
} | [
0.6208533644676208,
0.32791510224342346,
0.42024266719818115,
0.1680099368095398,
1.4540536403656006,
-0.24823130667209625,
1.231787085533142,
-0.6303398013114929,
0.06678228825330734,
-1.4148579835891724,
-0.7068346738815308,
-0.6853921413421631,
-0.8852896094322205,
0.09732212871313095,
... |
func (mr *MockInterfaceMockRecorder) RetrievePayload() *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RetrievePayload", reflect.TypeOf((*MockInterface)(nil).RetrievePayload))
} | [
1.2242947816848755,
1.0364145040512085,
0.43260568380355835,
-0.15242356061935425,
0.5529981851577759,
0.029164664447307587,
0.3505362272262573,
-1.3202165365219116,
1.0456500053405762,
-0.49015936255455017,
0.2954294681549072,
0.15308475494384766,
-1.4877139329910278,
0.425256609916687,
... |
func (m *MockInterface) CheckoutPushPayload(payload *scm.Payload) error {
ret := m.ctrl.Call(m, "CheckoutPushPayload", payload)
ret0, _ := ret[0].(error)
return ret0
} | [
0.3930017650127411,
0.704767107963562,
0.5803660750389099,
-0.010764635168015957,
-0.43067437410354614,
0.8032402396202087,
-0.0795922726392746,
-0.024239055812358856,
-1.0955302715301514,
0.6127206683158875,
-0.48480963706970215,
-0.7704553604125977,
-0.6199362277984619,
0.981796264648437... |
func (mr *MockInterfaceMockRecorder) CheckoutPushPayload(payload interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckoutPushPayload", reflect.TypeOf((*MockInterface)(nil).CheckoutPushPayload), payload)
} | [
0.4989550709724426,
1.2344766855239868,
0.48268845677375793,
-0.09046915173530579,
-1.2481350898742676,
0.9518080353736877,
-1.0817755460739136,
-0.3401297628879547,
0.1211736872792244,
1.2846145629882812,
0.31930506229400635,
-0.2223208099603653,
-0.6610339879989624,
0.9172833561897278,
... |
func (m *MockInterface) CheckoutPullRequestPayload(payload *scm.Payload) error {
ret := m.ctrl.Call(m, "CheckoutPullRequestPayload", payload)
ret0, _ := ret[0].(error)
return ret0
} | [
-0.46571096777915955,
-0.013310052454471588,
0.3262507915496826,
-0.1282898634672165,
0.6626598238945007,
0.6267257332801819,
-0.38471272587776184,
0.09342707693576813,
-0.44644778966903687,
0.043522343039512634,
0.20775997638702393,
-0.5986068844795227,
-0.9047149419784546,
-0.51913607120... |
func (mr *MockInterfaceMockRecorder) CheckoutPullRequestPayload(payload interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckoutPullRequestPayload", reflect.TypeOf((*MockInterface)(nil).CheckoutPullRequestPayload), payload)
} | [
-0.36073005199432373,
0.736870527267456,
0.4402914345264435,
-0.03414943069219589,
0.01876877248287201,
0.7826448082923889,
-0.9640343189239502,
-0.25548461079597473,
0.6876458525657654,
0.816756546497345,
0.6817543506622314,
0.3157861530780792,
-0.9634007215499878,
-0.42416244745254517,
... |
func (m *MockInterface) Publish() error {
ret := m.ctrl.Call(m, "Publish")
ret0, _ := ret[0].(error)
return ret0
} | [
-0.6200511455535889,
0.19952580332756042,
0.01333592552691698,
1.0327898263931274,
0.8734429478645325,
0.40179169178009033,
0.7398151755332947,
-0.2764394283294678,
-0.7546181082725525,
-0.27603060007095337,
0.24699978530406952,
-0.5242970585823059,
-1.230299711227417,
1.121232509613037,
... |
func (mr *MockInterfaceMockRecorder) Publish() *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Publish", reflect.TypeOf((*MockInterface)(nil).Publish))
} | [
-0.07528828084468842,
0.8965898156166077,
0.06321834027767181,
0.6701809167861938,
0.035023823380470276,
0.17316018044948578,
0.22124110162258148,
-0.6740357279777527,
0.30617156624794006,
0.3311493992805481,
1.040137767791748,
0.3289198875427246,
-1.6415148973464966,
1.7992254495620728,
... |
func (m *MockInterface) PublishAssets(releaseData interface{}) error {
ret := m.ctrl.Call(m, "PublishAssets", releaseData)
ret0, _ := ret[0].(error)
return ret0
} | [
-0.15358588099479675,
0.07747682183980942,
0.011644992977380753,
0.47290393710136414,
-0.004086066037416458,
0.5671623945236206,
0.8848960995674133,
-0.17929312586784363,
-0.716498851776123,
-0.2312197983264923,
-0.10705020278692245,
-0.4942285418510437,
-0.9753932356834412,
0.371636956930... |
func (mr *MockInterfaceMockRecorder) PublishAssets(releaseData interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublishAssets", reflect.TypeOf((*MockInterface)(nil).PublishAssets), releaseData)
} | [
-0.04633380100131035,
0.9938370585441589,
0.2411651611328125,
0.04784340038895607,
-0.33473649621009827,
0.24223753809928894,
0.012285176664590836,
-0.701507568359375,
0.5949846506118774,
0.5549979209899902,
0.6841616630554199,
0.3603563606739044,
-0.715884268283844,
0.5829672813415527,
... |
func (m *MockInterface) Cleanup() error {
ret := m.ctrl.Call(m, "Cleanup")
ret0, _ := ret[0].(error)
return ret0
} | [
-0.4119444489479065,
-0.22488543391227722,
0.011954040266573429,
0.5847678184509277,
0.9227976202964783,
0.051927387714385986,
1.3096187114715576,
-0.5802728533744812,
0.24577969312667847,
-0.1348070651292801,
-0.9286112189292908,
-0.4399765431880951,
-0.33820840716362,
1.2340233325958252,... |
func (mr *MockInterfaceMockRecorder) Cleanup() *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cleanup", reflect.TypeOf((*MockInterface)(nil).Cleanup))
} | [
0.27197253704071045,
0.4849201738834381,
0.3732917010784149,
0.06345951557159424,
-0.031757455319166183,
-0.07098935544490814,
0.5093843340873718,
-1.1246559619903564,
1.288055419921875,
0.45851993560791016,
0.22030475735664368,
0.10544728487730026,
-0.730720043182373,
1.6811920404434204,
... |
func (m *MockInterface) Notify(ref, state, message string) error {
ret := m.ctrl.Call(m, "Notify", ref, state, message)
ret0, _ := ret[0].(error)
return ret0
} | [
-0.28087303042411804,
0.6414299011230469,
0.1704578399658203,
0.730700671672821,
1.3392524719238281,
-0.077152319252491,
0.7096518278121948,
-0.3498774766921997,
-0.5781530141830444,
-0.25360307097435,
-0.5234754085540771,
-0.3157382905483246,
-0.6818014979362488,
1.1728417873382568,
0.9... |
func (mr *MockInterfaceMockRecorder) Notify(ref, state, message interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Notify", reflect.TypeOf((*MockInterface)(nil).Notify), ref, state, message)
} | [
0.21100729703903198,
1.365585207939148,
0.3098466992378235,
0.6144726872444153,
0.5472187995910645,
0.09149198234081268,
-0.1223520040512085,
-0.9069204330444336,
0.443050742149353,
0.5513359308242798,
0.2985324561595917,
0.7911675572395325,
-0.8054681420326233,
1.5920764207839966,
0.575... |
func FromCommand(cmd *cobra.Command) {
if verbose := os.Getenv("debug"); verbose == "true" {
logrus.SetLevel(logrus.DebugLevel)
logrus.Debug("Debug level enabled")
config.Get().Verbose = true
}
} | [
1.3958196640014648,
0.18137511610984802,
0.5075778961181641,
-0.11592970788478851,
0.2558267116546631,
1.117331624031067,
-0.8726406693458557,
1.0482840538024902,
0.11136223375797272,
0.12571650743484497,
-0.37371742725372314,
1.234753966331482,
-0.4592958092689514,
1.866394281387329,
1.... |
func Asset(name string) ([]byte, error) {
cannonicalName := strings.Replace(name, "\\", "/", -1)
if f, ok := _bindata[cannonicalName]; ok {
a, err := f()
if err != nil {
return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
}
return a.bytes, nil
}
return nil, fmt.Errorf("Asset %s not foun... | [
-0.7961483001708984,
-1.2313168048858643,
0.633165180683136,
-0.6093899011611938,
-1.546921730041504,
-0.11101024597883224,
0.12971386313438416,
-1.3390334844589233,
-1.1358720064163208,
0.4855233430862427,
0.3090141713619232,
0.32495471835136414,
-0.6009681224822998,
-0.44264674186706543,... |
func MustAsset(name string) []byte {
a, err := Asset(name)
if err != nil {
panic("asset: Asset(" + name + "): " + err.Error())
}
return a
} | [
-0.012778956443071365,
0.11985661834478378,
0.4091298282146454,
-0.5268413424491882,
-0.8276715278625488,
0.4719155430793762,
-0.8186293840408325,
-1.5736604928970337,
0.16388541460037231,
0.6357062458992004,
-0.5354578495025635,
0.35693347454071045,
0.0057142809964716434,
-0.0248885955661... |
func AssetInfo(name string) (os.FileInfo, error) {
cannonicalName := strings.Replace(name, "\\", "/", -1)
if f, ok := _bindata[cannonicalName]; ok {
a, err := f()
if err != nil {
return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err)
}
return a.info, nil
}
return nil, fmt.Errorf("Asset... | [
0.371969997882843,
-1.1052993535995483,
0.5630446076393127,
-0.922572672367096,
-1.356387734413147,
0.0033556853886693716,
0.6777529716491699,
-0.8006685972213745,
-1.2748286724090576,
0.3115358352661133,
0.2636086046695709,
0.26388120651245117,
0.0635773167014122,
-0.3988074064254761,
0... |
func AssetNames() []string {
names := make([]string, 0, len(_bindata))
for name := range _bindata {
names = append(names, name)
}
return names
} | [
-0.7293784618377686,
-0.8460342288017273,
0.7321816682815552,
-0.39323121309280396,
-0.48951536417007446,
0.7661203145980835,
-0.5028699636459351,
-0.8655748963356018,
-0.4145073890686035,
0.8099913597106934,
0.16903363168239594,
1.163049578666687,
-0.028152840211987495,
0.0342608317732811... |
func RestoreAsset(dir, name string) error {
data, err := Asset(name)
if err != nil {
return err
}
info, err := AssetInfo(name)
if err != nil {
return err
}
err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755))
if err != nil {
return err
}
err = ioutil.WriteFile(_filePath(dir, name), d... | [
0.3437124192714691,
-0.3622540235519409,
0.6770355701446533,
-1.2592030763626099,
-0.006139514967799187,
-0.04453148692846298,
-0.0072639440186321735,
-0.43950510025024414,
-0.20619122684001923,
-0.2510169744491577,
0.1784360408782959,
0.13568510115146637,
-0.23627112805843353,
-0.56985116... |
func RestoreAssets(dir, name string) error {
children, err := AssetDir(name)
// File
if err != nil {
return RestoreAsset(dir, name)
}
// Dir
for _, child := range children {
err = RestoreAssets(dir, filepath.Join(name, child))
if err != nil {
return err
}
}
return nil
} | [
0.42261892557144165,
0.30020031332969666,
0.5813396573066711,
-0.20641657710075378,
-0.23828908801078796,
-0.24414615333080292,
0.5739709138870239,
-0.029911456629633904,
0.06188219040632248,
-0.43923482298851013,
0.5113736987113953,
0.3275970220565796,
-0.6125145554542542,
0.0351656526327... |
func NewRouter(interval string, agent *map[string]string, csvFile string) *cron.Cron {
lr := new(regression.Regression)
lr.SetObserved("Get throughput")
lr.SetVar(0, "CPU usage")
lr.SetVar(1, "Memory usage")
timeConfig := "@every " + interval // It works on this format - http://golang.org/pkg/time/#ParseDuration
... | [
0.9045512676239014,
-0.8636364340782166,
0.5007739067077637,
0.04874073714017868,
-0.18109746277332306,
0.4360051155090332,
-0.12137630581855774,
0.2620393931865692,
-0.7872247099876404,
-0.3520369231700897,
0.06898265331983566,
0.5902576446533203,
0.10933366417884827,
0.5735346674919128,
... |
func train() {
var dataPoints []TransferData
for _, source := range *AgentRouter.Agents {
data, err := getHistory(source)
if err == nil {
dataPoints = append(dataPoints, data...)
}
}
if len(dataPoints) == 0 {
return
}
// Reinitialize the model
lr := new(regression.Regression)
lr.SetObserved("Get thr... | [
0.39218297600746155,
-0.2596069872379303,
0.4661252498626709,
-0.6953712105751038,
0.607408881187439,
-0.15241797268390656,
0.2819904386997223,
0.6826243996620178,
-0.5551731586456299,
0.055961575359106064,
-0.49997177720069885,
0.8838837146759033,
-0.14074870944023132,
0.15653610229492188... |
func convertToCSV(dataPoints []TransferData) error {
file, err := os.Create(AgentRouter.CSVfile)
if err != nil {
return err
}
defer file.Close()
writer := csv.NewWriter(file)
defer writer.Flush()
for _, obj := range dataPoints {
str := []string{strconv.FormatFloat(obj.CpuUsage, 'f', -1, 64), strconv.Format... | [
0.19536086916923523,
-0.41303300857543945,
0.464958518743515,
-0.5076555609703064,
0.6637338995933533,
0.4426494836807251,
0.36803552508354187,
-0.2816234230995178,
-0.09719868004322052,
0.42492011189460754,
0.38892319798469543,
0.8229914903640747,
0.471028596162796,
0.2615172863006592,
... |
func getHistory(source string) ([]TransferData, error) {
url := fmt.Sprintf("%s/history?duration=%s", source, url.QueryEscape(AgentRouter.CronInterval))
resp := utils.FetchResponse(url, []byte{})
if resp.Error != nil {
return nil, resp.Error
}
var transferRecords []TransferData
err := json.Unmarshal(resp.Data, ... | [
0.32200074195861816,
1.2415742874145508,
0.8477086424827576,
-0.0006732272449880838,
0.11216843128204346,
-0.5757340788841248,
-0.4165482223033905,
-0.15378345549106598,
0.425945520401001,
0.836875319480896,
-0.7664081454277039,
0.9360682964324951,
-0.3457312285900116,
0.13848629593849182,... |
func (r *Router) InitialTrain() {
// Check if router has previous data, if not run train method for the first time
if _, err := os.Stat(r.CSVfile); !os.IsNotExist(err) {
trainingData, err := readCSVfile(r.CSVfile)
if err != nil {
logs.WithFields(logs.Fields{
"Error": err,
}).Println("Error while trainin... | [
0.5929997563362122,
-0.03326195105910301,
0.6626245379447937,
-0.69709712266922,
1.0141738653182983,
0.17236728966236115,
0.3351864516735077,
0.4642229378223419,
-0.7518224716186523,
-0.15889810025691986,
0.03495403751730919,
0.7264734506607056,
-0.13279806077480316,
0.5854560136795044,
... |
func readCSVfile(path string) ([][]float64, error) {
f, err := os.Open(path)
if err != nil {
return nil, err
}
r := csv.NewReader(bufio.NewReader(f))
dataPoint := make([][]float64, 0)
for {
record, err := r.Read()
// Stop at EOF.
if err == io.EOF {
break
}
var row = make([]float64, len(record))
f... | [
0.44477781653404236,
0.40982815623283386,
0.6518450975418091,
-0.3441881537437439,
-0.15107856690883636,
0.3756561279296875,
0.008727502077817917,
-0.1297251284122467,
-0.4634194076061249,
0.5209777355194092,
0.5207884907722473,
0.28810742497444153,
-0.13553208112716675,
0.2597568929195404... |
func (r *Router) FindSource(tr *TransferRequest) ([]SourceStats, int, error) {
// Find the union of files and files stored per agent
unionSet, filteredAgent, fileData := GetUnionCatalog(tr)
if len(filteredAgent) <= 0 {
return nil, 0, errors.New("Couldn't find appropriate agent")
}
// Get the prediction values
f... | [
-0.4499444365501404,
0.03703736141324043,
0.7549771070480347,
-0.37741410732269287,
-0.4202556610107422,
-0.6351742744445801,
0.6484969258308411,
0.023713283240795135,
-0.30486103892326355,
0.5059299468994141,
0.3959856331348419,
0.20977316796779633,
-0.045200787484645844,
0.91704225540161... |
func GetUnionCatalog(tRequest *TransferRequest) (*set.SetNonTS, []SourceStats, map[string][]string) {
unionSet := set.NewNonTS()
filteredAgent := make([]SourceStats, 0)
fileData := make(map[string][]string)
for srcAlias, srcUrl := range *AgentRouter.Agents {
records, err := GetRecords(*tRequest, srcUrl)
if err ... | [
-0.0820583701133728,
0.09093053638935089,
0.5663026571273804,
-1.1788111925125122,
-0.12997566163539886,
-0.14075982570648193,
0.08471040427684784,
0.1895519495010376,
-0.1315218210220337,
-0.17950589954853058,
0.04163485765457153,
0.41251340508461,
0.567099392414093,
0.6886749267578125,
... |
func (c *Client) SSOLogin(sid, password string) (ok bool, err error) {
httpClient := c.HttpClient
res, err := httpClient.Get(ssoLoginUrl)
if err != nil {
return
}
doc, err := goquery.NewDocumentFromReader(res.Body)
if err != nil {
return
}
formData := map[string]string{}
doc.Find("form#fm1 input").Each(... | [
-0.9933980107307434,
0.03196738660335541,
1.1857045888900757,
0.08590997755527496,
-0.723357081413269,
0.6688897609710693,
-0.3469679057598114,
0.3099867105484009,
-0.6908284425735474,
0.2645920515060425,
-0.9804472327232361,
0.10814359784126282,
-0.5596718788146973,
0.10492375493049622,
... |
func partitionText(inputFile string, pageNum int) {
filePath := inputFile
fmt.Printf("working with file %s\n", filePath)
pdfReader, f, err := model.NewPdfReaderFromFile(filePath, nil)
defer f.Close()
if err != nil {
panic(err)
}
page, err := pdfReader.GetPage(pageNum)
if err != nil {
panic(err)
}
ex, err ... | [
0.3073928654193878,
-0.32891806960105896,
1.2089918851852417,
0.027359509840607643,
-0.8833679556846619,
0.3593985438346863,
0.912462592124939,
0.3737659454345703,
-0.5976446866989136,
0.8033831715583801,
0.3805139660835266,
-0.1173650249838829,
-0.7156230211257935,
0.36568284034729004,
... |
func timeReference() time.Time {
gpsTimeReferenceMutex.Lock()
currentTimeReference := gpsTimeReference
gpsTimeReferenceMutex.Unlock()
return time.Unix(int64(currentTimeReference.systime), 0)
} | [
-0.6677502989768982,
-0.2872900068759918,
0.45704811811447144,
-0.45003384351730347,
0.2981915771961212,
-0.17271004617214203,
-0.3195912539958954,
-0.536177933216095,
-0.07097027450799942,
0.33493709564208984,
0.8859743475914001,
0.3634393513202667,
-1.158151388168335,
0.9251416921615601,... |
func LoRaGPSEnable(TTYPath string) error {
fd := C.int(0)
// HAL only supports u-blox7 for now, so gps_family must be "ubx7"
ok := (C.lgw_gps_enable(C.CString(TTYPath), C.CString("ubx7"), C.speed_t(0), &fd) == C.LGW_GPS_SUCCESS)
if !ok {
return errors.New("Failed GPS configuration - impossible to open port for G... | [
0.6524248719215393,
0.5291416049003601,
0.8316304087638855,
-0.5354222655296326,
0.10555339604616165,
0.5442892909049988,
-0.31131505966186523,
0.7516928315162659,
0.32312119007110596,
0.22286517918109894,
-0.22779850661754608,
-0.43440139293670654,
-0.10864579677581787,
-0.325081616640090... |
func extractHTTPResponseHeader(data []byte) (head, left []byte, err error) {
left = bytes.TrimLeft(data[1:], " \t\r\n")
if !bytes.HasPrefix(left, []byte("[")) {
err = NewError(ResponseError, "The response does not contain a header.", map[string]interface{}{
"data": string(data),
})
return
}
var i int
stac... | [
0.23808060586452484,
-0.9373055696487427,
0.9799807667732239,
-0.40138816833496094,
-0.24131248891353607,
-0.7635781764984131,
0.381230890750885,
-0.7117030024528503,
0.0112822987139225,
1.104838490486145,
-0.6826768517494202,
-0.11281507462263107,
-0.43656614422798157,
-0.1515077501535415... |
func parseHTTPResponseHeader(resp *http.Response, data []byte) (*httpResponse, error) {
head, left, err := extractHTTPResponseHeader(data)
if err != nil {
return nil, err
}
// TODO: use another JSON decoder.
var elems []interface{}
if err := json.Unmarshal(head, &elems); err != nil {
return nil, NewError(Res... | [
-0.1381715089082718,
-0.04742598906159401,
0.7733567953109741,
0.16441486775875092,
-0.13380178809165955,
-0.7158259153366089,
0.2945617735385895,
-0.11584048718214035,
-0.05997321382164955,
0.23309384286403656,
-0.8226042985916138,
-0.24219970405101776,
-0.6554229259490967,
0.389425992965... |
func newHTTPResponse(resp *http.Response) (*httpResponse, error) {
switch code := resp.StatusCode; code {
case http.StatusOK, http.StatusAccepted, http.StatusNoContent:
case http.StatusBadRequest:
default:
resp.Body.Close()
return nil, NewError(HTTPError, "The status is unexpected.", map[string]interface{}{
... | [
0.33159762620925903,
-0.8937427401542664,
0.6927027702331543,
-0.4880087971687317,
-0.7943115234375,
-0.5346760153770447,
-0.8064458966255188,
-0.4896788001060486,
0.6389927268028259,
0.42451032996177673,
-0.782084584236145,
-0.2440776824951172,
-0.16879718005657196,
-0.2577008903026581,
... |
func (r *httpResponse) Start() time.Time {
return r.start
} | [
-0.18669740855693817,
-0.9301953911781311,
0.3495616316795349,
-0.06044340878725052,
0.012303374707698822,
0.030334528535604477,
0.166036918759346,
-0.1908295452594757,
0.36723923683166504,
0.47020769119262695,
-1.1411513090133667,
0.38300320506095886,
-0.5288349986076355,
0.12265986204147... |
func (r *httpResponse) Elapsed() time.Duration {
return r.elapsed
} | [
0.49876677989959717,
-0.6957182288169861,
0.38005000352859497,
-0.33114105463027954,
0.2926495671272278,
0.7814249992370605,
0.5347027778625488,
-0.08205479383468628,
1.3362175226211548,
-0.18476282060146332,
-0.9484800100326538,
0.021198397502303123,
0.2491523176431656,
-0.095161765813827... |
func (r *httpResponse) Read(p []byte) (n int, err error) {
if len(r.left) != 0 {
n = copy(p, r.left)
r.left = r.left[n:]
if len(r.left) != 0 {
return
}
}
var m int
if n < len(p) {
m, err = r.resp.Body.Read(p[n:])
n += m
if err != nil {
if !r.plain && n > 0 && p[n-1] == ']' {
n--
}
if e... | [
-0.5661956667900085,
-0.264308363199234,
1.0978862047195435,
-0.2643212676048279,
-0.06577196717262268,
0.5163414478302002,
0.5652341246604919,
-0.6894242763519287,
0.33323970437049866,
0.1885109394788742,
-0.4012945294380188,
0.12667585909366608,
-0.9244462847709656,
0.4273160696029663,
... |
func (r *httpResponse) Close() error {
if _, err := io.Copy(ioutil.Discard, r.resp.Body); err != nil {
r.resp.Body.Close()
return NewError(NetworkError, "io.Copy failed.", map[string]interface{}{
"error": err.Error(),
})
}
if err := r.resp.Body.Close(); err != nil {
return NewError(NetworkError, "http.Res... | [
0.3334895968437195,
-0.7770798206329346,
0.8691787123680115,
-0.41360175609588623,
-0.4089343249797821,
0.5039185285568237,
0.11772049218416214,
-0.7118500471115112,
0.19449801743030548,
0.00716425059363246,
-0.18077585101127625,
-0.5747501850128174,
-0.9390281438827515,
-0.114106088876724... |
func (r *httpResponse) Err() error {
return r.err
} | [
0.1768977791070938,
-0.89780193567276,
-0.20260733366012573,
0.7059348225593567,
-0.842278778553009,
0.872399628162384,
0.21936529874801636,
-0.2927536368370056,
0.633440375328064,
-1.7740118503570557,
0.23499920964241028,
0.03804267942905426,
-0.21745795011520386,
0.26372936367988586,
0... |
func NewHTTPClient(addr string, client *http.Client) (*HTTPClient, error) {
a, err := ParseHTTPAddress(addr)
if err != nil {
return nil, err
}
url, err := url.Parse(a.String())
if err != nil {
return nil, NewError(AddressError, "url.Parse failed.", map[string]interface{}{
"url": a.String(),
"error": er... | [
0.3561924397945404,
-0.3197333812713623,
0.5369415283203125,
0.21574562788009644,
-0.789347767829895,
-0.4023796617984772,
0.035034991800785065,
0.5665111541748047,
-0.1620033085346222,
0.19519056379795074,
-0.03948797658085823,
0.8357123136520386,
-0.062450677156448364,
-0.231138885021209... |
func (c *HTTPClient) exec(name string, params map[string]string, body io.Reader) (Response, error) {
url := *c.url
url.Path = path.Join(url.Path, name)
if len(params) != 0 {
query := url.Query()
for k, v := range params {
query.Add(k, v)
}
url.RawQuery = query.Encode()
}
if body == nil {
resp, err := ... | [
-0.5694684386253357,
-0.23743200302124023,
1.088299036026001,
-0.2288350760936737,
-0.24965021014213562,
-0.10447248071432114,
-0.8389902114868164,
-0.4448357820510864,
-0.4892432987689972,
0.8196951150894165,
-0.2592422664165497,
-0.06448782980442047,
-0.43149858713150024,
0.3920465111732... |
func (c *HTTPClient) Exec(cmd string, body io.Reader) (Response, error) {
command, err := ParseCommand(cmd)
if err != nil {
return nil, err
}
command.SetBody(body)
return c.Query(command)
} | [
0.38917824625968933,
-0.1780054122209549,
0.5453178882598877,
-0.4003888666629791,
-0.3308306634426117,
0.34588804841041565,
-1.0173536539077759,
-0.376022070646286,
-0.12294892221689224,
-0.24869251251220703,
0.26555564999580383,
0.0692381039261818,
-0.6980875134468079,
-0.553484499454498... |
func (c *HTTPClient) Invoke(name string, params map[string]interface{}, body io.Reader) (Response, error) {
cmd, err := NewCommand(name, params)
if err != nil {
return nil, err
}
cmd.SetBody(body)
return c.Query(cmd)
} | [
-0.21200476586818695,
0.011396621353924274,
0.7299174070358276,
-0.5289718508720398,
-0.12104333937168121,
-0.13879461586475372,
-0.5265190601348877,
-0.7028390765190125,
-0.6000227928161621,
-0.06436298787593842,
0.3776220381259918,
0.47758591175079346,
-1.252092957496643,
-0.010606750845... |
func (c *HTTPClient) Query(cmd *Command) (Response, error) {
if err := cmd.Check(); err != nil {
return nil, err
}
return c.exec(cmd.Name(), cmd.Params(), cmd.Body())
} | [
0.13951867818832397,
-0.3108617961406708,
0.6086423993110657,
0.37361475825309753,
0.020461196079850197,
0.30839282274246216,
-0.5161185264587402,
-0.1678968220949173,
0.32853996753692627,
-0.22519680857658386,
0.6783349514007568,
0.3070037066936493,
-0.8470815420150757,
0.2193486541509628... |
func loadMetadata(metadataBytes []byte) (*resources.CloudAPIMetadata, error) {
var resourceMap resources.CloudAPIMetadata
uncompressed, err := gzip.NewReader(bytes.NewReader(metadataBytes))
if err != nil {
return nil, errors.Wrap(err, "expand compressed metadata")
}
if err = json.NewDecoder(uncompressed).Decode... | [
0.0003107456141151488,
-0.42429912090301514,
0.6378741264343262,
-0.8522354960441589,
-0.7306027412414551,
0.39208289980888367,
-0.4600779712200165,
-0.13825340569019318,
0.20608030259609222,
0.3910614252090454,
-0.22271040081977844,
-0.2601112723350525,
-1.0914092063903809,
0.053215146064... |
func (p *googleCloudProvider) Configure(ctx context.Context,
req *rpc.ConfigureRequest) (*rpc.ConfigureResponse, error) {
for key, val := range req.GetVariables() {
p.config[strings.TrimPrefix(key, "google-native:config:")] = val
}
p.setLoggingContext(ctx)
impersonateServiceAccountDelegatesString := p.getConfi... | [
-0.419409841299057,
0.035724859684705734,
0.9055619239807129,
0.12916745245456696,
-0.025515573099255562,
-0.2357812374830246,
-0.7252076864242554,
-0.07558900117874146,
-0.02303294464945793,
0.5777976512908936,
-0.11930171400308609,
0.9882729053497314,
-0.5245740413665771,
0.6862839460372... |
func (p *googleCloudProvider) Invoke(_ context.Context, req *rpc.InvokeRequest) (*rpc.InvokeResponse, error) {
label := fmt.Sprintf("%s.Invoke(%s)", p.name, req.Tok)
inv, ok := p.resourceMap.Functions[req.Tok]
if !ok {
return nil, errors.Errorf("invoke %q not found", req.Tok)
}
args, err := plugin.UnmarshalProp... | [
-1.18562650680542,
0.5434564352035522,
1.0587819814682007,
-0.03718552738428116,
0.43302401900291443,
-1.1793580055236816,
-0.28401774168014526,
-0.4132940471172333,
-0.2720978260040283,
0.743532121181488,
0.25631120800971985,
0.5082806944847107,
-0.838651716709137,
0.18754059076309204,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.