text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (o *NetworkElementSummaryAllOf) HasSerial() bool {
if o != nil && o.Serial != nil {
return true
}
return false
} | [
0.4513215720653534,
0.17516277730464935,
0.5412243008613586,
0.8615338206291199,
0.624669075012207,
-0.18196161091327667,
0.9940585494041443,
0.7747743725776672,
0.6991178393363953,
-1.5396945476531982,
-0.3128502666950226,
-0.186820387840271,
-0.7534497976303101,
-0.2962830364704132,
0.... |
func (o *NetworkElementSummaryAllOf) SetSerial(v string) {
o.Serial = &v
} | [
0.6668162941932678,
-0.42647528648376465,
-0.15007196366786957,
0.4397037625312805,
-1.0564182996749878,
0.11683578044176102,
0.5867822766304016,
-0.7542312145233154,
1.0609687566757202,
-0.5098979473114014,
0.3056059777736664,
1.3347499370574951,
-0.5774140357971191,
-1.0146375894546509,
... |
func (o *NetworkElementSummaryAllOf) GetSourceObjectType() string {
if o == nil || o.SourceObjectType == nil {
var ret string
return ret
}
return *o.SourceObjectType
} | [
0.08204255253076553,
0.2062147557735443,
0.10452405363321304,
0.2796081602573395,
-0.2526293098926544,
0.3316073715686798,
0.6736444234848022,
-0.38778144121170044,
0.4316663146018982,
0.0557723231613636,
-1.4326063394546509,
-1.6491632461547852,
-0.4505201578140259,
0.04721786454319954,
... |
func (o *NetworkElementSummaryAllOf) GetSourceObjectTypeOk() (*string, bool) {
if o == nil || o.SourceObjectType == nil {
return nil, false
}
return o.SourceObjectType, true
} | [
-0.40077880024909973,
-0.08368049561977386,
0.2708025872707367,
0.49411463737487793,
-0.13777966797351837,
0.7235201597213745,
0.9728122353553772,
0.12059663236141205,
0.14293324947357178,
1.150111436843872,
-2.167239189147949,
-1.635338306427002,
0.4785863161087036,
0.4936468005180359,
... |
func (o *NetworkElementSummaryAllOf) HasSourceObjectType() bool {
if o != nil && o.SourceObjectType != nil {
return true
}
return false
} | [
0.1470685750246048,
0.25358471274375916,
0.14203809201717377,
-0.431815505027771,
0.30994322896003723,
-0.3995659649372101,
0.35411450266838074,
0.41418206691741943,
0.24008968472480774,
0.12465757876634598,
-1.5958572626113892,
-1.5465983152389526,
0.30783185362815857,
0.7660647034645081,... |
func (o *NetworkElementSummaryAllOf) SetSourceObjectType(v string) {
o.SourceObjectType = &v
} | [
0.2713387608528137,
0.21187736093997955,
-0.3543615937232971,
-0.5955213308334351,
-0.5019280314445496,
0.42256808280944824,
0.2429652065038681,
-0.6755186915397644,
0.20771212875843048,
0.485443115234375,
-1.0656304359436035,
-0.39019161462783813,
0.0628775805234909,
-0.8155818581581116,
... |
func (o *NetworkElementSummaryAllOf) GetStatus() string {
if o == nil || o.Status == nil {
var ret string
return ret
}
return *o.Status
} | [
0.854645848274231,
0.2919067442417145,
0.018330654129385948,
0.618524432182312,
-0.1675812304019928,
0.007919859141111374,
0.8783485889434814,
0.17672696709632874,
1.223320484161377,
-0.8321696519851685,
-0.29159775376319885,
-1.1552603244781494,
-0.2135748267173767,
0.4857611656188965,
... |
func (o *NetworkElementSummaryAllOf) GetStatusOk() (*string, bool) {
if o == nil || o.Status == nil {
return nil, false
}
return o.Status, true
} | [
-0.3234797716140747,
0.8822547197341919,
0.27171584963798523,
0.9174649715423584,
-0.09990288317203522,
-0.16864992678165436,
0.6641033291816711,
1.0241624116897583,
0.20524369180202484,
-0.3307505249977112,
-1.3013819456100464,
-0.2151428610086441,
0.8511463403701782,
0.20575782656669617,... |
func (o *NetworkElementSummaryAllOf) HasStatus() bool {
if o != nil && o.Status != nil {
return true
}
return false
} | [
0.6720952391624451,
-0.09874128550291061,
0.08197762817144394,
0.47692108154296875,
0.46227413415908813,
0.12835927307605743,
0.18533867597579956,
1.3599268198013306,
0.8424896001815796,
-1.05452299118042,
-1.07764732837677,
-1.0040132999420166,
0.22178316116333008,
0.22005359828472137,
... |
func (o *NetworkElementSummaryAllOf) SetStatus(v string) {
o.Status = &v
} | [
1.142513394355774,
-0.1688266396522522,
-0.3453519940376282,
-0.1908046454191208,
-1.5120173692703247,
0.38282671570777893,
-0.3060667812824249,
-0.15077245235443115,
0.7612066864967346,
-0.2717699706554413,
-0.23120367527008057,
0.8739562034606934,
-0.14206410944461823,
-0.386022478342056... |
func (o *NetworkElementSummaryAllOf) GetSwitchId() string {
if o == nil || o.SwitchId == nil {
var ret string
return ret
}
return *o.SwitchId
} | [
0.8698977828025818,
0.0967768132686615,
0.22428973019123077,
1.0337679386138916,
-0.10747110843658447,
0.5342237949371338,
0.2714712619781494,
-0.23386140167713165,
1.4077519178390503,
-0.40501025319099426,
-0.10194408893585205,
-0.843621015548706,
-0.5042639374732971,
0.6391425132751465,
... |
func (o *NetworkElementSummaryAllOf) GetSwitchIdOk() (*string, bool) {
if o == nil || o.SwitchId == nil {
return nil, false
}
return o.SwitchId, true
} | [
0.04491155594587326,
0.23287881910800934,
0.3364056348800659,
0.7769159078598022,
0.3649471402168274,
0.7434412240982056,
0.5031589865684509,
0.7771235108375549,
0.5642645955085754,
-0.13279752433300018,
-0.9841881990432739,
-0.5786787271499634,
-0.0521569550037384,
0.40011218190193176,
... |
func (o *NetworkElementSummaryAllOf) HasSwitchId() bool {
if o != nil && o.SwitchId != nil {
return true
}
return false
} | [
0.8478261232376099,
0.13075441122055054,
0.20186056196689606,
0.4733043313026428,
0.11689262837171555,
-0.15875068306922913,
-0.41777563095092773,
0.5143527388572693,
0.6525670886039734,
-0.4815385341644287,
-0.7279620170593262,
-0.8104269504547119,
0.11686886101961136,
0.4407137334346771,... |
func (o *NetworkElementSummaryAllOf) SetSwitchId(v string) {
o.SwitchId = &v
} | [
1.178794264793396,
-0.3198576867580414,
-0.08808231353759766,
0.1754719465970993,
-1.0516960620880127,
0.5131919384002686,
-0.552703320980072,
-0.5768256187438965,
0.8749495148658752,
0.09383887052536011,
-0.11048290133476257,
0.640521228313446,
-0.15327604115009308,
-0.46981656551361084,
... |
func (o *NetworkElementSummaryAllOf) GetSwitchType() string {
if o == nil || o.SwitchType == nil {
var ret string
return ret
}
return *o.SwitchType
} | [
0.23175974190235138,
0.8434401154518127,
0.13120518624782562,
0.7996869087219238,
0.3142853379249573,
-0.492715448141098,
0.09206236898899078,
-0.2560349702835083,
0.8796871304512024,
-0.2296690046787262,
-0.11567196995019913,
-1.2066324949264526,
-0.8168731927871704,
1.1763006448745728,
... |
func (o *NetworkElementSummaryAllOf) GetSwitchTypeOk() (*string, bool) {
if o == nil || o.SwitchType == nil {
return nil, false
}
return o.SwitchType, true
} | [
-0.30889201164245605,
0.6723870038986206,
0.3459658622741699,
0.7353522181510925,
0.2582138776779175,
-0.16427378356456757,
0.4120367169380188,
0.983268141746521,
0.2837120294570923,
1.2316792011260986,
-0.9342721700668335,
-1.062657117843628,
-0.1059923991560936,
0.8522047996520996,
-0.... |
func (o *NetworkElementSummaryAllOf) HasSwitchType() bool {
if o != nil && o.SwitchType != nil {
return true
}
return false
} | [
0.2384893000125885,
0.9001033902168274,
0.05586401745676994,
0.20154033601284027,
0.6791689395904541,
-1.1208992004394531,
-0.38988906145095825,
0.3870302438735962,
0.39177119731903076,
-0.2231549620628357,
-0.8813692331314087,
-1.3470700979232788,
0.055930834263563156,
1.3322557210922241,... |
func (o *NetworkElementSummaryAllOf) SetSwitchType(v string) {
o.SwitchType = &v
} | [
0.7866052985191345,
0.4744950532913208,
-0.400532990694046,
0.012336919084191322,
-0.3717496693134308,
-0.48952624201774597,
-0.481130450963974,
-0.8473770022392273,
0.6206738352775574,
-0.056166376918554306,
0.02683068811893463,
0.4097122251987457,
-0.3213658034801483,
0.06016086414456367... |
func (o *NetworkElementSummaryAllOf) GetSystemUpTime() string {
if o == nil || o.SystemUpTime == nil {
var ret string
return ret
}
return *o.SystemUpTime
} | [
0.011345709674060345,
0.024362869560718536,
0.6181586384773254,
0.8079114556312561,
-0.4767882525920868,
-0.1678071916103363,
0.3197990357875824,
0.4572858214378357,
0.6267731189727783,
0.011128111742436886,
-1.1369850635528564,
-1.6645933389663696,
-1.0996270179748535,
0.7978556752204895,... |
func (o *NetworkElementSummaryAllOf) GetSystemUpTimeOk() (*string, bool) {
if o == nil || o.SystemUpTime == nil {
return nil, false
}
return o.SystemUpTime, true
} | [
-0.20197254419326782,
0.010028974153101444,
0.8152564167976379,
0.6662231683731079,
-0.4526643455028534,
-0.22590477764606476,
0.6959495544433594,
1.1738357543945312,
0.1956445723772049,
1.1870613098144531,
-2.303295373916626,
-1.4081774950027466,
-0.2844768762588501,
0.7463593482971191,
... |
func (o *NetworkElementSummaryAllOf) HasSystemUpTime() bool {
if o != nil && o.SystemUpTime != nil {
return true
}
return false
} | [
0.03220841661095619,
0.5774609446525574,
0.8274974226951599,
0.5761717557907104,
-0.2037104219198227,
-0.5187574028968811,
-0.07159604877233505,
0.8092607855796814,
0.6266531348228455,
0.5883285999298096,
-1.8789546489715576,
-1.6924524307250977,
-0.22841790318489075,
1.4835245609283447,
... |
func (o *NetworkElementSummaryAllOf) SetSystemUpTime(v string) {
o.SystemUpTime = &v
} | [
0.180480495095253,
-0.03035283088684082,
0.2991148829460144,
-0.22223244607448578,
-0.7955028414726257,
-0.32963573932647705,
-0.47957924008369446,
-0.29479214549064636,
0.6010072231292725,
0.6107447147369385,
-0.7817975878715515,
-0.1762467324733734,
-0.8320093750953674,
-0.06042638048529... |
func (o *NetworkElementSummaryAllOf) GetThermal() string {
if o == nil || o.Thermal == nil {
var ret string
return ret
}
return *o.Thermal
} | [
0.3783131241798401,
0.8092068433761597,
0.19279678165912628,
0.3665490746498108,
-0.424212247133255,
-0.7609393000602722,
0.33529239892959595,
-0.704418957233429,
0.2462301254272461,
-0.4790594279766083,
0.15759065747261047,
-0.7485427856445312,
-0.29562172293663025,
-0.05547463148832321,
... |
func (o *NetworkElementSummaryAllOf) GetThermalOk() (*string, bool) {
if o == nil || o.Thermal == nil {
return nil, false
}
return o.Thermal, true
} | [
-0.08365330845117569,
0.09995152801275253,
0.4090929925441742,
0.24940451979637146,
-0.2116667777299881,
-0.04185361787676811,
0.673810601234436,
0.9482991695404053,
-0.17618328332901,
0.8285114169120789,
-0.752913773059845,
0.03283761814236641,
0.582544207572937,
0.0955025777220726,
0.2... |
func (o *NetworkElementSummaryAllOf) HasThermal() bool {
if o != nil && o.Thermal != nil {
return true
}
return false
} | [
0.7952525019645691,
0.8630955815315247,
0.28174421191215515,
0.0525582879781723,
0.6488053798675537,
-0.9957952499389648,
-0.23437020182609558,
0.23797161877155304,
-0.26242944598197937,
-0.7550989389419556,
-0.22108851373195648,
-0.797418475151062,
-0.2137605994939804,
0.02034620568156242... |
func (o *NetworkElementSummaryAllOf) SetThermal(v string) {
o.Thermal = &v
} | [
0.5844290256500244,
0.06956420093774796,
-0.1032334640622139,
-0.40434160828590393,
-1.3490140438079834,
-1.0288461446762085,
-0.7898890972137451,
-1.1361393928527832,
-0.2025115191936493,
0.03920763358473778,
0.469181627035141,
1.1602636575698853,
-0.3246343731880188,
-0.9322801828384399,... |
func (o *NetworkElementSummaryAllOf) GetTotalMemory() int64 {
if o == nil || o.TotalMemory == nil {
var ret int64
return ret
}
return *o.TotalMemory
} | [
-0.017984580248594284,
-0.03972308710217476,
0.12467221170663834,
0.35766565799713135,
0.8750966787338257,
-0.4238030016422272,
1.0972915887832642,
-0.4980626106262207,
1.3319514989852905,
-0.4405875504016876,
-0.3095395267009735,
-0.8903864026069641,
-0.5927037596702576,
0.166128844022750... |
func (o *NetworkElementSummaryAllOf) GetTotalMemoryOk() (*int64, bool) {
if o == nil || o.TotalMemory == nil {
return nil, false
}
return o.TotalMemory, true
} | [
-0.04487850144505501,
-0.16640102863311768,
0.49339571595191956,
-0.14533299207687378,
0.42044782638549805,
-0.21948663890361786,
1.118683099746704,
0.5841242671012878,
0.36997929215431213,
0.8635895848274231,
-1.1798721551895142,
-1.4354281425476074,
-0.0649464875459671,
0.334182858467102... |
func (o *NetworkElementSummaryAllOf) HasTotalMemory() bool {
if o != nil && o.TotalMemory != nil {
return true
}
return false
} | [
0.38371986150741577,
-0.6746354699134827,
0.30666249990463257,
-0.5128722190856934,
0.7083882689476013,
-0.8623350858688354,
0.44999852776527405,
0.07897735387086868,
0.8245835900306702,
-0.13674023747444153,
-1.0991851091384888,
-0.7806631326675415,
0.1215706542134285,
0.29282650351524353... |
func (o *NetworkElementSummaryAllOf) SetTotalMemory(v int64) {
o.TotalMemory = &v
} | [
0.06237177178263664,
-0.19782957434654236,
-0.28922972083091736,
-0.2827250063419342,
0.17702889442443848,
-0.5934115052223206,
0.32042524218559265,
-1.4412333965301514,
0.6668729782104492,
0.3188574016094208,
-0.2413325309753418,
0.14988605678081512,
0.056479308754205704,
-0.3003502488136... |
func (o *NetworkElementSummaryAllOf) GetVendor() string {
if o == nil || o.Vendor == nil {
var ret string
return ret
}
return *o.Vendor
} | [
0.6392939686775208,
0.500085711479187,
0.2533871829509735,
0.8898578882217407,
-0.9640968441963196,
0.04300493001937866,
1.0746160745620728,
-0.02296844683587551,
1.0127933025360107,
-0.9212003350257874,
-0.022537585347890854,
-1.2066408395767212,
-0.7254189848899841,
0.8844580054283142,
... |
func (o *NetworkElementSummaryAllOf) GetVendorOk() (*string, bool) {
if o == nil || o.Vendor == nil {
return nil, false
}
return o.Vendor, true
} | [
0.10448723286390305,
0.27533629536628723,
0.6169777512550354,
1.3091704845428467,
-0.1731683909893036,
-0.10235080122947693,
1.3795251846313477,
0.95658940076828,
0.7609884738922119,
0.25047850608825684,
-0.6883949041366577,
-0.702253520488739,
0.07820281386375427,
1.0148955583572388,
0.... |
func (o *NetworkElementSummaryAllOf) HasVendor() bool {
if o != nil && o.Vendor != nil {
return true
}
return false
} | [
0.5117217302322388,
0.326661616563797,
0.34455105662345886,
0.4917908310890198,
-0.005795387085527182,
-0.45853328704833984,
0.6764156222343445,
1.2340919971466064,
0.3689214289188385,
-1.0653090476989746,
-0.5275850296020508,
-1.0124878883361816,
-0.36442801356315613,
1.2398406267166138,
... |
func (o *NetworkElementSummaryAllOf) SetVendor(v string) {
o.Vendor = &v
} | [
0.9769008159637451,
-0.048349734395742416,
-0.1423446387052536,
-0.1343669891357422,
-1.6540729999542236,
-0.2739241421222687,
-0.06265892833471298,
-0.6628587245941162,
0.37021932005882263,
-0.43133190274238586,
0.016511457040905952,
0.5974226593971252,
-0.3841583728790283,
0.173555344343... |
func (o *NetworkElementSummaryAllOf) GetVersion() string {
if o == nil || o.Version == nil {
var ret string
return ret
}
return *o.Version
} | [
0.7533504366874695,
-0.0052008433267474174,
-0.019756199792027473,
1.0802513360977173,
0.2770935893058777,
0.18782496452331543,
1.4015337228775024,
-0.28206753730773926,
1.087438941001892,
-0.25819751620292664,
-0.34390395879745483,
-1.9026293754577637,
-0.5323137044906616,
0.5575510859489... |
func (o *NetworkElementSummaryAllOf) GetVersionOk() (*string, bool) {
if o == nil || o.Version == nil {
return nil, false
}
return o.Version, true
} | [
0.19123561680316925,
-0.35673388838768005,
0.2463197112083435,
1.170690894126892,
-0.14042580127716064,
0.38495171070098877,
1.040972352027893,
0.45362505316734314,
0.035166382789611816,
1.284332036972046,
-1.1621506214141846,
-1.3531451225280762,
0.17724491655826569,
0.47041329741477966,
... |
func (o *NetworkElementSummaryAllOf) HasVersion() bool {
if o != nil && o.Version != nil {
return true
}
return false
} | [
0.6510692238807678,
-0.19058792293071747,
0.00993037037551403,
0.9522371292114258,
0.5977225303649902,
0.10732768476009369,
0.7668295502662659,
0.9483528137207031,
0.44234031438827515,
-0.3148632347583771,
-0.8194811344146729,
-1.8468188047409058,
-0.4032343924045563,
0.2735027074813843,
... |
func (o *NetworkElementSummaryAllOf) SetVersion(v string) {
o.Version = &v
} | [
0.8833451271057129,
-0.3924785852432251,
-0.16050902009010315,
0.25809556245803833,
-0.9727131724357605,
0.27983030676841736,
0.2522195875644684,
-0.40498214960098267,
0.4657741189002991,
-0.038016125559806824,
-0.4819210171699524,
-0.028904592618346214,
-0.3279910981655121,
-0.28188034892... |
func (o *NetworkElementSummaryAllOf) GetRegisteredDevice() AssetDeviceRegistrationRelationship {
if o == nil || o.RegisteredDevice == nil {
var ret AssetDeviceRegistrationRelationship
return ret
}
return *o.RegisteredDevice
} | [
-0.012973184697329998,
1.711272954940796,
0.20124216377735138,
0.8165035843849182,
0.6514649391174316,
-0.6469947099685669,
1.1766873598098755,
-0.11236098408699036,
0.9670932292938232,
-1.1178686618804932,
0.2373860627412796,
-0.4230737090110779,
-0.6933779716491699,
0.7499575018882751,
... |
func (o *NetworkElementSummaryAllOf) GetRegisteredDeviceOk() (*AssetDeviceRegistrationRelationship, bool) {
if o == nil || o.RegisteredDevice == nil {
return nil, false
}
return o.RegisteredDevice, true
} | [
-0.6027023196220398,
1.105786681175232,
0.3122848570346832,
0.6727741360664368,
0.029804402962327003,
0.017860092222690582,
1.618094563484192,
0.4656696319580078,
0.508019745349884,
0.4770313799381256,
-0.4357670247554779,
-0.28472980856895447,
0.22793801128864288,
1.0210213661193848,
0.... |
func (o *NetworkElementSummaryAllOf) HasRegisteredDevice() bool {
if o != nil && o.RegisteredDevice != nil {
return true
}
return false
} | [
-0.05081479623913765,
1.7247123718261719,
0.15270115435123444,
0.41490864753723145,
1.0355890989303589,
-0.5866280794143677,
1.0334398746490479,
0.7633646726608276,
0.33787351846694946,
-0.9698916673660278,
-0.19017787277698517,
-0.7315575480461121,
0.22516945004463196,
1.390630841255188,
... |
func (o *NetworkElementSummaryAllOf) SetRegisteredDevice(v AssetDeviceRegistrationRelationship) {
o.RegisteredDevice = &v
} | [
0.09149572253227234,
1.538037657737732,
-0.019354837015271187,
0.050901658833026886,
0.26413944363594055,
-0.20454634726047516,
0.8398130536079407,
-0.6361697912216187,
0.6363080739974976,
-0.6741319298744202,
0.5055094957351685,
0.39293721318244934,
0.08341464400291443,
0.1601849496364593... |
func (r *conversationRepository) CreateConversation(userCtx int, c core.Conversation, initialMembers []int) (core.Conversation, error) {
var insertedID = -1
emptyConverstion := core.Conversation{}
_, err := callFunction(r.db, "createConversation", &insertedID, userCtx, c.Title, c.Repourl, pg.Array(initialMembers))
... | [
-0.21563780307769775,
-0.26421552896499634,
0.5098066926002502,
0.17198830842971802,
0.6476224064826965,
0.5214455723762512,
-0.23900894820690155,
-0.6162949800491333,
0.03345238417387009,
0.04638093337416649,
-0.13485805690288544,
-0.6157934665679932,
-1.3407835960388184,
0.38158416748046... |
func (r *conversationRepository) DeleteConversation(id int) error {
res, err := r.db.Exec("DELETE FROM conversation WHERE id = ?;", id)
if err != nil {
return core.NewDataBaseError(err)
}
if res.RowsAffected() == 0 {
return core.ErrNothingChanged
}
return nil
} | [
-0.6135425567626953,
-0.018829504027962685,
0.4310339689254761,
0.19815170764923096,
0.9366151094436646,
-0.5748058557510376,
0.3579902648925781,
-0.6768908500671387,
0.8576087355613708,
0.4190809726715088,
0.2942025661468506,
-1.1707653999328613,
-0.6234185695648193,
1.0517030954360962,
... |
func (r *conversationRepository) IsUserInConversation(userID int, conversationID int) (bool, error) {
var res int
_, err := r.db.Query(&res,
`SELECT COUNT(*) FROM v_joined_member WHERE userid = ? AND conversationId = ?;`,
userID, conversationID)
if err != nil {
return false, core.NewDataBaseError(err)
}
ret... | [
0.3261720538139343,
-0.5453336834907532,
0.6020604968070984,
0.6396276950836182,
-0.14011631906032562,
0.03403745964169502,
-0.12740102410316467,
-0.0448220856487751,
-0.31902623176574707,
0.5588890910148621,
-0.1331675499677658,
-0.4726811647415161,
-1.0268267393112183,
0.2923882305622101... |
func NewConversationRepository(dbSession *pg.DB) core.ConversationRepo {
return &conversationRepository{db: dbSession}
} | [
-0.2043321132659912,
-0.5913537740707397,
0.13219642639160156,
-0.22043128311634064,
-0.5291551947593689,
-0.16009977459907532,
-0.11493930965662003,
-0.002561813686043024,
1.1833089590072632,
0.253452867269516,
0.12977929413318634,
-1.3655441999435425,
-0.34878432750701904,
0.603249490261... |
func (app *builder) Create() Builder {
return createBuilder()
} | [
0.5872562527656555,
0.5343450903892517,
0.10137355327606201,
1.7823307514190674,
-0.2631913125514984,
0.5101088285446167,
-0.26368436217308044,
0.26826635003089905,
0.20070484280586243,
-1.0655931234359741,
0.35460200905799866,
-0.6112073659896851,
-0.55767822265625,
1.2417571544647217,
... |
func (app *builder) WithRules(rules []Rule) Builder {
app.list = rules
return app
} | [
0.7624255418777466,
0.07456059008836746,
0.24923327565193176,
0.707696259021759,
-0.004905029200017452,
0.4235838055610657,
-0.2878077030181885,
0.32193925976753235,
1.1066670417785645,
-0.8893123269081116,
0.3445088863372803,
-0.06604093313217163,
0.649395763874054,
1.0810165405273438,
... |
func (app *builder) Now() (Rules, error) {
if app.list != nil && len(app.list) <= 0 {
app.list = nil
}
if app.list == nil {
return nil, errors.New("there must be at least 1 Rule in order to build a Rules instance")
}
mp := map[string]Rule{}
for _, oneRule := range app.list {
name := oneRule.Name()
mp[na... | [
-0.23732005059719086,
-0.07977604120969772,
0.5572382807731628,
0.5569962859153748,
0.9782833456993103,
0.33744949102401733,
-0.5043134093284607,
0.7114580273628235,
-0.960113525390625,
0.07304119318723679,
-0.5673588514328003,
-0.390442818403244,
0.01627163216471672,
1.1704699993133545,
... |
func Sizeof(objs ...interface{}) (sz uint64) {
for i := range objs {
sz += sizeofInternal(reflect.ValueOf(objs[i]), false, 0)
}
return
} | [
-0.3979114592075348,
0.7192169427871704,
0.5068487524986267,
0.6534559726715088,
-0.35308563709259033,
0.024244137108325958,
0.9161915183067322,
-0.319191038608551,
0.4381784498691559,
0.1900489628314972,
-0.11517997831106186,
-1.3320657014846802,
-0.0773831382393837,
0.7064603567123413,
... |
func MaskPassword(password string) (maskedPassword string) {
regex := regexp.MustCompile(".")
maskedPassword = regex.ReplaceAllString(password, "*")
return maskedPassword
} | [
0.30657821893692017,
-1.0018590688705444,
0.7222129702568054,
1.1778711080551147,
-0.3553934395313263,
0.10396623611450195,
0.33903422951698303,
0.8961901068687439,
1.2556140422821045,
0.7628925442695618,
-0.06929541379213333,
0.47917166352272034,
-0.7199645638465881,
-0.3843424320220947,
... |
func NewChrome(debug bool) Process {
return &chrome{
manager: &processManager{verbose: debug},
}
} | [
0.6881387233734131,
-0.5180553793907166,
0.17215709388256073,
0.581023633480072,
-0.13858215510845184,
0.11229491233825684,
-0.8509795069694519,
-0.5319980382919312,
0.34236449003219604,
-0.02238999679684639,
-0.10761784017086029,
1.3341227769851685,
-0.9008263945579529,
1.1524766683578491... |
func NewConnectioned(ctx context.Context, stype linux.SockType, uid uniqueid.Provider) Endpoint {
return newConnectioned(ctx, stype, uid)
} | [
-0.4136081635951996,
-0.30245786905288696,
0.11648368090391159,
0.6111664772033691,
-0.45710110664367676,
-0.041410673409700394,
0.1146196573972702,
-0.5392749905586243,
1.1162631511688232,
0.43331027030944824,
0.06974738091230392,
1.2813653945922852,
-0.5912008285522461,
0.216717869043350... |
func NewPair(ctx context.Context, stype linux.SockType, uid uniqueid.Provider) (Endpoint, Endpoint) {
a := newConnectioned(ctx, stype, uid)
b := newConnectioned(ctx, stype, uid)
q1 := &queue{ReaderQueue: a.Queue, WriterQueue: b.Queue, limit: defaultBufferSize}
q1.InitRefs()
q2 := &queue{ReaderQueue: b.Queue, Writ... | [
-0.6737814545631409,
-0.9266106486320496,
0.858694851398468,
-0.4233044385910034,
-0.2851707637310028,
-0.19209133088588715,
-0.007070249877870083,
-0.6956161856651306,
0.5878178477287292,
-0.0642596110701561,
0.4953495264053345,
0.06917992979288101,
-0.8443308472633362,
0.7343459129333496... |
func NewExternal(stype linux.SockType, uid uniqueid.Provider, queue *waiter.Queue, receiver Receiver, connected ConnectedEndpoint) Endpoint {
ep := &connectionedEndpoint{
baseEndpoint: baseEndpoint{Queue: queue, receiver: receiver, connected: connected},
id: uid.UniqueID(),
idGenerator: uid,
stype: ... | [
0.0726272389292717,
-0.02019263245165348,
0.495021790266037,
-0.026913337409496307,
-1.0809980630874634,
0.3572483956813812,
-0.5682709217071533,
0.18881341814994812,
0.25570645928382874,
0.38479670882225037,
-0.17215999960899353,
0.7313840985298157,
-0.9289923310279846,
0.5484631657600403... |
func (e *connectionedEndpoint) Type() linux.SockType {
return e.stype
} | [
0.018872901797294617,
0.04837789386510849,
0.2704428732395172,
0.42001062631607056,
0.749321460723877,
0.96449875831604,
0.36771759390830994,
-0.7725676894187927,
0.4129126965999603,
0.16271117329597473,
0.6609036326408386,
0.847996711730957,
-1.0888938903808594,
0.6465017795562744,
0.40... |
func (e *connectionedEndpoint) isBound() bool {
return e.path != "" && e.acceptedChan == nil
} | [
0.24990765750408173,
-1.0167855024337769,
0.6452085971832275,
0.05413657799363136,
0.8319059014320374,
0.8002675175666809,
-1.0596578121185303,
0.6662811636924744,
0.291795015335083,
0.08998890221118927,
-0.22258777916431427,
0.822311520576477,
-0.5052295327186584,
1.1137014627456665,
0.... |
func (e *connectionedEndpoint) Close(ctx context.Context) {
var acceptedChan chan *connectionedEndpoint
e.Lock()
var (
c ConnectedEndpoint
r Receiver
)
switch {
case e.Connected():
e.connected.CloseSend()
e.receiver.CloseRecv()
// Still have unread data? If yes, we set this into the write
// end so th... | [
-0.19480538368225098,
-0.8204812407493591,
0.6598781943321228,
-0.345054566860199,
0.07285120338201523,
0.5266607403755188,
-0.04061966761946678,
-0.43859219551086426,
-0.12837901711463928,
-0.3893834948539734,
0.7952234745025635,
-0.38448840379714966,
-0.31327927112579346,
0.6231182813644... |
func (e *connectionedEndpoint) Connect(ctx context.Context, server BoundEndpoint) *syserr.Error {
returnConnect := func(r Receiver, ce ConnectedEndpoint) {
e.receiver = r
e.connected = ce
// Make sure the newly created connected endpoint's write queue is updated
// to reflect this endpoint's send buffer size.
... | [
-0.4988705813884735,
-0.7228444218635559,
0.5444254875183105,
0.3012988567352295,
-0.1534140706062317,
0.12901611626148224,
0.12941764295101166,
-0.4472288191318512,
-0.2182655781507492,
-0.01684379205107689,
-0.3140208423137665,
0.22488798201084137,
-0.1777963638305664,
0.822925329208374,... |
func (e *connectionedEndpoint) Listen(ctx context.Context, backlog int) *syserr.Error {
e.Lock()
defer e.Unlock()
if e.ListeningLocked() {
// Adjust the size of the channel iff we can fix existing
// pending connections into the new one.
if len(e.acceptedChan) > backlog {
return syserr.ErrInvalidEndpointSta... | [
0.4225764572620392,
-0.45678508281707764,
0.7422255873680115,
-0.5498159527778625,
0.164099782705307,
0.11242908984422684,
0.044459737837314606,
-0.15128540992736816,
-0.14807352423667908,
-0.10960421711206436,
0.5540218353271484,
0.348100483417511,
-0.2998603582382202,
-0.0010799120645970... |
func (e *connectionedEndpoint) Accept(ctx context.Context, peerAddr *Address) (Endpoint, *syserr.Error) {
e.Lock()
if !e.ListeningLocked() {
e.Unlock()
return nil, syserr.ErrInvalidEndpointState
}
ne, err := e.getAcceptedEndpointLocked(ctx)
e.Unlock()
if err != nil {
return nil, err
}
if peerAddr != ni... | [
-0.3927568197250366,
-0.7316408157348633,
0.6346232891082764,
-0.14949126541614532,
-0.3122336268424988,
0.20835968852043152,
0.28528353571891785,
0.29852351546287537,
0.11831934750080109,
0.8621538877487183,
0.7309807538986206,
0.0382847860455513,
-0.41903406381607056,
0.13385604321956635... |
func (e *connectionedEndpoint) getAcceptedEndpointLocked(ctx context.Context) (*connectionedEndpoint, *syserr.Error) {
// Accept connections from within the sentry first, since this avoids
// an RPC to the gofer on the common path.
select {
case ne := <-e.acceptedChan:
return ne, nil
default:
// No internal co... | [
-0.21502529084682465,
0.054637644439935684,
0.970572829246521,
0.14803782105445862,
-0.7508490085601807,
0.4028416872024536,
0.3470394015312195,
-0.6952847242355347,
-0.15847961604595184,
-0.22000545263290405,
0.3210415244102478,
1.1216168403625488,
-0.9607399702072144,
0.3634844124317169,... |
func (e *connectionedEndpoint) Bind(addr Address) *syserr.Error {
e.Lock()
defer e.Unlock()
if e.isBound() || e.ListeningLocked() {
return syserr.ErrAlreadyBound
}
if addr.Addr == "" {
// The empty string is not permitted.
return syserr.ErrBadLocalAddress
}
// Save the bound address.
e.path = addr.Addr
... | [
0.06729467958211899,
-0.49010276794433594,
0.5926476120948792,
0.25255557894706726,
0.09357336163520813,
0.1408507078886032,
0.36996525526046753,
0.3582705855369568,
0.6128142476081848,
-0.141065314412117,
0.5121057629585266,
0.772205650806427,
-0.3546798825263977,
0.5696653723716736,
1.... |
func (e *connectionedEndpoint) SendMsg(ctx context.Context, data [][]byte, c ControlMessages, to BoundEndpoint) (int64, func(), *syserr.Error) {
// Stream sockets do not support specifying the endpoint. Seqpacket
// sockets ignore the passed endpoint.
if e.stype == linux.SOCK_STREAM && to != nil {
return 0, nil, s... | [
-0.4392232596874237,
0.5110992789268494,
0.5674198865890503,
0.46398770809173584,
0.32081350684165955,
0.178921639919281,
0.11864499002695084,
-0.01661519892513752,
0.2469130903482437,
0.15120138227939606,
0.001094714505597949,
-0.2517955005168915,
-0.3022052049636841,
0.7415931820869446,
... |
func (e *connectionedEndpoint) Readiness(mask waiter.EventMask) waiter.EventMask {
e.Lock()
defer e.Unlock()
ready := waiter.EventMask(0)
switch {
case e.Connected():
if mask&waiter.ReadableEvents != 0 && e.receiver.Readable() {
ready |= waiter.ReadableEvents
}
if mask&waiter.WritableEvents != 0 && e.con... | [
-0.5171186923980713,
-0.8181835412979126,
0.7931423187255859,
0.07560141384601593,
0.16155877709388733,
-0.11656279861927032,
0.2331346869468689,
-0.3075689375400543,
0.16062729060649872,
0.20539973676204681,
0.576448917388916,
-0.19406412541866302,
-0.7873921394348145,
0.35638412833213806... |
func UpdateCommand(cli *cli.SensuCli) *cobra.Command {
cmd := &cobra.Command{
Use: "update [NAME]",
Short: "update handlers",
SilenceUsage: false,
RunE: func(cmd *cobra.Command, args []string) error {
// Print out usage if we do not receive one argument
if len(args) != 1 {
_ = cmd.Hel... | [
-0.13029950857162476,
-1.1003000736236572,
0.7225856781005859,
-0.40237492322921753,
-0.2432951033115387,
1.115733027458191,
0.3906581401824951,
-0.3768058717250824,
0.07833012193441391,
-0.0986025333404541,
0.3282549977302551,
0.7425241470336914,
-0.5177474021911621,
0.3492913246154785,
... |
func (r *Request) Lookup(transport http.RoundTripper) (*Response, error) {
c := http.Client{Transport: transport}
params := r.Values().Encode()
if len(params) == 0 {
return nil, fmt.Errorf("Missing address or latlng argument")
}
u := fmt.Sprintf("%s?%s", api, params)
getResp, err := c.Get(u)
if err != nil {
... | [
-0.915185809135437,
-0.3490879237651825,
0.9368610382080078,
-0.7589325308799744,
-0.5155272483825684,
-0.10438486933708191,
-0.09146013855934143,
-0.40320876240730286,
0.48804327845573425,
0.43524277210235596,
0.8614835143089294,
-0.0383654423058033,
-0.0474562868475914,
-0.60816532373428... |
func (r *Response) Parse(includePartialMatch bool, requireNumber bool) []Address {
if r.Status != "OK" {
return nil
}
result := make([]Address, 0, len(r.Results))
for _, re := range r.Results {
if re.PartialMatch && !includePartialMatch {
continue
}
addr := Address{}
addr.AddrStr = re.Address
add... | [
-0.45841020345687866,
-0.9232109785079956,
0.8124457001686096,
-0.3724961578845978,
-0.6664779782295227,
-0.20396773517131805,
0.17721690237522125,
0.3707487881183624,
0.9563406705856323,
0.0539761483669281,
-0.2989179790019989,
-0.36875680088996887,
-1.102475881576538,
-0.2049361318349838... |
func (o *GetAccountBalanceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetAccountBalanceOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result... | [
-0.1716940850019455,
-1.2361547946929932,
0.9518243670463562,
0.1881578266620636,
0.41769272089004517,
-0.6100685596466064,
0.17163816094398499,
-0.662549614906311,
0.8379384875297546,
0.06787529587745667,
0.8794472217559814,
-0.3549462854862213,
-0.8675636053085327,
0.09513189643621445,
... |
func NewGetAccountBalanceOK() *GetAccountBalanceOK {
return &GetAccountBalanceOK{}
} | [
0.10249138623476028,
-1.258992075920105,
0.4144778847694397,
0.5223517417907715,
-0.05221260339021683,
-0.05743233114480972,
0.8428763747215271,
0.10214399546384811,
0.10822612792253494,
-0.20953181385993958,
-0.20230869948863983,
-0.2179872691631317,
0.4294705390930176,
0.2825602889060974... |
func NewGetAccountBalanceBadRequest() *GetAccountBalanceBadRequest {
return &GetAccountBalanceBadRequest{}
} | [
-0.4102158546447754,
-1.0527597665786743,
0.5095439553260803,
0.6319799423217773,
0.18038582801818848,
-0.14135828614234924,
-0.542746365070343,
0.2822178602218628,
-0.21206696331501007,
-0.9799743294715881,
0.6185541152954102,
0.6266656517982483,
-0.4561447501182556,
0.5221884846687317,
... |
func NewGetAccountBalanceNotFound() *GetAccountBalanceNotFound {
return &GetAccountBalanceNotFound{}
} | [
-0.03177109733223915,
-1.6999218463897705,
0.043007925152778625,
0.1087595745921135,
0.4206424653530121,
0.8246338367462158,
0.7313950657844543,
0.10983048379421234,
0.3360067307949066,
-0.7582931518554688,
0.09361479431390762,
0.39428451657295227,
-0.28673091530799866,
0.03085599094629287... |
func (_m *EventAPIRepository) Create(ctx context.Context, tenant string, item *model.EventDefinition) error {
ret := _m.Called(ctx, tenant, item)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, *model.EventDefinition) error); ok {
r0 = rf(ctx, tenant, item)
} else {
r0 = ret.Error(0)
}
r... | [
0.13338647782802582,
-0.3531196713447571,
0.2275947630405426,
0.8066931366920471,
0.9896625876426697,
0.6595128178596497,
0.3130257725715637,
0.30749157071113586,
-0.3664315938949585,
-0.1694096475839615,
-0.3369062840938568,
-0.4159809947013855,
0.2701461613178253,
-0.07050830125808716,
... |
func (_m *EventAPIRepository) CreateGlobal(ctx context.Context, item *model.EventDefinition) error {
ret := _m.Called(ctx, item)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *model.EventDefinition) error); ok {
r0 = rf(ctx, item)
} else {
r0 = ret.Error(0)
}
return r0
} | [
0.0421246774494648,
0.041787970811128616,
0.6703980565071106,
0.45328930020332336,
0.2706715166568756,
0.9674293398857117,
0.8534248471260071,
0.5334753394126892,
0.049592725932598114,
0.43294084072113037,
-0.6670971512794495,
0.37172427773475647,
-0.4389651119709015,
-0.2191855013370514,
... |
func (_m *EventAPIRepository) Delete(ctx context.Context, tenantID string, id string) error {
ret := _m.Called(ctx, tenantID, id)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
r0 = rf(ctx, tenantID, id)
} else {
r0 = ret.Error(0)
}
return r0
} | [
0.37789154052734375,
-0.49651384353637695,
0.501241147518158,
0.5894240140914917,
0.3946742117404938,
0.11287367343902588,
-0.016535189002752304,
0.18257462978363037,
0.5436508655548096,
-0.21435996890068054,
0.42550718784332275,
0.11103526502847672,
-0.2557697296142578,
0.4280948340892792... |
func (_m *EventAPIRepository) DeleteAllByBundleID(ctx context.Context, tenantID string, bundleID string) error {
ret := _m.Called(ctx, tenantID, bundleID)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
r0 = rf(ctx, tenantID, bundleID)
} else {
r0 = ret.Error(0)
}
re... | [
0.6720154285430908,
-0.6524745225906372,
0.41611728072166443,
0.7419784665107727,
-0.3093528747558594,
0.05036555603146553,
0.5810533761978149,
0.27784645557403564,
-0.008723190054297447,
-0.21287588775157928,
0.41781213879585266,
-0.18889197707176208,
0.12635719776153564,
1.16474831104278... |
func (_m *EventAPIRepository) DeleteGlobal(ctx context.Context, id string) error {
ret := _m.Called(ctx, id)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
r0 = rf(ctx, id)
} else {
r0 = ret.Error(0)
}
return r0
} | [
-0.4295612573623657,
-0.1474156379699707,
0.6366583108901978,
0.16889281570911407,
-0.39091894030570984,
0.7108399271965027,
0.6650906801223755,
0.5071152448654175,
0.19087840616703033,
-0.09832488745450974,
-0.3276660144329071,
0.5413315296173096,
-0.6678332090377808,
0.36529773473739624,... |
func (_m *EventAPIRepository) GetByApplicationID(ctx context.Context, tenantID string, id string, appID string) (*model.EventDefinition, error) {
ret := _m.Called(ctx, tenantID, id, appID)
var r0 *model.EventDefinition
if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *model.EventDefinition); o... | [
0.9274234771728516,
-0.45181044936180115,
0.3593593239784241,
1.019914150238037,
0.11849134415388107,
0.05399588122963905,
0.2553272247314453,
-0.004470241721719503,
0.26706814765930176,
0.13546887040138245,
0.03132765367627144,
0.7809502482414246,
0.6613151431083679,
0.4100736677646637,
... |
func (_m *EventAPIRepository) GetByID(ctx context.Context, tenantID string, id string) (*model.EventDefinition, error) {
ret := _m.Called(ctx, tenantID, id)
var r0 *model.EventDefinition
if rf, ok := ret.Get(0).(func(context.Context, string, string) *model.EventDefinition); ok {
r0 = rf(ctx, tenantID, id)
} else... | [
0.7660378217697144,
-0.6616299748420715,
0.4767008423805237,
0.28356561064720154,
0.1713920384645462,
-0.13546839356422424,
-0.010757793672382832,
0.061644695699214935,
0.16918037831783295,
-0.07288610190153122,
-0.48981600999832153,
1.2634925842285156,
0.2631629705429077,
0.57147884368896... |
func (_m *EventAPIRepository) GetByIDGlobal(ctx context.Context, id string) (*model.EventDefinition, error) {
ret := _m.Called(ctx, id)
var r0 *model.EventDefinition
if rf, ok := ret.Get(0).(func(context.Context, string) *model.EventDefinition); ok {
r0 = rf(ctx, id)
} else {
if ret.Get(0) != nil {
r0 = ret... | [
-0.03415580838918686,
-0.23217631876468658,
0.5926624536514282,
0.049095604568719864,
-0.14739453792572021,
0.13615228235721588,
0.475680410861969,
0.09010270982980728,
-0.16345632076263428,
-0.09073331207036972,
-0.9509255886077881,
1.2852939367294312,
-0.43270638585090637,
0.304376631975... |
func (_m *EventAPIRepository) GetForBundle(ctx context.Context, tenant string, id string, bundleID string) (*model.EventDefinition, error) {
ret := _m.Called(ctx, tenant, id, bundleID)
var r0 *model.EventDefinition
if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *model.EventDefinition); ok {
... | [
0.47455862164497375,
0.04588647559285164,
0.45768317580223083,
0.5020896792411804,
0.33940863609313965,
-0.3155273199081421,
0.43361443281173706,
0.6376491785049438,
-0.33885982632637024,
-0.5494465231895447,
-0.13383977115154266,
0.4190937280654907,
0.18605893850326538,
0.3534060418605804... |
func (_m *EventAPIRepository) ListByApplicationIDPage(ctx context.Context, tenantID string, appID string, pageSize int, cursor string) (*model.EventDefinitionPage, error) {
ret := _m.Called(ctx, tenantID, appID, pageSize, cursor)
var r0 *model.EventDefinitionPage
if rf, ok := ret.Get(0).(func(context.Context, strin... | [
0.789935827255249,
-0.4306277334690094,
0.4401654005050659,
0.18781085312366486,
0.04188253730535507,
-0.1459955871105194,
0.21749413013458252,
0.1567157506942749,
0.5737117528915405,
0.6734220385551453,
0.41710755228996277,
0.040320299565792084,
0.359773188829422,
1.1564573049545288,
0.... |
func (_m *EventAPIRepository) ListByBundleIDs(ctx context.Context, tenantID string, bundleIDs []string, bundleRefs []*model.BundleReference, totalCounts map[string]int, pageSize int, cursor string) ([]*model.EventDefinitionPage, error) {
ret := _m.Called(ctx, tenantID, bundleIDs, bundleRefs, totalCounts, pageSize, cur... | [
0.47809094190597534,
-0.45813676714897156,
0.40794533491134644,
0.11266233026981354,
0.1696048527956009,
-0.387194961309433,
0.9961244463920593,
0.40665483474731445,
0.03630989417433739,
0.5358789563179016,
0.5169195532798767,
0.3632189929485321,
0.20835551619529724,
0.25523948669433594,
... |
func (_m *EventAPIRepository) ListByResourceID(ctx context.Context, tenantID string, resourceID string, resourceType resource.Type) ([]*model.EventDefinition, error) {
ret := _m.Called(ctx, tenantID, resourceID, resourceType)
var r0 []*model.EventDefinition
if rf, ok := ret.Get(0).(func(context.Context, string, str... | [
0.43588438630104065,
-0.9950163960456848,
0.014181266538798809,
0.15502822399139404,
0.14096924662590027,
-0.21610380709171295,
0.3609565794467926,
-0.33673596382141113,
0.45162519812583923,
0.3855805993080139,
-0.11812064051628113,
0.1684267371892929,
0.5301169157028198,
1.206650495529174... |
func (_m *EventAPIRepository) Update(ctx context.Context, tenant string, item *model.EventDefinition) error {
ret := _m.Called(ctx, tenant, item)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, *model.EventDefinition) error); ok {
r0 = rf(ctx, tenant, item)
} else {
r0 = ret.Error(0)
}
r... | [
0.03919457271695137,
-0.9142338633537292,
0.3994882106781006,
0.4098973274230957,
0.4175083339214325,
0.5781667232513428,
0.36933422088623047,
0.47974294424057007,
0.04097205772995949,
0.23595517873764038,
-0.28133371472358704,
-0.151717409491539,
0.07612346857786179,
-0.5017533898353577,
... |
func (_m *EventAPIRepository) UpdateGlobal(ctx context.Context, item *model.EventDefinition) error {
ret := _m.Called(ctx, item)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *model.EventDefinition) error); ok {
r0 = rf(ctx, item)
} else {
r0 = ret.Error(0)
}
return r0
} | [
-0.4671931266784668,
-0.21507315337657928,
0.7564601302146912,
0.5379893183708191,
-0.291806161403656,
0.9617304801940918,
1.002303957939148,
0.7633402347564697,
-0.07556934654712677,
0.8422064781188965,
-0.778176486492157,
0.7230783700942993,
-0.5297366976737976,
-0.5206665396690369,
-0... |
func NewEventAPIRepository(t mockConstructorTestingTNewEventAPIRepository) *EventAPIRepository {
mock := &EventAPIRepository{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
} | [
-0.654998779296875,
-0.8009890913963318,
0.09849375486373901,
-0.6833232045173645,
-0.10588490962982178,
-0.15781550109386444,
0.3200630247592926,
0.5914855003356934,
0.12385465949773788,
-0.23826709389686584,
-0.26073044538497925,
-1.5561344623565674,
-0.0705971047282219,
0.36874887347221... |
func NewAmaraProvider(cfg *AmaraConfig, svcCfg *captionsConfig.CaptionsServiceConfig) Provider {
return &AmaraProvider{
amara.NewClient(cfg.Username, cfg.Token, cfg.Team),
svcCfg.Logger,
cfg.Username,
cfg.Team,
}
} | [
0.017746534198522568,
-0.22155016660690308,
0.10697197914123535,
-0.12642811238765717,
-1.707184910774231,
0.3837778866291046,
-0.38643431663513184,
0.42513811588287354,
0.9777047038078308,
0.7513672709465027,
-0.23391665518283844,
0.3710339665412903,
-0.24403586983680725,
0.20477087795734... |
func LoadAmaraConfigFromEnv() AmaraConfig {
var providerConfig AmaraConfig
config.LoadEnvConfig(&providerConfig)
return providerConfig
} | [
-0.23118799924850464,
-0.12277093529701233,
0.09840486198663712,
-0.03689268231391907,
-1.152917742729187,
0.301304429769516,
-0.29871535301208496,
0.8526852130889893,
0.17724204063415527,
1.1306575536727905,
-0.8323926329612732,
0.455970823764801,
0.10930746048688889,
1.1678928136825562,
... |
func (c *AmaraProvider) GetName() string {
return "amara"
} | [
-0.5178740620613098,
0.1533840149641037,
0.562674880027771,
0.5249808430671692,
-0.3462066352367401,
0.4300538897514343,
-0.04827631264925003,
0.7762207984924316,
1.7139832973480225,
1.370055913925171,
-0.37640073895454407,
0.6472484469413757,
0.08483008295297623,
0.17183832824230194,
0.... |
func (c *AmaraProvider) Download(id, captionFormat string) ([]byte, error) {
sub, err := c.GetSubtitles(id, "en", captionFormat)
if err != nil {
return nil, err
}
return []byte(sub.Subtitles), nil
} | [
-0.3239074647426605,
-0.4343317151069641,
0.5434894561767578,
0.8014774322509766,
-0.615684986114502,
-0.4880695343017578,
-1.2019490003585815,
0.09740476310253143,
0.8002063632011414,
0.11459777504205704,
-1.0915303230285645,
0.5291975140571594,
-0.3074820935726166,
0.3003503978252411,
... |
func (c *AmaraProvider) GetProviderJob(id string) (*database.ProviderJob, error) {
subs, err := c.GetSubtitles(id, "en", "vtt")
status := "in review"
if err != nil {
return nil, err
}
lang, err := c.GetLanguage(id, "en")
if err != nil {
return nil, err
}
if lang.SubtitlesComplete {
status = "delivered"
... | [
0.0742146298289299,
0.21418780088424683,
0.5074397325515747,
0.16804702579975128,
-0.8114855289459229,
0.2192651480436325,
-0.534650444984436,
1.0572890043258667,
-0.007104863878339529,
0.4644027650356293,
-0.4715074896812439,
0.23996175825595856,
-0.4406384825706482,
0.581712007522583,
... |
func (c *AmaraProvider) DispatchJob(job *database.Job) error {
params := url.Values{}
for k, v := range job.ProviderParams {
params.Add(k, v)
}
params.Add("team", c.team)
params.Add("video_url", job.MediaURL)
video, err := c.CreateVideo(params)
if err != nil {
return fmt.Errorf("could not create video: %v... | [
-0.2365889698266983,
0.3163282573223114,
0.5585488080978394,
0.5204108953475952,
0.19056366384029388,
-0.18068987131118774,
-0.31083953380584717,
0.5252922773361206,
0.24770914018154144,
0.557427167892456,
-0.5238878130912781,
0.3820558786392212,
0.2696149945259094,
0.7879399657249451,
-... |
func (api API) MetricsListActivities(listActivitiesParams *MetricsListActivitiesParams) (*MetricsActivities, error) {
result := &MetricsActivities{}
query := make([]interface{}, 0, 1)
if listActivitiesParams != nil {
query = append(query, *listActivitiesParams)
}
return result, api.list(metricsActivitiesEndpoint... | [
-0.3818035423755646,
0.09649395942687988,
0.3436453640460968,
0.46707820892333984,
-0.09430136531591415,
-0.7149780988693237,
0.7784572839736938,
-0.8027734160423279,
0.9428749084472656,
-0.19411006569862366,
0.6394691467285156,
1.0187430381774902,
-0.42447787523269653,
-0.3665099740028381... |
func CreateSession(ctx context.Context, identity, password, sessionSecret string) (*User, error) {
data, err := hex.DecodeString(sessionSecret)
if err != nil {
return nil, session.BadDataError(ctx)
}
public, err := x509.ParsePKIXPublicKey(data)
if err != nil {
return nil, session.BadDataError(ctx)
}
switch p... | [
0.07653044164180756,
-0.09070425480604172,
0.552018404006958,
0.37572434544563293,
0.1888110339641571,
0.278097927570343,
-0.43833038210868835,
-0.9031112790107727,
0.9268432855606079,
0.3197847306728363,
-0.2710079848766327,
-0.4706959128379822,
-0.6506142616271973,
-0.40757307410240173,
... |
func New() *Prque {
return &Prque{newSstack()}
} | [
-0.13808058202266693,
-0.41414105892181396,
0.10842940956354141,
-0.1560869663953781,
-0.3571036159992218,
-0.2236296385526657,
-1.1316053867340088,
-0.2830671966075897,
-1.0595812797546387,
-0.1331583559513092,
-0.3834957778453827,
0.5148575305938721,
0.06925658881664276,
0.58655774593353... |
func (p *Prque) Push(data interface{}, priority float32) {
heap.Push(p.cont, &item{data, priority})
} | [
0.375720739364624,
0.6780784130096436,
0.40473195910453796,
-0.5031692981719971,
0.1559174656867981,
0.9540471434593201,
-1.6278420686721802,
0.2129659354686737,
-0.16805344820022583,
0.3969123661518097,
-0.5641687512397766,
0.8867135643959045,
-0.3914525508880615,
0.24301870167255402,
1... |
func (p *Prque) Pop() (interface{}, float32) {
item := heap.Pop(p.cont).(*item)
return item.value, item.priority
} | [
-0.3194359540939331,
0.020597945898771286,
0.7246218919754028,
-0.48765331506729126,
-0.06857296079397202,
0.5377185940742493,
-0.9657443761825562,
0.18387463688850403,
-0.8800650835037231,
0.9438608884811401,
-0.6724650859832764,
-0.31287696957588196,
-0.17937496304512024,
-0.099905692040... |
func (p *Prque) Empty() bool {
return p.cont.Len() == 0
} | [
-0.9772074818611145,
-0.4149225354194641,
0.34017542004585266,
-0.9822102189064026,
0.9034264087677002,
1.3906197547912598,
-0.5961247086524963,
0.3535192906856537,
-0.9463118314743042,
0.9817293286323547,
-0.028355976566672325,
0.49814867973327637,
-1.2647637128829956,
-0.0660143941640853... |
func (p *Prque) Size() int {
return p.cont.Len()
} | [
-0.18968704342842102,
0.33295056223869324,
0.32408836483955383,
-1.419567584991455,
0.5183457136154175,
1.2131098508834839,
0.29675108194351196,
0.30806076526641846,
-0.37885019183158875,
0.34844300150871277,
-0.19936329126358032,
0.5204422473907471,
-1.136984944343567,
-0.2061593532562255... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.