text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (o *CreateScopedUserRoleSpacesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.ScopedUserRoleResource != nil { if err := r.SetBodyParam(o.ScopedUserRoleResource); err != nil { return err } ...
[ -0.8946359753608704, -0.1992940604686737, 0.5633958578109741, -0.5773777365684509, 0.848311185836792, 0.4241228401660919, 0.9853494763374329, -0.13092276453971863, 0.21843412518501282, 0.09103865176439285, 0.20444224774837494, 0.5858799815177917, -0.24695464968681335, 0.5743841528892517, ...
func NewPostgresHandler(url string) (Handler, error) { once.Do(func() { opt, err := pg.ParseURL(url) someError = err db := pg.Connect(opt) dbHandler = &PostgresHandler{DB: db} }) return dbHandler, someError }
[ -0.6493996977806091, 0.09140551835298538, 0.39621442556381226, 0.21329547464847565, -0.8109729886054993, -0.5664713382720947, -1.030051350593567, 0.13556303083896637, -1.2742911577224731, -0.02682013064622879, -0.6423008441925049, -0.7035961747169495, -1.4881591796875, 0.2668716013431549, ...
func (h *PostgresHandler) Close() error { return h.DB.Close() }
[ -0.05700961872935295, 0.3791850805282593, 0.28765636682510376, 0.5958848595619202, -0.2969669997692108, 1.2812645435333252, -0.027539748698472977, -0.2616386413574219, -1.9747703075408936, -0.6609014272689819, 0.1572139710187912, -0.40394896268844604, -1.4463376998901367, 1.621160984039306...
func (site *Site) loadTemplates(templates fs.FS) error { templ, err := template.New("site.tmpl").ParseFS(templates, "*.tmpl") if err != nil { return fmt.Errorf("parse failed: %w", err) } site.Template = templ site.BaseTemplate, _ = templ.Clone() return nil }
[ -0.17808414995670319, 0.03364028036594391, 0.22842612862586975, -0.11628306657075882, -0.46201613545417786, -0.4882492125034332, -0.24271106719970703, -0.3734115660190582, 0.5302805304527283, 0.17879906296730042, -1.2577438354492188, -1.0749281644821167, -0.47131526470184326, 0.34310594201...
func (site *Site) loadContent(contentRoot, includes fs.FS) error { return fs.WalkDir(contentRoot, ".", func(path string, d fs.DirEntry, err error) error { if err != nil || d.IsDir() { return err } content, err := fs.ReadFile(contentRoot, path) if err != nil { return fmt.Errorf("failed to load page %q: %...
[ 0.6616774797439575, 0.035116177052259445, 0.648414671421051, 0.02184300683438778, -1.4945203065872192, -0.21790698170661926, 0.17542080581188202, -0.8211703896522522, 0.3523921072483063, 0.2659655511379242, 0.5862956047058105, -0.05477670207619667, -0.3786953389644623, 0.17897158861160278,...
func (site *Site) loadTemplate(includes fs.FS, path string, content []byte) error { page, err := ParseTemplate(includes, path, content) if err != nil { return fmt.Errorf("ParseTemplate: %w", err) } if _, exists := site.Pages[page.Slug]; exists { return fmt.Errorf("duplicate page %q", page.Slug) } site.Pages...
[ 0.000009277174285671208, 0.33045458793640137, 0.4521029591560364, -0.41200631856918335, -0.08325088769197464, -0.7563478946685791, -0.6050251126289368, 0.45184653997421265, 0.22525718808174133, 0.13339070975780487, -0.5336833596229553, -0.5322449803352356, -0.7970398664474487, 0.0960357710...
func (site *Site) loadMarkdown(includes fs.FS, path string, content []byte) error { page, err := ParseMarkdown(includes, path, content) if err != nil { return fmt.Errorf("ParseMarkdown: %w", err) } if _, exists := site.Pages[page.Slug]; exists { return fmt.Errorf("duplicate page %q", page.Slug) } site.Pages...
[ 0.5305899381637573, -0.006142173893749714, 0.7844035029411316, 0.3610419034957886, -0.2857567369937897, 0.021805405616760254, -0.5201181173324585, 0.6813052892684937, 0.7506110668182373, -0.24653036892414093, 0.4961240887641907, -0.247805655002594, -0.8460336923599243, 0.7237399816513062, ...
func (site *Site) linkPages() error { for _, page := range site.Pages { if len(page.FrontMatter.Children) == 0 { continue } for _, slug := range page.FrontMatter.Children { child, ok := site.Pages[slug] if !ok { return fmt.Errorf("unable to find page %q", slug) } page.Children = append(page....
[ -0.06032172217965126, -0.36910608410835266, 0.7051596641540527, -0.8412227630615234, 0.22582638263702393, -0.02246703766286373, 0.36696451902389526, -0.3815358281135559, 0.564227283000946, -0.4581873416900635, 0.09714217483997345, 0.08179069310426712, -0.5500818490982056, 0.832249224185943...
func (site *Site) renderPages() error { root := site.Pages[""] for _, page := range site.Pages { nav := buildNav(root, page) nav.Active = root == page // override index.md active data := PageData{ Nav: nav, Front: &page.FrontMatter, Page: page, } var buf bytes.Buffer if page.Template != "" ...
[ -0.2941933274269104, -0.2352786362171173, 0.6323548555374146, -0.22499753534793854, -0.22354599833488464, -0.3988957703113556, -0.4417932629585266, 0.21184581518173218, 0.9168887138366699, -0.02905530296266079, 0.2194419503211975, 0.05006781220436096, -0.3568509519100189, 0.325825452804565...
func (s *StreamingController) StartStreaming(c *gin.Context) { var err error // Request body validation var requestBody request.StartStreaming err = c.ShouldBindJSON(&requestBody) if err != nil { c.JSON(http.StatusBadRequest, gin.H{ "success": false, "message": errInvalidRequest.Error(), "error": err...
[ 0.10915017873048782, 0.09297332167625427, 1.0292339324951172, 0.27752020955085754, 1.2472492456436157, 0.5104200839996338, 0.4956149756908417, 0.7661255598068237, -0.6135362982749939, 0.7611175775527954, -0.12223825603723526, 0.939497709274292, -0.5915566086769104, 1.7222471237182617, 0....
func (s *StreamingController) StopStreaming(c *gin.Context) { var err error // Request body validation var requestBody request.StopStreaming err = c.ShouldBindJSON(&requestBody) if err != nil { c.JSON(http.StatusBadRequest, gin.H{ "success": false, "message": errInvalidRequest.Error(), "error": err.E...
[ -1.4127639532089233, 0.3258541226387024, 0.8267694711685181, -0.16018259525299072, 0.5278721451759338, 0.388870507478714, 0.01212666928768158, -0.2536557912826538, -0.9163780808448792, 1.2626856565475464, -0.2781704068183899, 0.16039250791072845, -1.0869060754776, 0.564638078212738, 0.05...
func (s *StreamingController) GetLatestStreaming(c *gin.Context) { // Get the latest streaming data from DB db := dbConn.OpenConnection() defer db.Close() var resp response.GetLatestStreaming streamingQuery := "SELECT streamings.id, name, start_time, end_time, rule_id, value FROM streamings INNER JOIN rules ON s...
[ -0.46879997849464417, 0.5432788133621216, 0.788341224193573, 0.640333354473114, 0.33240383863449097, 0.07421156764030457, -0.5364471077919006, -0.32225334644317627, -0.6743783354759216, 0.7617958784103394, -0.21594811975955963, 0.6204599142074585, -0.8467461466789246, 0.7858698964118958, ...
func (s *StreamingController) GetAllStreaming(c *gin.Context) { // Get all streaming data from DB db := dbConn.OpenConnection() defer db.Close() rows, err := db.Query("SELECT streamings.id, name, start_time, end_time, rule_id, value FROM streamings INNER JOIN rules ON streamings.rule_id = rules.id ORDER BY start_t...
[ -0.23963284492492676, 0.1453378051519394, 1.065799593925476, 0.954250156879425, -0.03596313297748566, 0.11333652585744858, -0.44929900765419006, -0.19273263216018677, -0.5394070744514465, 0.5545826554298401, -0.3087751269340515, 0.5745156407356262, -0.7107333540916443, 1.5724154710769653, ...
func (s *StreamingController) GetStreamingByID(c *gin.Context) { // Get streaming ID from the path variable streamingID := c.Param("id") // Get the streaming data based on streaming ID from DB db := dbConn.OpenConnection() defer db.Close() var resp response.GetStreamingByID streamingQuery := "SELECT streaming...
[ -0.07136090099811554, 0.492643266916275, 0.626728892326355, 0.5439232587814331, -0.11790510267019272, 0.03932656720280647, 0.10094206035137177, -0.3988465964794159, -0.3634466826915741, 0.8281081914901733, -0.5395342111587524, 0.568828821182251, -0.8334637880325317, 1.0169109106063843, 0...
func TestGitHubIssueMapping(t *testing.T) { // given resource.Require(t, resource.UnitTest) var gitData = []remoteData{ // JSON data file of Github issue with assignee to test that the data is getting correctly Mapped through the Map function // Github Issue API URL for the respective JSON data file to update th...
[ -0.6709259152412415, -0.09667034447193146, 0.7604783773422241, -0.2587520182132721, 0.5581395626068115, 1.546097993850708, -0.1823323518037796, 0.5762484073638916, 0.2948773205280304, -0.1576959788799286, -0.7758908867835999, 0.4076594412326813, -0.08617299795150757, -0.2402527779340744, ...
func TestJiraIssueMapping(t *testing.T) { // given resource.Require(t, resource.UnitTest) // JSON data to test the issue mapping for jira var jiraData = []remoteData{ // JSON data file of Jira issue with null assignee // Issue API URL for the respective JSON file to update the cache {"jira_issue_without_assig...
[ -1.0753928422927856, -0.36157548427581787, 0.7282125353813171, -0.32063940167427063, -0.044116176664829254, 0.8914745450019836, 0.3225161135196686, -0.009352704510092735, 0.4733469486236572, -0.03621698170900345, -0.3439258635044098, -0.1757684201002121, 0.13714808225631714, -0.27706295251...
func TestFlattenGithubResponseMap(t *testing.T) { resource.Require(t, resource.UnitTest) // JSON data to test the issue mapping for github var gitData = []remoteData{ // JSON data file of Github issue with assignee to test that the data // is getting correctly Mapped through the Map function // Github Issue A...
[ -0.24424304068088531, -0.5240185856819153, 0.6873639822006226, -0.7973406314849854, 0.9651728868484497, 1.3950787782669067, 0.3006402552127838, 0.29602810740470886, 0.7415844798088074, -0.8026420474052429, -0.2514389753341675, 0.28438466787338257, -0.7700057029724121, -0.07272477447986603,...
func TestFlattenGithubResponseMapWithoutAssignee(t *testing.T) { // given resource.Require(t, resource.UnitTest) // JSON data to test the issue mapping for github var gitData = []remoteData{ // Github data with labels and without assignee // assignees field is skipped if that is an empty array {"github_issue_...
[ -0.49790728092193604, -0.5046921372413635, 0.5534369945526123, -0.823675274848938, 0.5221072435379028, 1.7555500268936157, 0.4240003824234009, 0.01744161732494831, 0.5378649234771729, -0.9272356629371643, 0.09551120549440384, -0.044397033751010895, -0.8643127679824829, 0.22653692960739136,...
func (m *Match) Validate(formats strfmt.Registry) error { var res []error if err := m.validatePositions(formats); err != nil { res = append(res, err) } if err := m.validateSettings(formats); err != nil { res = append(res, err) } if err := m.validateUsers(formats); err != nil { res = append(res, err) } ...
[ 0.1634860783815384, 0.36163344979286194, 0.3830053508281708, 0.46014630794525146, 0.07935284078121185, 0.2203037440776825, 0.2647767961025238, -0.4645920693874359, -0.47159475088119507, -0.07706235349178314, 0.4497230052947998, -0.5000882148742676, -1.0867141485214233, 0.3278551995754242, ...
func (m *MatchPositions) Validate(formats strfmt.Registry) error { return nil }
[ -0.041517384350299835, 0.03261776268482208, 0.3961327373981476, -0.32656416296958923, 0.42778074741363525, 0.41714921593666077, 0.9293279647827148, 0.2842867076396942, -0.14554019272327423, -0.6170661449432373, 0.010180115699768066, -0.97959965467453, -0.9306676983833313, 0.370722562074661...
func (m *MatchSettings) Validate(formats strfmt.Registry) error { return nil }
[ -0.10900576412677765, 0.9206072092056274, 0.37942421436309814, -0.013549317605793476, 0.695428729057312, 0.12058807164430618, 0.7165697813034058, -0.3133278489112854, -0.5691525340080261, -0.12643980979919434, 0.2689349055290222, -0.6364203095436096, -1.0123960971832275, 0.3934162557125091...
func (m *MatchUsersItems0) Validate(formats strfmt.Registry) error { return nil }
[ 0.29918015003204346, -0.3365419805049896, 0.2891872823238373, 0.48036178946495056, 0.015817008912563324, 0.30978238582611084, 0.8690672516822815, 0.7840743660926819, -0.11899136006832123, -0.7862271070480347, -0.0872655138373375, -0.4200928807258606, -0.08582707494497299, 0.470871776342391...
func TestLogStoreStreamLogs(t *testing.T) { // require.Fail(t, "test me") }
[ 0.2419295608997345, 0.04439040273427963, 0.4229356646537781, -0.20711977779865265, -0.4870571494102478, 0.7904055118560791, 0.7689459323883057, -0.8400090336799622, 1.0518989562988281, -0.3904249966144562, -0.8281707763671875, 0.47521811723709106, -0.4716547727584839, -0.002897582948207855...
func NewDoClient(apiVersion string) *DoClient { tmpClient, _ := getClient(apiVersion) return &DoClient{ apiVersion: apiVersion, client: tmpClient, } }
[ -0.5381284356117249, -0.6796221137046814, 0.07435576617717743, -0.715556263923645, -1.1084624528884888, -0.1337939202785492, 0.2205686718225479, -0.4939458668231964, 0.29001379013061523, -0.17009375989437103, -0.6395921111106873, 0.4204019606113434, -0.4262614846229553, -0.4668536484241485...
func (this *DoClient) CreateDroplet(name string, region string, size string, image string) (interface{}, error) { return this.client.CreateDroplet(name, region, size, image) }
[ -0.17548561096191406, 0.3569974899291992, 0.3387775123119354, -0.8359535336494446, -0.29357513785362244, 0.22565528750419617, -0.9460920095443726, -1.1369305849075317, 0.22430405020713806, -0.2866656482219696, 0.20394322276115417, -0.20501016080379486, -0.21954645216464996, -0.550931692123...
func (this *DoClient) ListDroplets() (interface{}, error) { return this.client.ListDroplets() }
[ -0.5372489094734192, 0.16911205649375916, 0.50999915599823, -0.7786956429481506, -0.6779696345329285, 0.5281269550323486, -0.4550814628601074, -0.8621519804000854, 0.5817985534667969, -0.25274592638015747, -0.44607964158058167, 0.4561464190483093, -0.6654424071311951, 0.3705516755580902, ...
func (this *DoClient) DeleteDroplet(dropletId int64) error { return this.client.DeleteDroplet(dropletId) }
[ -0.2583753168582916, 0.7115099430084229, 0.12770429253578186, -0.1482248455286026, -0.03511843830347061, 0.4608170688152313, -0.36979517340660095, -0.8728399872779846, 1.3609734773635864, -0.7794139385223389, 0.19835081696510315, 0.12766706943511963, -0.03726937621831894, -0.00131937430705...
func (this *DoClient) ActionsDroplet(dropletId int64) (interface{}, error) { return this.client.ActionsDroplet(dropletId) }
[ -1.22835373878479, -0.19722753763198853, 0.35236677527427673, -0.3295985162258148, 0.4113912284374237, -0.036791715770959854, 0.3657059371471405, -1.0910272598266602, 0.9504973888397217, -0.1181454285979271, -0.11402381956577301, 0.2609068751335144, -0.050956353545188904, 0.035401970148086...
func (this *DoClient) RebootDroplet(dropletId int64) (interface{}, error) { return this.client.RebootDroplet(dropletId) }
[ -1.3280701637268066, 0.617705762386322, 0.3253747224807739, 0.40047889947891235, -0.6139326095581055, 0.045209161937236786, 0.13529574871063232, -1.0155318975448608, 0.9788988828659058, -0.21892787516117096, -0.4148838520050049, 0.14300218224525452, -0.5694189667701721, -0.3665803074836731...
func (this *DoClient) PowerCycleDroplet(dropletId int64) (interface{}, error) { return this.client.PowerCycleDroplet(dropletId) }
[ -0.6515687704086304, 0.0899224504828453, 0.3866695463657379, -0.4039757251739502, -0.2523634731769562, 0.22586414217948914, -0.4566786587238312, -1.0754287242889404, -0.012837881222367287, -0.4263143837451935, 0.07452190667390823, 0.0045538670383393764, -0.4250142276287079, 0.1010999307036...
func (this *DoClient) ShutdownDroplet(dropletId int64) (interface{}, error) { return this.client.ShutdownDroplet(dropletId) }
[ -1.9426015615463257, 0.27206388115882874, 0.26328906416893005, -0.5309306979179382, -0.7075678110122681, 0.48074841499328613, 0.6408735513687134, -1.235023856163025, 1.0321332216262817, -0.2079397290945053, -0.3675810396671295, -0.5195530652999878, -0.7791184782981873, -0.06963095813989639...
func (this *DoClient) PowerOffDroplet(dropletId int64) (interface{}, error) { return this.client.PowerOffDroplet(dropletId) }
[ -1.0819870233535767, 0.18677440285682678, 0.314880907535553, -0.47901588678359985, -0.5591505765914917, 0.5871949791908264, -0.1056341603398323, -0.7358834147453308, 0.02418922819197178, -0.1405690610408783, 0.10834070295095444, -0.5524537563323975, -0.6874372363090515, 0.12848803400993347...
func (this *DoClient) PasswordResetDroplet(dropletId int64) (interface{}, error) { return this.client.PasswordResetDroplet(dropletId) }
[ -1.0626845359802246, 0.7062572240829468, 0.4349958300590515, -0.5537799596786499, 0.0740770548582077, -0.05862446874380112, 0.2336397022008896, -0.4989822506904602, 0.3170563578605652, 0.5902596712112427, -0.5207161903381348, 0.3281380534172058, -0.5036925673484802, -0.6829474568367004, ...
func (this *DoClient) ResizeDroplet(dropletId int64, size string) (interface{}, error) { return this.client.ResizeDroplet(dropletId, size) }
[ -1.1962789297103882, 0.8248691558837891, 0.3584805727005005, -0.4532535672187805, -0.7478391528129578, -0.17083096504211426, -0.7093531489372253, -0.8923423290252686, 0.737511157989502, -0.2971037030220032, -0.4872443377971649, -0.32080578804016113, -0.4894118309020996, -0.8391126394271851...
func (this *DoClient) RestoreDroplet(dropletId int64, backupImage string) (interface{}, error) { return this.client.RestoreDroplet(dropletId, backupImage) }
[ -0.16275659203529358, 0.4341215491294861, 0.3260096609592438, -0.1817089021205902, -0.32525360584259033, -0.5299260020256042, -0.4736611843109131, -0.26700589060783386, 0.779444694519043, -0.3446628153324127, 0.07025977224111557, -0.25570234656333923, -0.9569488167762756, -1.00896561145782...
func (this *DoClient) RebuildDroplet(dropletId int64, image string) (interface{}, error) { return this.client.RebuildDroplet(dropletId, image) }
[ -1.356394648551941, 0.05414282903075218, 0.19775083661079407, -0.34089499711990356, -0.8359588980674744, 0.2196366786956787, 0.04957655444741249, -0.7495411038398743, 0.27408695220947266, -0.41074514389038086, -0.17094045877456665, 0.2077684849500656, -0.35904037952423096, -0.7572644948959...
func (this *DoClient) RenameDroplet(dropletId int64, dropletName string) (interface{}, error) { return this.client.RenameDroplet(dropletId, dropletName) }
[ -0.8642953038215637, -0.27906402945518494, 0.31686243414878845, -0.2622126638889313, -1.167372465133667, -0.13255958259105682, -0.6924158930778503, -1.174570918083191, 0.43922239542007446, 0.2466290444135666, -0.45978590846061707, 1.0231739282608032, 0.213790163397789, -0.5767097473144531,...
func (this *DoClient) EnableIpv6Droplet(dropletId int64) (interface{}, error) { return this.client.EnableIpv6Droplet(dropletId) }
[ -0.944207489490509, -0.3135766386985779, 0.3411404490470886, -0.4771210253238678, -0.3891443610191345, 0.5675501823425293, -0.006755496375262737, -0.42093905806541443, 0.815157413482666, 0.35668206214904785, -0.9128570556640625, -0.3569284677505493, -0.5790050625801086, -0.708251953125, ...
func (this *DoClient) DisableBackupsDroplet(dropletId int64) (interface{}, error) { return this.client.DisableBackupsDroplet(dropletId) }
[ -0.6074976325035095, 0.33612877130508423, 0.5236137509346008, 0.08983520418405533, -0.9343842267990112, 0.8610233068466187, 0.6310209631919861, -0.2635156214237213, 0.34288933873176575, -0.0779009684920311, -0.6740451455116272, -0.8418039679527283, -0.6105880737304688, -0.26764652132987976...
func (this *DoClient) EnablePrivateNetworkingDroplet(dropletId int64) (interface{}, error) { return this.client.EnablePrivateNetworkingDroplet(dropletId) }
[ -1.4215999841690063, 0.7302510142326355, 0.500463604927063, -0.5539659857749939, -0.06627187132835388, 1.1412818431854248, -0.1553221493959427, -0.8247261643409729, 1.1355246305465698, -1.1557652950286865, -1.1141307353973389, -0.5376730561256409, -0.7214383482933044, -0.11779946088790894,...
func (this *DoClient) SnapshotDroplet(dropletId int64) (interface{}, error) { return this.client.SnapshotDroplet(dropletId) }
[ -1.217212200164795, 1.2073458433151245, 0.4157957136631012, -0.16037313640117645, -1.0588842630386353, 0.5494531989097595, -0.11058960109949112, -1.3211753368377686, 1.1449929475784302, -0.46990859508514404, -0.6873434782028198, -0.1551249474287033, 0.21377654373645782, -0.2620063722133636...
func (this *DoClient) ListDomains() (interface{}, error) { return this.client.ListDomains() }
[ -0.6523829698562622, 0.3143519163131714, 0.23245571553707123, 0.14339007437229156, -0.029064618051052094, -0.35808396339416504, -0.28350281715393066, -1.1228876113891602, 1.2010741233825684, -0.695973813533783, -0.309518426656723, 1.243725299835205, -0.5271337032318115, 0.5268332958221436,...
func (this *DoClient) ShowDomain(domainName string) (interface{}, error) { return this.client.ShowDomain(domainName) }
[ -1.2596584558486938, 0.9317987561225891, 0.33011507987976074, -0.18712498247623444, -1.386896014213562, -0.28368598222732544, 0.25171443819999695, -0.5952000021934509, 0.5075176358222961, -0.19161857664585114, -0.0394294373691082, 1.97063148021698, -0.5290592312812805, 0.7109302878379822, ...
func (this *DoClient) CreateDomain(domainName, ipAddress string) (interface{}, error) { return this.client.CreateDomain(domainName, ipAddress) }
[ -0.7797046303749084, 0.7461208701133728, 0.3951476216316223, -0.12040551006793976, -0.011587093584239483, 0.33884143829345703, -0.8577516078948975, -0.6460619568824768, 0.11480898410081863, -0.6732074022293091, -0.0869140475988388, 0.9076404571533203, -0.4136044979095459, -0.37453424930572...
func (this *DoClient) DeleteDomain(domainName string) error { return this.client.DeleteDomain(domainName) }
[ -1.1135244369506836, 0.2384723573923111, 0.22372280061244965, 0.18049561977386475, -0.02632981538772583, 0.390796959400177, -0.18593233823776245, -0.3803512454032898, 0.7741144299507141, -1.3930809497833252, -0.39867448806762695, 1.8446240425109863, -0.9313408136367798, 0.3970601558685303,...
func (this *DoClient) CreateAAAADomainRecord(domainName, alias, data string) (interface{}, error) { return this.client.CreateAAAADomainRecord(domainName, alias, data) }
[ -0.31347012519836426, 0.20032066106796265, 0.46428754925727844, -1.4046753644943237, -0.5775684714317322, 0.8002882599830627, -0.01884998008608818, -0.17282596230506897, 0.07043253630399704, -0.05964856594800949, 0.3781026005744934, 1.0353541374206543, 0.06484918296337128, 0.77647989988327...
func (this *DoClient) CreateADomainRecord(domainName, alias, data string) (interface{}, error) { return this.client.CreateADomainRecord(domainName, alias, data) }
[ -0.11204113811254501, -0.05608486756682396, 0.5779668688774109, -0.8465606570243835, -0.7996243238449097, 0.7772422432899475, -0.5328530073165894, -0.24088217318058014, -0.12626922130584717, 0.004370361566543579, 0.3051410913467407, 0.7120311856269836, -0.2646399140357971, 0.27413806319236...
func (this *DoClient) CreateMXDomainRecord(domainName string, data string, prority int64) (interface{}, error) { return this.client.CreateMXDomainRecord(domainName, data, prority) }
[ -0.5055083632469177, 0.38124629855155945, 0.48006466031074524, 0.16253072023391724, -0.8987525105476379, 0.7827328443527222, -0.8994584083557129, -0.5739226341247559, -0.30818355083465576, -0.37750133872032166, -0.0625452995300293, 0.7925316691398621, -1.1240071058273315, 0.746337652206420...
func (this *DoClient) CreateTXTDomainRecord(domainName, name, data string) (interface{}, error) { return this.client.CreateTXTDomainRecord(domainName, name, data) }
[ -0.16030000150203705, 0.4047761857509613, 0.3471512496471405, -1.3716484308242798, -1.0612258911132812, 0.3776017725467682, -0.4941304326057434, -0.3119325339794159, -0.5188901424407959, 0.023357901722192764, -0.5540826320648193, 0.5545928478240967, -0.775759756565094, 0.09958270192146301,...
func (this *DoClient) CreateNSDomainRecord(domainName, data string) (interface{}, error) { return this.client.CreateNSDomainRecord(domainName, data) }
[ -0.29705601930618286, 0.4368330240249634, 0.2297409027814865, -0.4123731255531311, -0.8880435824394226, 0.4873124063014984, -0.5870166420936584, -0.855841875076294, -0.1992274969816208, -0.4221011996269226, -0.5255171656608582, 1.0615912675857544, -0.7924943566322327, 0.7095108032226562, ...
func (this *DoClient) CreateSRVDomainRecord(domainName string, name string, data string, prority int64, port int64, weight int64) (interface{}, error) { return this.client.CreateSRVDomainRecord(domainName, name, data, prority, port, weight) }
[ -0.29483160376548767, 0.4414779543876648, 0.6936468482017517, 0.207106351852417, -0.5269589424133301, 0.5854060649871826, -0.7435222268104553, -0.7287123799324036, 0.08698327839374542, -0.08309386670589447, -0.4217243790626526, 1.0435465574264526, -0.9064765572547913, 0.1479235142469406, ...
func (this *DoClient) ShowDomainRecord(domainName string, domainRecordId int64) (interface{}, error) { return this.client.ShowDomainRecord(domainName, domainRecordId) }
[ 0.09512478113174438, 0.6083043217658997, 0.39234426617622375, -0.6147240996360779, -1.6239625215530396, 0.08202570676803589, 0.2724231779575348, -0.4950941801071167, -0.007385880686342716, 0.31089961528778076, 0.5610553026199341, 1.8002973794937134, -0.19277746975421906, 1.1214408874511719...
func (this *DoClient) ListDomainRecords(domainName string) (interface{}, error) { return this.client.ListDomainRecords(domainName) }
[ -0.899773359298706, 0.47844141721725464, 0.5423580408096313, -0.4248848557472229, -0.6180359125137329, -0.21140684187412262, -0.19990940392017365, -0.7000438570976257, 0.2474256008863449, 0.293997585773468, 0.029693713411688805, 1.1958401203155518, -1.0892126560211182, 0.7464683055877686, ...
func (this *DoClient) DeleteDomainRecord(domainName string, domainRecordId int64) error { return this.client.DeleteDomainRecord(domainName, domainRecordId) }
[ 0.047776490449905396, -0.2901025712490082, 0.3563903570175171, 0.2517073154449463, -0.6992249488830566, 0.34478944540023804, 0.020356113091111183, -0.34855565428733826, 0.47548457980155945, -0.45817825198173523, 0.30427345633506775, 1.4461133480072021, -0.39201825857162476, 1.2870810031890...
func (this *DoClient) ListImages() (interface{}, error) { return this.client.ListImages() }
[ -0.8501940965652466, 0.12755361199378967, 0.3234119415283203, -0.036984335631132126, 0.030131587758660316, -0.9333698153495789, -0.5942055583000183, -0.875734269618988, 0.5709390640258789, 0.14055874943733215, -0.1243140771985054, 0.33962151408195496, -0.8373762369155884, 0.694811284542083...
func getClient(apiVersion string) (DoProvisioner, error) { if apiVersion == "v2" { return &DoClientV2{}, nil } else if apiVersion == "v1" { //return &DoClientV1{} return nil, errors.New("Api Version v1 is not yet Implemented") } return nil, errors.New("Valid values are v1 and v2 (Only v2 is implemented)") }
[ -0.7172128558158875, -0.19583745300769806, 0.5089935660362244, 0.3221551775932312, -0.49413472414016724, -0.005695620086044073, 0.30278992652893066, -0.22405283153057098, 0.3218318223953247, 0.5493362545967102, 0.013961371034383774, -0.005143954884260893, -0.7687081098556519, -0.3651376664...
func (s *aztestsSuite) TestUserDelegationSASContainer(c *chk.C) { bsu := getBSU() containerURL, containerName := getContainerURL(c, bsu) currentTime := time.Now().UTC() ocred, err := getOAuthCredential("") if err != nil { c.Fatal(err) } // Create pipeline w/ OAuth to handle user delegation key obtaining p :=...
[ 0.5953583121299744, 0.1988629698753357, 0.8963642120361328, 0.22074615955352783, 0.46493855118751526, 0.281049519777298, 0.8427368402481079, -0.4179355204105377, 0.2733951210975647, -0.22769798338413239, 0.09495046734809875, 0.3114137649536133, 0.7234333157539368, 0.19458815455436707, 0....
func (s *aztestsSuite) TestUserDelegationSASBlob(c *chk.C) { // Accumulate prerequisite details to create storage etc. bsu := getBSU() containerURL, containerName := getContainerURL(c, bsu) blobURL, blobName := getBlockBlobURL(c, containerURL) currentTime := time.Now().UTC() ocred, err := getOAuthCredential("") ...
[ 0.9080347418785095, 0.06849977374076843, 1.045017957687378, 0.10001695156097412, 0.5951303243637085, 0.5189346671104431, 0.36968517303466797, -1.0020875930786133, -0.03464977443218231, -0.2586827874183655, -0.19678400456905365, 0.47055715322494507, 0.32306745648384094, 0.2254534214735031, ...
func KnownOperators() []string { var res []string for k := range operators { res = append(res, k) } sort.Strings(res) return res }
[ -0.7464306950569153, -0.5744110345840454, 0.49137061834335327, -0.38320592045783997, -0.8090724349021912, -0.1491585224866867, -0.42895153164863586, -0.15162722766399384, 0.30648913979530334, 0.6634158492088318, -0.2752350866794586, -0.04584459960460663, -0.27940690517425537, 0.26991057395...
func KnownActions() []string { var res []string for k := range actions { res = append(res, k) } sort.Strings(res) return res }
[ 0.03648004308342934, -1.2967747449874878, 0.36653777956962585, 0.266131728887558, 0.08911187201738358, 0.19860190153121948, 0.14964233338832855, -0.7472409009933472, 0.39438679814338684, 0.713152289390564, -0.09380406141281128, 0.47597140073776245, 0.08591316640377045, -0.12511426210403442...
func KnownArchs() []string { var res []string for k := range archs { res = append(res, k) } sort.Strings(res) return res }
[ 0.2963305711746216, -0.32364150881767273, 0.432561993598938, 0.25988253951072693, -0.3528973460197449, 0.451516717672348, -0.24761536717414856, -0.5825976729393005, 0.42743557691574097, 0.5771697163581848, 0.00660933181643486, 0.259660005569458, 0.2760641872882843, -0.3755083382129669, -...
func ConvertStringToOperator(in string) (configs.Operator, error) { if op, ok := operators[in]; ok { return op, nil } return 0, fmt.Errorf("string %s is not a valid operator for seccomp", in) }
[ -0.48394277691841125, -0.9070050716400146, 0.3379227817058563, -0.2503202557563782, -0.4506247341632843, -0.08889246731996536, -0.0220765583217144, 0.6540242433547974, 0.4092921316623688, 0.36398327350616455, -0.06554943323135376, -0.7087502479553223, -0.7879006862640381, -0.69455313682556...
func ConvertStringToAction(in string) (configs.Action, error) { if act, ok := actions[in]; ok { return act, nil } return 0, fmt.Errorf("string %s is not a valid action for seccomp", in) }
[ -0.222737118601799, -1.7558975219726562, 0.20486223697662354, -0.11525037884712219, 0.50464928150177, 0.3229001462459564, 0.7208128571510315, 0.008812748827040195, 0.679455041885376, 0.7555873990058899, -0.133653923869133, 0.9193860292434692, -0.5190854668617249, -0.5178762078285217, 0.0...
func ConvertStringToArch(in string) (string, error) { if arch, ok := archs[in]; ok { return arch, nil } return "", fmt.Errorf("string %s is not a valid arch for seccomp", in) }
[ 0.4387006163597107, -0.6489929556846619, 0.31851762533187866, 0.41231340169906616, -0.31830868124961853, 0.5993115305900574, 0.5560027956962585, 0.14101921021938324, 0.8505825996398926, 0.5444420576095581, 0.16236965358257294, 0.7054228782653809, -0.20248661935329437, -0.5438424944877625, ...
func getPartitionOffsets(module *InMemoryStorage) []*protocol.ConsumerOffset { request := protocol.StorageRequest{ RequestType: protocol.StorageFetchConsumer, Cluster: "testcluster", Group: "testgroup", Reply: make(chan interface{}), } go module.fetchConsumer(&request, module.Log) response ...
[ 0.41196292638778687, -0.6595419645309448, 0.6749107837677002, 0.6289567351341248, 0.33894532918930054, 0.21860647201538086, 0.4758317470550537, -0.4140487313270569, -0.40316838026046753, -0.0020689622033387423, -0.14519482851028442, 0.4985560476779938, -1.4461489915847778, -0.0136040961369...
func TestInMemoryStorage_fetchConsumersForTopic(t *testing.T) { startTime := (time.Now().Unix() * 1000) - 100000 module := startWithTestConsumerOffsets("", startTime) // Set the owners for the test partition request := protocol.StorageRequest{ RequestType: protocol.StorageSetConsumerOwner, Cluster: "testcl...
[ 0.22048881649971008, -0.336416095495224, 0.6118884086608887, 0.30222415924072266, 0.9312549233436584, 0.05412272363901138, -0.22562189400196075, -0.7974295616149902, 0.04936308413743973, -0.1407044678926468, 0.18774032592773438, 0.35526221990585327, -1.1946966648101807, 0.5212315320968628,...
func downloadSuccess(asset Asset, version string, zipPath string, appPath string) { fmt.Println() color.Green.Println("download successfully") color.Green.Println("checksum ...") var err error var onlineSum string onlineSum, err = getOnlineSum(asset, version) if err != nil { handleError(err) return } var...
[ 0.5192571878433228, -0.6310834884643555, 1.031751275062561, 0.4712372422218323, -0.39807695150375366, 0.005324533674865961, 0.33629849553108215, 0.5473794341087341, 0.6226202249526978, 0.9239082932472229, -0.4937589466571808, -0.8283010125160217, 0.7122036218643188, 0.21364825963974, 0.6...
func Open(path string) (*DB, error) { // Open the underlying database. d, err := bolt.Open(path, 0600, &bolt.Options{Timeout: 1 * time.Second}) if err != nil { return nil, err } // Initialize buckets. db := &DB{db: d} if err := db.db.Update(func(tx *bolt.Tx) error { tx.CreateBucketIfNotExists([]byte("messag...
[ -0.34958958625793457, 0.9374788403511047, 0.6436166763305664, -0.2704732120037079, -0.4659586250782013, 0.5312291979789734, 0.5619705319404602, -0.01666189730167389, -0.707632839679718, 0.17181631922721863, -0.42960312962532043, 0.08624941855669022, -0.8691941499710083, -0.1059352755546569...
func (db *DB) Close() error { return db.db.Close() }
[ -0.3134922385215759, 0.7411911487579346, -0.06964294612407684, 0.6270631551742554, -0.25703272223472595, 0.8454095721244812, -0.4124560058116913, -0.7080419659614563, -0.2372046709060669, -0.628043532371521, 0.4299294650554657, 0.137193500995636, -1.3730441331863403, 1.3839330673217773, ...
func (db *DB) AllMessages() ([]*Message, error) { // Retrieve channel ids. var channels []string if err := db.db.View(func(tx *bolt.Tx) error { c := tx.Bucket([]byte("messages")).Cursor() for k, _ := c.First(); k != nil; k, _ = c.Next() { channels = append(channels, string(k)) } return nil }); err != nil...
[ 0.1932496428489685, 0.06390596181154251, 0.4454176425933838, -0.1666719913482666, 1.0561914443969727, -0.4289219081401825, -0.7970537543296814, -0.7827290892601013, -0.1945951282978058, -0.3637891709804535, 0.11652855575084686, 0.07630571722984314, -0.7508267760276794, 1.225215196609497, ...
func (db *DB) Messages(channel string) ([]*Message, error) { var a []*Message err := db.db.View(func(tx *bolt.Tx) error { b := tx.Bucket([]byte("messages")).Bucket([]byte(channel)) if b == nil { return nil } c := b.Cursor() for k, v := c.First(); k != nil; k, v = c.Next() { m := &Message{} if err ...
[ -1.1141691207885742, 0.33616459369659424, 0.49147993326187134, -1.0025732517242432, 0.7877973318099976, -0.5273308157920837, -0.7337419390678406, -1.2724316120147705, -0.32685044407844543, -0.05095651373267174, -0.5190600752830505, 0.2192748785018921, -0.8035098314285278, 0.472244709730148...
func (db *DB) SaveMessages(channel string, a []*Message) error { return db.db.Update(func(tx *bolt.Tx) error { // Create bucket for channel. b, err := tx.Bucket([]byte("messages")).CreateBucketIfNotExists([]byte(channel)) if err != nil { return err } // Iterate over messages and insert. for _, m := ran...
[ -0.9587290287017822, 0.7721761465072632, 0.6026317477226257, -0.8025608062744141, 1.3804445266723633, -0.42697352170944214, 0.046996165066957474, -1.192405343055725, -0.6641834378242493, 1.5786118507385254, -0.9411343932151794, -1.0597411394119263, -1.0218286514282227, 0.8988202214241028, ...
func (db *DB) SetUsers(a []*User) { m := make(map[string]*User) for _, u := range a { m[u.ID] = u } db.Users = m }
[ -1.520277500152588, 0.18840137124061584, 0.128982812166214, 0.14759254455566406, 0.19095735251903534, 0.4865638315677643, -0.41044607758522034, 0.7178864479064941, -0.27409628033638, 0.08093970268964767, -0.43471676111221313, 0.47262871265411377, -0.026715358719229698, 1.3572361469268799, ...
func (pool GenePool) Len() int { return len(pool) }
[ -0.3154972493648529, -0.24444453418254852, -0.014828503131866455, -0.5295359492301941, 0.6623218655586243, 0.3211776316165924, 1.317712426185608, 0.6635366678237915, -0.6071463823318481, -0.3327273428440094, -1.408134937286377, 0.9878249764442444, 0.2318142205476761, -0.003586934646591544,...
func (ga *GA) Init(pool_size uint, data_size uint, fit_func FitnessFunc, p GA_Params) { rand.Seed(time.Now().UTC().UnixNano()) data_bytes := (data_size + 7) / 8 ga.Population = make(GenePool, pool_size) // for _, ind := range ga.Population { for i := range ga.Population { // var ind *Individual i...
[ -0.33720874786376953, 0.13706237077713013, 0.5705360174179077, -0.4076361060142517, 0.5462362170219421, 0.8758895397186279, 0.809298574924469, -0.5581995844841003, -0.7316204905509949, 0.41851672530174255, -0.06166419759392738, 1.5996887683868408, 0.580412745475769, 0.5468234419822693, -...
func (vn *VBoxVMNetwork) Name() string { return vn.name }
[ -0.32650309801101685, 0.029918788000941277, 0.2790535092353821, 0.31911423802375793, -0.05447831004858017, 0.32542741298675537, -0.7379040122032166, -0.5732543468475342, 0.1552235186100006, 0.6960923671722412, -0.8125348091125488, -0.5880995988845825, 0.27491408586502075, 0.035584263503551...
func (vn *VBoxVMNetwork) NetCIDR() string { return vn.netCIDR }
[ 1.2705011367797852, -0.481996089220047, 0.02874589152634144, -0.010366452857851982, -0.012890373356640339, 0.9009199738502502, -0.5888035893440247, -0.3123828172683716, -0.41730889678001404, 0.11574281007051468, 0.33365312218666077, -1.3285613059997559, -0.2506549060344696, 0.4545975625514...
func (o *GetAccountUserReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewGetAccountUserOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil ...
[ -0.1374811977148056, -0.9842842221260071, 0.7725518941879272, 0.7765854597091675, -0.049281757324934006, -0.952868640422821, 0.6876152753829956, -0.3707738220691681, 0.6738247275352478, 0.03895619884133339, 0.7579138278961182, -0.05775022134184837, -0.7926231622695923, -0.44066402316093445...
func NewGetAccountUserOK() *GetAccountUserOK { return &GetAccountUserOK{} }
[ 0.0699109435081482, -0.8026276230812073, 0.22015458345413208, 1.6693720817565918, -0.29373160004615784, -0.7799217104911804, 1.574812412261963, 0.2898741364479065, -0.12434267997741699, -0.5099649429321289, -0.5359101891517639, -0.2786604166030884, 0.2601412236690521, -0.39039909839630127,...
func ensureCollection(ctx context.Context, name string) { _, err := db.Collection(ctx, name) if driver.IsNotFound(err) { _, err = db.CreateCollection(ctx, name, nil) if err != nil { logger.Errorf("[ArangoDB][ensureCollection] failed to create collection '%v': %v", name, err) } } else if err != nil { logge...
[ -0.20969626307487488, -0.23835210502147675, 0.6693390607833862, -0.6321825981140137, 1.1723850965499878, 0.18783818185329437, 0.29346510767936707, -0.6833785772323608, 0.43552857637405396, 0.28078970313072205, 0.23623353242874146, -0.3941289782524109, 0.2416958063840866, 0.5723153352737427...
func SyncRules(labels map[string]string) ([]*latest.SyncRule, error) { metadataJSON, present := labels["io.buildpacks.build.metadata"] if !present { return nil, nil } m := buildMetadata{} if err := json.Unmarshal([]byte(metadataJSON), &m); err != nil { return nil, err } var rules []*latest.SyncRule for _...
[ -0.2306695580482483, 0.013333535753190517, 0.5004222393035889, -0.04245254769921303, 0.6188281774520874, 0.40860408544540405, -0.7359280586242676, 0.21110279858112335, -0.5722742080688477, 1.392320990562439, -0.03859293833374977, 0.7715024948120117, -0.6399125456809998, -0.1033945232629776...
func NewHandler(client client.Client) Handler { return Handler{ client: client, } }
[ 0.9812363386154175, -0.21854206919670105, -0.15539522469043732, 0.362362265586853, -0.9600623250007629, 0.9443973302841187, 0.28365546464920044, 0.10495376586914062, -0.16479475796222687, -0.5720749497413635, 0.16037461161613464, 0.49245771765708923, -0.4768507778644562, -0.287928760051727...
func (h *Handler) Handle(resource runtime.Object, finalizers ...Finalizer) error { metaObject, err := meta.Accessor(resource) if err != nil { return err } var needUpdate bool var finalizerErr error if metaObject.GetDeletionTimestamp().IsZero() { // resource is not being deleted, make sure all finalizers are t...
[ -0.33121898770332336, -0.3108455538749695, 0.7572644948959351, 0.23058795928955078, 0.31563860177993774, 0.1983376294374466, 0.5737302899360657, -0.01932656764984131, 0.3478632867336273, -0.3694664537906647, 0.744680643081665, -0.5620541572570801, -0.6702767610549927, 0.04297560825943947, ...
func (h *Handler) reconcileFinalizers(finalizers []Finalizer, object metav1.Object) bool { needUpdate := false for _, finalizer := range finalizers { // add finalizer if not already there if !utils.StringInSlice(finalizer.Name, object.GetFinalizers()) { log.Info("Registering finalizer", "finalizer_name", final...
[ -1.105098009109497, -0.5612749457359314, 0.7294732332229614, 0.0353793166577816, 0.23283976316452026, -0.14316120743751526, -0.711381196975708, 0.06785893440246582, 0.14129596948623657, 0.42102620005607605, -1.2321890592575073, -0.9729024171829224, -0.9707762002944946, 0.7115598320960999, ...
func (h *Handler) executeFinalizers(finalizers []Finalizer, object metav1.Object) (bool, error) { needUpdate := false var finalizerErr error for _, finalizer := range finalizers { // for each registered finalizer, execute it, then remove from the list if utils.StringInSlice(finalizer.Name, object.GetFinalizers()...
[ -1.3919984102249146, -0.6916477084159851, 0.6342350244522095, 0.3573940396308899, 0.03482382372021675, 0.06801450252532959, -0.14735591411590576, 0.060988038778305054, 0.1781277358531952, 0.9747567176818848, -0.6848882436752319, -0.8723495602607727, -1.0315812826156616, 0.645170271396637, ...
func (l *extractStrategies) Enabled() bool { return len(*l) > 0 }
[ 0.31938549876213074, 0.05541408061981201, 0.27087610960006714, 0.5180082321166992, 0.9414693713188171, 0.280746728181839, -0.5006173253059387, 0.9815465211868286, 0.5244544744491577, 0.24172894656658173, -0.7056978344917297, -0.5942009091377258, -0.5155880451202393, 0.5449779629707336, -...
func ensureKube() (string, error) { // Does get-kube.sh exist in pwd? i, err := os.Stat("./get-kube.sh") if err == nil && !i.IsDir() && i.Mode()&0111 > 0 { return "./get-kube.sh", nil } // How about in the path? p, err := exec.LookPath("get-kube.sh") if err == nil { return p, nil } // Download it to a te...
[ 0.32330140471458435, -0.5158255100250244, 1.2086735963821411, 0.6307528018951416, 0.7530788779258728, -0.29773885011672974, -0.43086177110671997, -0.23822250962257385, 0.23153270781040192, 0.2339577078819275, 0.89061439037323, -0.05244150385260582, -0.28486403822898865, 0.5021352171897888,...
func getNamedBinaries(url, version, tarball string, retry int) error { f, err := os.Create(tarball) if err != nil { return err } defer f.Close() full := fmt.Sprintf("%s/%s/%s", url, version, tarball) for i := 0; i < retry; i++ { log.Printf("downloading %v from %v", tarball, full) if err := httpRead(full, f...
[ 0.2185734063386917, 0.45677536725997925, 1.0731345415115356, -0.10702124238014221, 0.18408459424972534, -0.03273269906640053, -0.1653868407011032, -0.8518986105918884, -0.5860854983329773, -0.026427850127220154, -0.6953258514404297, 0.11811235547065735, -0.3743537366390228, 0.3697517216205...
func ensureSessionTokenProfile(ctx context.Context, swampConfig *SwampConfig, pw *ProfileWriter) { printer.Printf("Checking if profile %s is still valid\n", swampConfig.intermediateProfile) if validateSessionToken(ctx, getIntermediateSessionOptions(ctx, swampConfig)) { printer.Printf("Session token for profile %s i...
[ 0.3187457025051117, -1.003312349319458, 0.45156532526016235, 0.5907131433486938, 0.6828118562698364, -0.011398788541555405, 0.07748495787382126, -0.7918601632118225, 0.39354196190834045, 0.4320107102394104, -0.2724282443523407, 0.15045544505119324, -0.4774811565876007, -0.3023413419723511,...
func ensureTargetProfile(ctx context.Context, swampConfig *SwampConfig, pw *ProfileWriter, awsConfig aws.Config) { svc := sts.NewFromConfig(awsConfig) userId := getCallerId(ctx, svc).Arn parts := strings.Split(*userId, "/") roleSessionName := parts[len(parts)-1] cred := assumeRole(ctx, svc, swampConfig.GetRoleAr...
[ 0.3097275495529175, -0.3624662756919861, 0.6246217489242554, -0.1800314038991928, 0.8700971603393555, 0.3737480044364929, 0.30054184794425964, -0.6067577600479126, 0.33218133449554443, 0.4469072222709656, 0.06937718391418457, 0.30935415625572205, 0.12360313534736633, -0.10012409836053848, ...
func (v *View) GetFile(uri protocol.DocumentURI) *File { v.mu.Lock() f, found := v.files[uri] if !found { f := &File{URI: uri} v.files[f.URI] = f } v.mu.Unlock() return f }
[ 0.12811432778835297, 0.7581114172935486, 0.3640933930873871, -0.07312040030956268, 0.05551695451140404, -0.3529416620731354, 0.984674334526062, -1.016115665435791, 0.23783287405967712, -1.541642427444458, 0.7652350068092346, -0.057314615696668625, -1.200082540512085, -0.3033674359321594, ...
func (v *View) TypeCheck(uri protocol.DocumentURI) (*packages.Package, error) { v.mu.Lock() defer v.mu.Unlock() path, err := FromURI(uri) if err != nil { return nil, err } pkgs, err := packages.Load(v.Config, fmt.Sprintf("file=%s", path)) if len(pkgs) == 0 { return nil, err } pkg := pkgs[0] return pkg, ni...
[ -0.6500870585441589, 0.4026472568511963, 0.5546963810920715, 0.15659494698047638, 0.6252025365829468, -0.07490463554859161, 1.0567840337753296, -1.1791373491287231, 0.6075853705406189, 0.40969517827033997, 0.7919830679893494, 0.17682375013828278, -1.043745994567871, -0.14742012321949005, ...
func Authorize(ee engine.Exchange) sknet.HandlerFunc { return func(c *sknet.Context) { var ( req pp.EncryptReq rlt *pp.EmptyRes ) for { if c.BindJSON(&req) == nil { // validate pubkey. if err := validatePubkey(req.GetPubkey()); err != nil { logger.Error(err.Error()) rlt = pp.MakeErrRe...
[ -0.9797550439834595, 0.45294392108917236, 0.973449170589447, 0.2570352852344513, 0.1060657948255539, -0.4928567111492157, 0.3232589066028595, -0.2346470057964325, 0.5143813490867615, 0.6428660750389099, 0.06020773574709892, 0.5135183930397034, -0.22096911072731018, 0.059350889176130295, ...
func reply(c *sknet.Context, r interface{}) { c.Set("response", r) }
[ 0.6602230072021484, -0.022765126079320908, 0.33146077394485474, 0.3889274001121521, 0.030207255855202675, 0.8388580679893494, -0.18190425634384155, -0.6099920272827148, 1.9398671388626099, -0.09541992098093033, -0.44892480969429016, -0.05353160202503204, -0.03772636875510216, -0.1045484617...
func NewDriver(libType string) (Driver, bool) { var ecosystem dbTypes.Ecosystem var comparer compare.Comparer switch libType { case ftypes.Bundler, ftypes.GemSpec: ecosystem = vulnerability.RubyGems comparer = rubygems.Comparer{} case ftypes.RustBinary, ftypes.Cargo: ecosystem = vulnerability.Cargo compar...
[ -0.509598433971405, -1.0370997190475464, 0.7053402662277222, 0.11647200584411621, 0.26002731919288635, 0.1239021047949791, -0.3264804482460022, -0.2706352770328522, 0.35622116923332214, 0.03712921962141991, 0.26080718636512756, -0.4984488785266876, -0.6630600094795227, 1.2026468515396118, ...
func (d *Driver) Type() string { return string(d.ecosystem) }
[ -0.8513011336326599, -0.08047265559434891, 0.3004514276981354, -0.0867571234703064, 1.3227554559707642, 0.8151333928108215, 0.24546681344509125, -0.8603996634483337, 0.5972753167152405, 0.047581154853105545, 1.2025007009506226, -0.13363921642303467, -0.376481831073761, 0.8236624002456665, ...
func (d *Driver) DetectVulnerabilities(pkgID, pkgName, pkgVer string) ([]types.DetectedVulnerability, error) { // e.g. "pip::", "npm::" prefix := fmt.Sprintf("%s::", d.ecosystem) advisories, err := d.dbc.GetAdvisories(prefix, vulnerability.NormalizePkgName(d.ecosystem, pkgName)) if err != nil { return nil, xerror...
[ -0.4559760093688965, -0.7628333568572998, 0.32123255729675293, 0.22605018317699432, 0.5947632193565369, -0.2704397439956665, -0.5187129378318787, -0.018225936219096184, 0.5548608303070068, 0.6831756234169006, -0.31844058632850647, 0.04630633443593979, -0.22467884421348572, 0.97681570053100...
func BusSubjectTrigger(prefix, suffix string) string { return fmt.Sprintf("%s.%s", prefix, suffix) }
[ 0.7482094764709473, -0.5356600284576416, 0.31892672181129456, -0.9276331663131714, -0.7446969151496887, 0.35744181275367737, -0.6387103199958801, 0.6223610639572144, -0.512029767036438, -0.6883705854415894, -0.5927414298057556, 1.008186936378479, 0.007475376129150391, -1.4693461656570435, ...
func NewBusManager(apiConsumer ChannellingAPIConsumer, id string, useNats bool, subjectPrefix string) BusManager { var b BusManager var err error if useNats { b, err = newNatsBus(apiConsumer, id, subjectPrefix) if err == nil { log.Println("NATS bus connected") } else { log.Println("Error connecting NATS ...
[ -1.2913068532943726, -0.3505452871322632, 0.5172662734985352, -0.09143958240747452, -0.16259676218032837, -0.2700634002685547, -1.1925467252731323, -0.025433408096432686, 0.30998465418815613, 0.003666707081720233, 0.16644762456417084, 0.7246537804603577, -0.8317983746528625, 0.913675069808...
func (u *Uname) Machine() string { return toString(u.Utsname.Machine[:]) }
[ -0.926324725151062, 0.1413612812757492, 0.3230154812335968, 0.06862087547779083, -0.4010924696922302, 1.5494614839553833, -0.8524040579795837, 0.11453598737716675, -0.4161829650402069, 0.16954442858695984, 0.39758047461509705, 0.16286812722682953, -0.140586256980896, -0.1469322144985199, ...