text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func TimeToAge(t time.Time) string {
duration := time.Now().Sub(t)
duration = duration.Round(time.Minute)
if duration.Hours() > 30 {
return fmt.Sprintf("%dd", int(duration.Hours()/24))
}
hour := duration / time.Hour
duration -= hour * time.Hour
minute := duration / time.Minute
return fmt.Sprintf("%02d:%02d", ... | [
-0.8149471879005432,
-0.7184804677963257,
1.1868197917938232,
-1.3862041234970093,
-0.3762243390083313,
0.7427264451980591,
-1.0838699340820312,
-0.6681703925132751,
-0.40668749809265137,
1.72111177444458,
0.44019433856010437,
-0.32401517033576965,
0.09946379065513611,
0.4547097086906433,
... |
func runClientToServerCopyAs(who, ttype string, conn *xsnet.Conn, fpath string, chaffing bool) (exitStatus uint32, err error) {
u, _ := user.Lookup(who) // nolint: gosec
var uid, gid uint32
fmt.Sscanf(u.Uid, "%d", &uid) // nolint: gosec,errcheck
fmt.Sscanf(u.Gid, "%d", &gid) // nolint: gosec,errcheck
log.Println("... | [
-0.3406441807746887,
-0.44650840759277344,
0.8562391400337219,
-0.6893053650856018,
-0.6943394541740417,
-0.14768348634243011,
0.585371196269989,
-0.17220361530780792,
-0.10057345777750015,
0.4956420063972473,
-0.07092397660017014,
0.5356597900390625,
0.951978325843811,
0.28227198123931885... |
func runServerToClientCopyAs(who, ttype string, conn *xsnet.Conn, srcPath string, chaffing bool) (exitStatus uint32, err error) {
u, err := user.Lookup(who)
if err != nil {
exitStatus = 1
return
}
var uid, gid uint32
_, _ = fmt.Sscanf(u.Uid, "%d", &uid) // nolint: gosec
_, _ = fmt.Sscanf(u.Gid, "%d", &gid) //... | [
-0.2191382795572281,
-0.4345225393772125,
0.9421283006668091,
-0.43431368470191956,
-0.9633371829986572,
0.0374949686229229,
0.7689297795295715,
-0.0059707993641495705,
-0.023568548262119293,
0.748623251914978,
-0.10114692151546478,
0.7459410429000854,
0.5769325494766235,
0.137672111392021... |
func runShellAs(who, hname, ttype, cmd string, interactive bool, conn *xsnet.Conn, chaffing bool) (exitStatus uint32, err error) {
var wg sync.WaitGroup
u, err := user.Lookup(who)
if err != nil {
exitStatus = 1
return
}
var uid, gid uint32
_, _ = fmt.Sscanf(u.Uid, "%d", &uid) // nolint: gosec
_, _ = fmt.Ssca... | [
-0.6049208641052246,
-0.7465171217918396,
0.9022038578987122,
0.00007728689524810761,
-0.6598768830299377,
-0.3387340307235718,
0.3378492593765259,
-0.10439436137676239,
0.0890812799334526,
-0.041583530604839325,
-0.21777722239494324,
0.8419687747955322,
0.20762966573238373,
0.451354771852... |
func GenAuthToken(who string, connhost string) string {
//tokenA, e := os.Hostname()
//if e != nil {
// tokenA = "badhost"
//}
tokenA := connhost
tokenB := make([]byte, 64)
_, _ = rand.Read(tokenB) // nolint: gosec
return fmt.Sprintf("%s:%s", tokenA, hex.EncodeToString(tokenB))
} | [
-0.5253351926803589,
-0.9914208054542542,
0.7505323886871338,
0.05740572512149811,
-0.15100008249282837,
0.8164328336715698,
-0.06818707287311554,
1.479088306427002,
-0.7897467613220215,
-0.43325236439704895,
-0.5982497334480286,
0.5355627536773682,
0.49923673272132874,
-0.2619291841983795... |
func main() {
var vopt bool
var chaffEnabled bool
var chaffFreqMin uint
var chaffFreqMax uint
var chaffBytesMax uint
var dbg bool
var laddr string
var useSystemPasswd bool
flag.BoolVar(&vopt, "v", false, "show version")
flag.StringVar(&laddr, "l", ":2000", "interface[:port] to listen")
flag.StringVar(&kcpM... | [
1.19314444065094,
0.21234622597694397,
1.1144914627075195,
0.06036299839615822,
-0.6171437501907349,
0.3267693817615509,
0.051397550851106644,
-0.13484051823616028,
-0.3082214295864105,
-0.04293086752295494,
0.1053197830915451,
0.3522152900695801,
0.03883206844329834,
0.153553768992424,
... |
func readKeyFromExtensionManifest(path string) ([]byte, error) {
b, err := ioutil.ReadFile(path)
if err != nil {
return nil, err
}
j := make(map[string]interface{})
if err = json.Unmarshal(b, &j); err != nil {
return nil, err
}
if enc, ok := j["key"].(string); ok {
return base64.StdEncoding.DecodeString(en... | [
-0.3972925543785095,
-0.9576178789138794,
0.618963360786438,
0.194806769490242,
-0.9288734793663025,
-0.14657700061798096,
-1.193847894668579,
0.352363646030426,
0.007132062688469887,
1.0172306299209595,
0.42556700110435486,
0.6389794945716858,
-0.35631147027015686,
-0.22023265063762665,
... |
func ComputeExtensionID(dir string) (string, error) {
key := []byte(dir)
mp := filepath.Join(dir, "manifest.json")
if _, err := os.Stat(mp); !os.IsNotExist(err) {
if k, err := readKeyFromExtensionManifest(mp); err != nil {
return "", err
} else if k != nil {
key = k
}
}
// Chrome computes an extension... | [
0.2577734887599945,
-0.6150329113006592,
0.550796627998352,
-0.021323127672076225,
-0.4827173054218292,
-0.2334061861038208,
-0.23295451700687408,
0.7544887661933899,
1.0945202112197876,
1.410786509513855,
-0.18558520078659058,
0.7730765342712402,
-0.6255547404289246,
0.5854653120040894,
... |
func writeTestExtension(dir, key string) (id string, err error) {
if err = os.MkdirAll(dir, 0755); err != nil {
return "", err
}
// Based on Autotest's client/common_lib/cros/autotest_private_ext/manifest.json and
// client/cros/multimedia/multimedia_test_extension/manifest.json. Key must be
// present in the m... | [
-0.06885798275470734,
-0.14160679280757904,
0.908612072467804,
0.08358796685934067,
0.021619008854031563,
-0.1120995506644249,
0.7412588596343994,
-0.36023956537246704,
0.5952886939048767,
1.129148006439209,
-0.6248224377632141,
0.5256675481796265,
-0.6151990294456482,
0.26182636618614197,... |
func AddTastLibrary(ctx context.Context, conn *Conn) error {
// Ensure the page is loaded so the tast library will be added properly.
if err := conn.WaitForExpr(ctx, `document.readyState === "complete"`); err != nil {
return errors.Wrap(err, "failed waiting for page to load")
}
return conn.Eval(ctx, tastLibrary, ... | [
-1.064177393913269,
-0.49792587757110596,
0.2081686109304428,
-0.6619395613670349,
0.5839468836784363,
0.4267593324184418,
0.09880299121141434,
0.053465455770492554,
-0.15149222314357758,
0.5545737147331238,
0.06511908024549484,
-0.8566476106643677,
-0.1846986562013626,
-0.0546066164970397... |
func (m *ShuntMeasurement) InsertIntoDb(dbmap devices.DbInserter) error {
return dbmap.Insert(m)
} | [
-0.24315223097801208,
1.6116085052490234,
0.20107269287109375,
-0.06900305300951004,
0.680047869682312,
0.8151824474334717,
0.5277045965194702,
0.2703436017036438,
0.38787350058555603,
-0.26421281695365906,
-0.5930410027503967,
-1.2463476657867432,
-1.525094747543335,
0.8951516151428223,
... |
func (az *AzureClient) ListVirtualMachines(ctx context.Context, resourceGroup string) (armhelpers.VirtualMachineListResultPage, error) {
page, err := az.virtualMachinesClient.List(ctx, resourceGroup)
c := VirtualMachineListResultPageClient{
vmlrp: page,
err: err,
}
return &c, err
} | [
-1.0250428915023804,
-0.40014001727104187,
-0.12149691581726074,
-0.8091863393783569,
0.4168672561645508,
-0.47720909118652344,
-0.3473667502403259,
-1.1461241245269775,
0.6825819611549377,
0.7173095345497131,
0.2129831463098526,
0.3980076313018799,
-0.9223388433456421,
0.592464029788971,
... |
func (az *AzureClient) GetVirtualMachine(ctx context.Context, resourceGroup, name string) (azcompute.VirtualMachine, error) {
vm, err := az.virtualMachinesClient.Get(ctx, resourceGroup, name, "")
azVM := azcompute.VirtualMachine{}
if err != nil {
return azVM, fmt.Errorf("fail to get virtual machine, %s", err)
}
... | [
-0.3009844422340393,
-0.21753834187984467,
0.3273966908454895,
-0.3676830232143402,
0.2307898849248886,
0.0006422969745472074,
-0.357850044965744,
-0.9527427554130554,
-0.006713358219712973,
0.21025395393371582,
0.7571984529495239,
0.8808441162109375,
-0.6260946393013,
-0.10634750127792358... |
func (az *AzureClient) RestartVirtualMachine(ctx context.Context, resourceGroup, name string) error {
future, err := az.virtualMachinesClient.Restart(ctx, resourceGroup, name)
if err != nil {
return err
}
if err = future.WaitForCompletionRef(ctx, az.virtualMachinesClient.Client); err != nil {
return err
}
_... | [
-0.5096542239189148,
0.04270484670996666,
-0.1576196551322937,
-0.32340553402900696,
-0.15770652890205383,
0.18238615989685059,
-0.8052665591239929,
-0.11151827126741409,
-0.9355038404464722,
0.771494448184967,
0.165644571185112,
0.5832577347755432,
-1.0805091857910156,
-0.0458347387611866... |
func (az *AzureClient) DeleteVirtualMachine(ctx context.Context, resourceGroup, name string) error {
future, err := az.virtualMachinesClient.Delete(ctx, resourceGroup, name)
if err != nil {
return err
}
if err = future.WaitForCompletionRef(ctx, az.virtualMachinesClient.Client); err != nil {
return err
}
_, ... | [
-0.16680172085762024,
0.05024160072207451,
0.02184196002781391,
-0.39636802673339844,
0.07113868743181229,
0.04966448247432709,
-0.2595275342464447,
-0.5572667121887207,
-0.2621261477470398,
0.17770393192768097,
0.23679471015930176,
0.27459168434143066,
-0.9158457517623901,
0.5940165519714... |
func (az *AzureClient) ListVirtualMachineScaleSets(ctx context.Context, resourceGroup string) (armhelpers.VirtualMachineScaleSetListResultPage, error) {
page, err := az.virtualMachineScaleSetsClient.List(ctx, resourceGroup)
c := VirtualMachineScaleSetListResultPageClient{
vmsslrp: page,
err: err,
}
return &... | [
0.17389383912086487,
-0.5742307901382446,
0.036754775792360306,
-0.4867745637893677,
-0.4897317886352539,
-0.3461684286594391,
-0.4941515624523163,
-1.0507522821426392,
0.010084666311740875,
0.7228999733924866,
0.5915362238883972,
0.3561713397502899,
-0.9501166343688965,
0.7031459212303162... |
func (az *AzureClient) RestartVirtualMachineScaleSets(ctx context.Context, resourceGroup string, virtualMachineScaleSet string, instanceIDs *azcompute.VirtualMachineScaleSetVMInstanceIDs) error {
ids := compute.VirtualMachineScaleSetVMInstanceIDs{}
err := DeepCopy(&ids, instanceIDs)
if err != nil {
return fmt.Erro... | [
-0.546656608581543,
-0.4673575460910797,
0.11997765302658081,
-0.4900014102458954,
-0.5860182642936707,
-0.2065121978521347,
-0.966928243637085,
-0.8815911412239075,
-0.9129932522773743,
0.884898841381073,
0.9060139656066895,
0.8262657523155212,
-1.2484303712844849,
0.036767251789569855,
... |
func (az *AzureClient) ListVirtualMachineScaleSetVMs(ctx context.Context, resourceGroup, virtualMachineScaleSet string) (armhelpers.VirtualMachineScaleSetVMListResultPage, error) {
page, err := az.virtualMachineScaleSetVMsClient.List(ctx, resourceGroup, virtualMachineScaleSet, "", "", "")
c := VirtualMachineScaleSetV... | [
-0.21959823369979858,
-0.6834773421287537,
-0.053568582981824875,
-0.8655638098716736,
0.03344306722283363,
-0.7278302311897278,
-1.6454118490219116,
-0.998174250125885,
0.1647225320339203,
0.9547163248062134,
0.3603079915046692,
0.7024806141853333,
-0.36915117502212524,
0.9284384846687317... |
func (az *AzureClient) DeleteVirtualMachineScaleSetVM(ctx context.Context, resourceGroup, virtualMachineScaleSet, instanceID string) error {
future, err := az.virtualMachineScaleSetVMsClient.Delete(ctx, resourceGroup, virtualMachineScaleSet, instanceID)
if err != nil {
return err
}
if err = future.WaitForComplet... | [
-0.146602600812912,
-0.483784019947052,
0.03865038976073265,
-0.3769136667251587,
-0.3717760741710663,
-0.28667980432510376,
-1.1630573272705078,
-0.7731661796569824,
-0.03696909174323082,
0.6677038073539734,
0.5306602120399475,
0.699141800403595,
-0.5422192811965942,
0.6980320811271667,
... |
func (az *AzureClient) DeleteVirtualMachineScaleSet(ctx context.Context, resourceGroup, vmssName string) error {
future, err := az.virtualMachineScaleSetsClient.Delete(ctx, resourceGroup, vmssName)
if err != nil {
return err
}
if err = future.WaitForCompletionRef(ctx, az.virtualMachineScaleSetsClient.Client); err... | [
0.08919641375541687,
-0.5147152543067932,
0.009097887203097343,
-0.8389451503753662,
-0.910222589969635,
-0.42055609822273254,
-0.6410017013549805,
-1.1219189167022705,
-0.21011213958263397,
0.3979029357433319,
0.707025408744812,
0.2618129253387451,
-0.9180693030357361,
0.40494441986083984... |
func (az *AzureClient) SetVirtualMachineScaleSetCapacity(ctx context.Context, resourceGroup, virtualMachineScaleSet string, sku azcompute.Sku, location string) error {
s := compute.Sku{}
err := DeepCopy(&s, sku)
if err != nil {
return fmt.Errorf("fail to convert SKU, %v", err)
}
future, err := az.virtualMachineS... | [
-0.5792054533958435,
-0.9169486165046692,
0.5597386360168457,
-0.393117219209671,
-0.6175836324691772,
-0.2889333963394165,
-0.7430627942085266,
-0.4479243755340576,
-0.27031415700912476,
1.1897709369659424,
0.143080472946167,
-0.5147212147712708,
-0.09123320877552032,
0.2257421314716339,
... |
func (az *AzureClient) GetAvailabilitySet(ctx context.Context, resourceGroup, availabilitySetName string) (azcompute.AvailabilitySet, error) {
azVMAS := azcompute.AvailabilitySet{}
vmas, err := az.availabilitySetsClient.Get(ctx, resourceGroup, availabilitySetName)
if err != nil {
log.Printf("fail to get availabili... | [
-0.6265230178833008,
-0.5096672177314758,
0.44390997290611267,
-0.4972708523273468,
-0.8626998662948608,
0.0007729611825197935,
0.01768304780125618,
-0.2198365479707718,
-0.3271675705909729,
0.3956136405467987,
1.569501280784607,
0.9722337126731873,
-0.46400582790374756,
-0.469932228326797... |
func (az *AzureClient) GetAvailabilitySetFaultDomainCount(ctx context.Context, resourceGroup string, vmasIDs []string) (int, error) {
var count int
if len(vmasIDs) > 0 {
id := vmasIDs[0]
// extract the last element of the id for VMAS name
ss := strings.Split(id, "/")
name := ss[len(ss)-1]
vmas, err := az.Ge... | [
-0.06674519926309586,
0.24508051574230194,
0.2926037013530731,
0.13366888463497162,
-0.08572514355182648,
0.0317809097468853,
-0.09978772699832916,
0.3009825646877289,
-0.47658810019493103,
0.37757009267807007,
0.2778777480125427,
0.5181422233581543,
-0.09931185841560364,
0.932849586009979... |
func (az *AzureClient) GetVirtualMachinePowerState(ctx context.Context, resourceGroup, name string) (string, error) {
vm, err := az.virtualMachinesClient.Get(ctx, resourceGroup, name, compute.InstanceView)
if err != nil {
return "", errors.Wrapf(err, "fetching virtual machine resource")
}
for _, status := range *... | [
0.3529680073261261,
-0.6857210993766785,
0.35051482915878296,
-0.10555991530418396,
-0.8909574151039124,
-0.528860867023468,
-1.2884421348571777,
-0.017532160505652428,
-0.2868199050426483,
0.9750092029571533,
0.6205026507377625,
-0.02587088756263256,
-1.1791073083877563,
-0.02178996056318... |
func (az *AzureClient) GetVirtualMachineScaleSetInstancePowerState(ctx context.Context, resourceGroup, name, instanceID string) (string, error) {
// TODO Pass compute.InstanceView once we upgrade azure stack compute's api version
return "", errors.Errorf("operation not supported")
} | [
-0.20256923139095306,
-0.8887898325920105,
0.3490853011608124,
-0.4516006410121918,
-0.93850177526474,
0.2970738410949707,
-1.2671507596969604,
0.15197907388210297,
-0.5089423060417175,
1.249872088432312,
0.40301114320755005,
0.04127951338887215,
-1.0543664693832397,
0.08816301822662354,
... |
func ValidateFacebookCredentials(webUser *domain.AuthUser) bool {
res, err := http.Get(fmt.Sprintf("https://graph.facebook.com/v2.9/me?access_token=%s", webUser.ShortLivedToken))
if err != nil {
log.Printf("Error: %s", err)
return false
}
me := &me{}
err = json.NewDecoder(res.Body).Decode(me)
if err != nil... | [
0.3568428158760071,
-0.6244642734527588,
0.567529022693634,
0.9613322019577026,
-0.48765283823013306,
0.43043798208236694,
-0.07217232137918472,
-0.781535267829895,
-0.406167209148407,
-0.38420891761779785,
-0.2966732084751129,
-0.04875649884343147,
-1.1559993028640747,
0.11803925782442093... |
func main() {
flag.Parse()
debug := *flagDebug
if debug {
log.Println("Starting in debug mode")
file.Resolve(func() (string, error) {
return os.Getenv("TOBA_PATH"), nil
})
}
c, err := config.Load()
web.ExitIfError(err)
c.HTTP.SyncFileAccess = debug
if debug {
c.HTTP.FromFolder = "static"
}
li... | [
0.5331424474716187,
0.26306822896003723,
0.8912104368209839,
1.4093891382217407,
0.6064520478248596,
0.9983459115028381,
0.873347818851471,
0.9066563844680786,
-0.7954476475715637,
0.1721159815788269,
0.3918915092945099,
-0.2518730163574219,
-0.15171708166599274,
0.6198142766952515,
0.17... |
func serveLicensed(c config.Server) {
web.ExitIfError(system.Module.Migrate())
web.ExitIfError(ldap.Initialize(c.LDAP))
services, modulePaths := module.Amalgamate(freeModules)
serviceHandler := module.Handle(services)
log.Printf("Initializing %d modules and %d services", len(modulePaths), len(services))
http.H... | [
0.02487778849899769,
-0.21051855385303497,
0.5887688398361206,
-0.5711243152618408,
0.2885105013847351,
0.6176631450653076,
0.7143946290016174,
-0.43901312351226807,
0.3879009485244751,
-0.17119798064231873,
-0.3448154032230377,
0.9074526429176331,
-0.5845303535461426,
0.8083084225654602,
... |
func serveSetup(c config.Server) {
services, modulePaths := module.Amalgamate(freeModules)
serviceHandler := module.Handle(services)
log.Printf("Initializing %d modules and %d services", len(modulePaths), len(services))
http.HandleFunc("/ws", socket.Handle(c.HTTP, serviceHandler))
http.HandleFunc("/", web.Handle... | [
-0.9948850274085999,
-0.032371196895837784,
0.6348307728767395,
0.2754474878311157,
0.35876670479774475,
0.2866252660751343,
1.6212360858917236,
-0.051296330988407135,
0.0929357036948204,
0.47573304176330566,
0.32711660861968994,
0.31831595301628113,
0.06947369873523712,
1.0139575004577637... |
func (a *adapter) coreRestarted(ctx context.Context, endPoint string) error {
logger.Errorw(ctx, "core-restarted", log.Fields{"endpoint": endPoint})
return nil
} | [
0.257320761680603,
-0.3634442389011383,
0.49123620986938477,
-0.6814112067222595,
-0.052547141909599304,
-0.4583510756492615,
-0.260103702545166,
0.5449981689453125,
1.015394926071167,
0.3940598964691162,
-0.8445099592208862,
0.697050929069519,
-1.0328736305236816,
-0.7762563228607178,
-... |
func getCoreServiceClientHandler(ctx context.Context, conn *grpc.ClientConn) interface{} {
if conn == nil {
return nil
}
return core_service.NewCoreServiceClient(conn)
} | [
0.41715407371520996,
-0.08100170642137527,
0.39284563064575195,
-0.29570066928863525,
-0.5024073123931885,
0.10293029993772507,
0.36941444873809814,
-0.24631641805171967,
-0.31082433462142944,
-0.12530837953090668,
0.0725516602396965,
-0.057280782610177994,
-1.4149887561798096,
-0.44470438... |
func newKVClient(ctx context.Context, storeType, address string, timeout time.Duration) (kvstore.Client, error) {
logger.Infow(ctx, "kv-store-type", log.Fields{"store": storeType})
switch storeType {
case "etcd":
return kvstore.NewEtcdClient(ctx, address, timeout, log.FatalLevel)
}
return nil, errors.New("unsupp... | [
0.3300144672393799,
-0.16934627294540405,
0.19918885827064514,
0.08114494383335114,
-1.6246750354766846,
-0.10855161398649216,
-0.9978642463684082,
0.04994107037782669,
0.4243103563785553,
0.8020434379577637,
0.7284467220306396,
0.6555062532424927,
-0.5493574738502502,
-0.16310586035251617... |
func (a *adapter) startGRPCService(ctx context.Context, server *vgrpc.GrpcServer, serviceName string) {
logger.Infow(ctx, "service-created", log.Fields{"service": serviceName})
probe.UpdateStatusFromContext(ctx, serviceName, probe.ServiceStatusRunning)
logger.Infow(ctx, "service-started", log.Fields{"service": serv... | [
-0.6465906500816345,
-1.0197234153747559,
0.41393405199050903,
0.10553789138793945,
0.4168255925178528,
0.6854664087295532,
-0.13032589852809906,
-0.23135054111480713,
0.36196261644363403,
0.8793451189994812,
-0.13816581666469574,
1.0933398008346558,
-1.000191569328308,
0.16368117928504944... |
func (a *adapter) checkServicesReadiness(ctx context.Context) {
// checks the kafka readiness
go kafka.MonitorKafkaReadiness(ctx, a.kafkaClient, a.config.LiveProbeInterval, a.config.NotLiveProbeInterval, clusterMessagingService)
// checks the kv-store readiness
go a.checkKvStoreReadiness(ctx)
} | [
-0.2702127695083618,
-0.37661194801330566,
0.5149317383766174,
-0.11121087521314621,
-0.190766379237175,
-0.07983867079019547,
-0.4073924124240875,
-0.21818110346794128,
0.10503649711608887,
-0.05895232409238815,
1.1032427549362183,
0.06382284313440323,
-0.5195256471633911,
0.6256448626518... |
func (a *adapter) checkKvStoreReadiness(ctx context.Context) {
// dividing the live probe interval by 2 to get updated status every 30s
timeout := a.config.LiveProbeInterval / 2
kvStoreChannel := make(chan bool, 1)
// Default true - we are here only after we already had a KV store connection
kvStoreChannel <- tru... | [
-0.0003009472566191107,
-0.5401903390884399,
0.6086813807487488,
-0.30785050988197327,
-0.4834621548652649,
0.703171968460083,
-0.9472864866256714,
0.3005591332912445,
0.5194981694221497,
0.837986171245575,
1.1348052024841309,
0.22715072333812714,
-0.44442516565322876,
0.5325084328651428,
... |
func WaitUntilKvStoreConnectionIsUp(ctx context.Context, kvClient kvstore.Client, connectionRetryInterval time.Duration, serviceName string) error {
if kvClient == nil {
return errors.New("kvclient-is-nil")
}
for {
if !kvClient.IsConnectionUp(ctx) {
probe.UpdateStatusFromContext(ctx, serviceName, probe.Servic... | [
-0.31031227111816406,
-0.3324955999851227,
0.5638588666915894,
0.2307826280593872,
-0.18643967807292938,
0.26745375990867615,
-1.0301016569137573,
0.24573245644569397,
0.4488447606563568,
0.4060238301753998,
0.32167306542396545,
-0.09131496399641037,
-0.28957414627075195,
-0.47852271795272... |
func getVerifiedCodeVersion(ctx context.Context) string {
if version.VersionInfo.Version == "unknown-version" {
content, err := ioutil.ReadFile("VERSION")
if err == nil {
return string(content)
}
logger.Error(ctx, "'VERSION'-file not readable")
}
return version.VersionInfo.Version
} | [
0.653300404548645,
-1.0300096273422241,
0.30959266424179077,
0.7253522872924805,
0.012376190163195133,
0.877314567565918,
0.014209061861038208,
0.05110578611493111,
-0.4993670880794525,
-0.022627446800470352,
-0.6798425912857056,
0.12016544491052628,
-0.5447735786437988,
0.5310732126235962... |
func (m *sdt) Admin() string {
return m.adminField
} | [
0.22000674903392792,
0.5413991212844849,
0.017216088250279427,
0.11733698844909668,
-0.7235412001609802,
1.237673044204712,
-0.2756447494029999,
-0.9665693044662476,
-0.3923669755458832,
-0.4690294861793518,
0.054680678993463516,
-0.11712953448295593,
0.049272242933511734,
-0.3184555470943... |
func (m *sdt) SetAdmin(val string) {
m.adminField = val
} | [
0.3397347927093506,
1.0874865055084229,
-0.027875375002622604,
0.49193811416625977,
-0.8121904134750366,
1.1212453842163086,
0.1719265878200531,
-0.8602104187011719,
-0.7804864645004272,
-0.41190600395202637,
-0.5455498099327087,
-0.11201797425746918,
0.05593523010611534,
0.590724587440490... |
func (m *sdt) Comment() string {
return m.commentField
} | [
-0.2713923156261444,
-0.17642533779144287,
0.24965283274650574,
0.28190940618515015,
-0.2538851499557495,
1.3128756284713745,
1.5648900270462036,
0.026882058009505272,
-0.8055655360221863,
0.24756373465061188,
-0.7380018830299377,
-1.2170873880386353,
0.040168989449739456,
-0.2745081782341... |
func (m *sdt) SetComment(val string) {
m.commentField = val
} | [
0.027853945270180702,
0.5319535732269287,
0.18002261221408844,
0.42727306485176086,
0.19948822259902954,
0.9591150879859924,
1.6907216310501099,
0.2794162929058075,
-0.88396817445755,
0.29417580366134644,
-0.8411514759063721,
-1.3106261491775513,
-0.20004786550998688,
0.4508323669433594,
... |
func (m *sdt) Duration() int32 {
return m.durationField
} | [
-0.10878312587738037,
0.734250009059906,
0.19153372943401337,
0.05607515573501587,
-0.40529710054397583,
1.1973298788070679,
1.269181251525879,
-0.08396527171134949,
-0.18841233849525452,
0.1389196366071701,
-0.8390718698501587,
-0.7419994473457336,
0.44128021597862244,
0.24064135551452637... |
func (m *sdt) SetDuration(val int32) {
m.durationField = val
} | [
0.26701411604881287,
1.5271596908569336,
0.12320928275585175,
0.44036340713500977,
-0.3358726501464844,
1.4951140880584717,
1.5508527755737305,
-0.11277677118778229,
-0.31743064522743225,
0.22967879474163055,
-0.9490240812301636,
-1.2545650005340576,
0.5083878040313721,
1.0790154933929443,... |
func (m *sdt) EndDateTime() int64 {
return m.endDateTimeField
} | [
-0.8323463201522827,
1.1048221588134766,
0.21522408723831177,
-0.2342931628227234,
-0.7060240507125854,
0.9902558326721191,
0.027575355023145676,
0.8788630366325378,
-0.0829802080988884,
0.6637498736381531,
-0.6932433843612671,
-1.0103774070739746,
-0.8675687313079834,
0.9252824783325195,
... |
func (m *sdt) SetEndDateTime(val int64) {
m.endDateTimeField = val
} | [
-0.7631592154502869,
1.1570932865142822,
-0.09214242547750473,
-0.002704103710129857,
-0.7496002912521362,
0.7992443442344666,
0.11580017954111099,
0.6772444248199463,
-0.708088219165802,
0.8858208656311035,
-1.1154372692108154,
-0.8491417169570923,
-0.6836944222450256,
1.3922611474990845,... |
func (m *sdt) EndDateTimeOnLocal() string {
return m.endDateTimeOnLocalField
} | [
-0.2364736795425415,
-0.6228621006011963,
0.2787820100784302,
-0.601789653301239,
-1.0816893577575684,
1.1074002981185913,
-0.8658162951469421,
0.6370799541473389,
-0.4141112267971039,
1.4188669919967651,
-1.1630984544754028,
-0.43901023268699646,
-0.5315094590187073,
0.9642267227172852,
... |
func (m *sdt) SetEndDateTimeOnLocal(val string) {
m.endDateTimeOnLocalField = val
} | [
-0.3725076913833618,
-0.32429251074790955,
0.07828965783119202,
-0.5597507357597351,
-0.9681940078735352,
0.6837245225906372,
-0.8187190294265747,
0.8021734952926636,
-0.9136699438095093,
1.4596565961837769,
-1.6517925262451172,
-0.21051914989948273,
-0.6264652609825134,
1.1532375812530518... |
func (m *sdt) EndHour() int32 {
return m.endHourField
} | [
-0.27624624967575073,
0.7875475287437439,
0.5395013689994812,
0.38076481223106384,
-0.8041986227035522,
1.7784278392791748,
0.2349347174167633,
0.7014476656913757,
-0.7288287878036499,
0.21462321281433105,
-0.7496674060821533,
-0.8241986632347107,
-1.1538608074188232,
-0.05587974935770035,... |
func (m *sdt) SetEndHour(val int32) {
m.endHourField = val
} | [
-0.4301162362098694,
1.12923264503479,
0.21158497035503387,
0.11090829968452454,
-0.5443365573883057,
1.5976065397262573,
0.4251349866390228,
0.3346025049686432,
-1.3037513494491577,
0.4166709780693054,
-1.2458916902542114,
-0.9382447004318237,
-0.8605142831802368,
0.8032475709915161,
0.... |
func (m *sdt) EndMinute() int32 {
return m.endMinuteField
} | [
-0.5503241419792175,
0.5652494430541992,
0.27605298161506653,
-0.6723996996879578,
-0.27043768763542175,
0.9995986223220825,
-0.4502919614315033,
-0.21285352110862732,
-0.19898079335689545,
-0.36612528562545776,
-0.4523627758026123,
-0.5832270383834839,
-1.7211389541625977,
0.0579280182719... |
func (m *sdt) SetEndMinute(val int32) {
m.endMinuteField = val
} | [
-0.7997368574142456,
0.6988792419433594,
0.08978932350873947,
-0.8176371455192566,
-0.033930521458387375,
0.9939978122711182,
-0.44250404834747314,
-0.35909363627433777,
-0.7029280662536621,
-0.10428549349308014,
-1.0202783346176147,
-0.9060000777244568,
-1.307329773902893,
0.6480315923690... |
func (m *sdt) Hour() int32 {
return m.hourField
} | [
-0.14591383934020996,
0.5639662146568298,
0.5490519404411316,
0.2874601185321808,
-0.472790390253067,
2.2430269718170166,
1.223352074623108,
0.7515608072280884,
-0.5927775502204895,
-0.37351664900779724,
-0.961675763130188,
-0.4759834408760071,
-0.18119581043720245,
-0.1521306037902832,
... |
func (m *sdt) SetHour(val int32) {
m.hourField = val
} | [
0.18852928280830383,
1.4201892614364624,
0.2950418293476105,
0.412868469953537,
-1.1474571228027344,
2.0069007873535156,
0.924210786819458,
0.3834930956363678,
-0.822615921497345,
-0.2720033526420593,
-1.0686603784561157,
-0.8008446097373962,
-0.08287211507558823,
0.204647958278656,
1.27... |
func (m *sdt) ID() string {
return m.idField
} | [
0.5144662261009216,
-0.23931917548179626,
0.3238610625267029,
0.6514214873313904,
-0.3127288222312927,
1.8978010416030884,
0.13114851713180542,
-0.063039630651474,
0.4470718801021576,
0.03313303366303444,
-0.62479567527771,
-0.8205321431159973,
-0.33758416771888733,
0.2738284468650818,
-... |
func (m *sdt) SetID(val string) {
m.idField = val
} | [
0.3463343381881714,
0.5354005098342896,
0.22495941817760468,
0.7559906840324402,
-0.2573970556259155,
1.753686785697937,
0.28514963388442993,
-0.0703088790178299,
0.1492677927017212,
0.05674988776445389,
-1.0273547172546387,
-0.7239985466003418,
-0.5942139029502869,
0.8645361661911011,
-... |
func (m *sdt) IsEffective() *bool {
return m.isEffectiveField
} | [
-0.3752298653125763,
1.5135185718536377,
0.5609939694404602,
0.5800560116767883,
0.1925600916147232,
0.534149169921875,
0.06417294591665268,
-0.2622881531715393,
-1.5360779762268066,
0.5815033316612244,
-0.7789146900177002,
0.007319547701627016,
-0.31372833251953125,
-0.2183743566274643,
... |
func (m *sdt) SetIsEffective(val *bool) {
m.isEffectiveField = val
} | [
-0.1612204611301422,
1.1426832675933838,
0.31185561418533325,
0.037655748426914215,
0.11150673776865005,
0.6752733588218689,
0.6756842732429504,
-0.055859729647636414,
-1.448922038078308,
0.51502525806427,
-1.2495183944702148,
0.21779070794582367,
-0.21971672773361206,
0.2686389982700348,
... |
func (m *sdt) Minute() int32 {
return m.minuteField
} | [
-0.4601511061191559,
0.95281583070755,
0.3626460134983063,
-0.14225684106349945,
-0.405513197183609,
0.9137716293334961,
0.8424030542373657,
-0.24355216324329376,
0.4349641799926758,
-0.8881458640098572,
-0.41638001799583435,
-0.38383257389068604,
-0.8731417655944824,
-0.20860622823238373,... |
func (m *sdt) SetMinute(val int32) {
m.minuteField = val
} | [
-0.064809150993824,
1.5001291036605835,
0.28429457545280457,
-0.17057345807552338,
-0.1285007894039154,
0.8001545667648315,
0.7056493759155273,
-0.5507882833480835,
0.14814633131027222,
-0.7373924255371094,
-0.7973325252532959,
-0.8439778685569763,
-1.1909677982330322,
0.5378535389900208,
... |
func (m *sdt) MonthDay() int32 {
return m.monthDayField
} | [
-0.5946666598320007,
0.3126223385334015,
0.3627558946609497,
0.26155468821525574,
-0.34172308444976807,
1.155977487564087,
0.4295625686645508,
-0.5660005807876587,
-0.7299272418022156,
-1.487270712852478,
0.06037994474172592,
-0.6128589510917664,
-0.5868569612503052,
0.4509086608886719,
... |
func (m *sdt) SetMonthDay(val int32) {
m.monthDayField = val
} | [
0.06370849907398224,
0.3521016240119934,
0.537796676158905,
0.1382734775543213,
-0.7295226454734802,
1.5375514030456543,
0.3428853154182434,
-0.902193009853363,
-0.9361230731010437,
-1.2695010900497437,
0.052339304238557816,
0.028370194137096405,
-0.8391117453575134,
0.9082575440406799,
... |
func (m *sdt) SDTType() string {
return m.sdtTypeField
} | [
0.2891294062137604,
0.5239138007164001,
0.1581120789051056,
0.0841120108962059,
-0.21746762096881866,
0.8425838947296143,
-0.11357269436120987,
-0.6212396025657654,
0.07382900267839432,
0.5540428757667542,
-0.3252052366733551,
-0.7220560312271118,
0.03603215515613556,
-0.040338184684515,
... |
func (m *sdt) SetSDTType(val string) {
m.sdtTypeField = val
} | [
0.7397932410240173,
1.0218803882598877,
0.15698851644992828,
0.11837749928236008,
-0.4085719883441925,
0.8791345953941345,
0.2996083199977875,
-0.3918757140636444,
-0.3292609453201294,
0.06426744163036346,
-0.9033781290054321,
-0.6812888979911804,
-0.4231076240539551,
0.6311374306678772,
... |
func (m *sdt) StartDateTime() int64 {
return m.startDateTimeField
} | [
-0.29116344451904297,
0.9508020281791687,
0.3379696309566498,
0.3166612386703491,
-0.9496521949768066,
0.4352404773235321,
0.4059637188911438,
0.907532811164856,
0.2143290936946869,
0.19885025918483734,
-0.9907397627830505,
-0.7907075881958008,
-0.4388463497161865,
0.13447241485118866,
-... |
func (m *sdt) SetStartDateTime(val int64) {
m.startDateTimeField = val
} | [
-0.5538715124130249,
0.7750886082649231,
0.049017541110515594,
0.20315393805503845,
-1.072176456451416,
0.5415458083152771,
0.5578607320785522,
0.3828471302986145,
-0.13379009068012238,
0.8476483225822449,
-1.5147351026535034,
-0.7087894678115845,
-0.2241554707288742,
0.6769140362739563,
... |
func (m *sdt) StartDateTimeOnLocal() string {
return m.startDateTimeOnLocalField
} | [
0.1937921941280365,
-0.9281614422798157,
0.2551729381084442,
-0.0728243812918663,
-1.3386077880859375,
0.8471448421478271,
-0.3702356517314911,
0.6856817603111267,
-0.033077046275138855,
0.9748712778091431,
-1.569635033607483,
-0.38049566745758057,
0.15413250029087067,
0.37119239568710327,... |
func (m *sdt) SetStartDateTimeOnLocal(val string) {
m.startDateTimeOnLocalField = val
} | [
-0.16753682494163513,
-1.0454233884811401,
0.11788049340248108,
-0.08841023594141006,
-1.1830475330352783,
0.6640241146087646,
-0.1768483817577362,
0.4761931300163269,
-0.2875336706638336,
1.1452288627624512,
-2.113424777984619,
-0.2589295208454132,
0.06438447535037994,
0.5659477114677429,... |
func (m *sdt) Timezone() string {
return m.timezoneField
} | [
-0.18883009254932404,
0.286458283662796,
-0.07842899858951569,
-0.06819812953472137,
-0.14246082305908203,
0.5971587896347046,
0.890631914138794,
-0.042361628264188766,
0.29501986503601074,
-0.06839576363563538,
-0.47464630007743835,
-0.7172753810882568,
-0.19138722121715546,
-0.4116725921... |
func (m *sdt) SetTimezone(val string) {
m.timezoneField = val
} | [
-0.19878244400024414,
1.0026030540466309,
-0.027570854872465134,
0.24502035975456238,
-0.2425801008939743,
0.42137855291366577,
0.9002054929733276,
0.26870638132095337,
-0.00009927898645401001,
0.06360507011413574,
-1.1527912616729736,
-1.1112871170043945,
-0.3936379849910736,
0.5972487330... |
func (m *sdt) Type() string {
return "SDT"
} | [
-0.36402449011802673,
0.43008172512054443,
0.17263305187225342,
0.4309728145599365,
-0.7465929985046387,
1.4020649194717407,
0.12406132370233536,
-1.0228863954544067,
0.3292311131954193,
0.2281499207019806,
-0.10050906985998154,
-0.1040971502661705,
0.18835507333278656,
1.0204722881317139,... |
func (m *sdt) SetType(val string) {
} | [
-0.5469483137130737,
0.7508518695831299,
0.17897623777389526,
1.1827709674835205,
-0.763394832611084,
0.48079776763916016,
0.35199058055877686,
-0.5824982523918152,
0.4239632785320282,
0.10421010851860046,
-0.5804346799850464,
-0.31729739904403687,
-0.35609135031700134,
1.1539695262908936,... |
func (m *sdt) WeekDay() string {
return m.weekDayField
} | [
-1.0586800575256348,
0.7552290558815002,
0.3246351182460785,
0.43280014395713806,
-0.11999537795782089,
0.8008471131324768,
0.4425782561302185,
-0.1559595763683319,
-0.5815051198005676,
-0.809707522392273,
-0.4934921860694885,
-1.3054543733596802,
0.07866258174180984,
-0.17683595418930054,... |
func (m *sdt) SetWeekDay(val string) {
m.weekDayField = val
} | [
-0.150461345911026,
0.9022742509841919,
0.2440413236618042,
0.3542943596839905,
-0.027345839887857437,
-0.0072809564881026745,
0.6288514733314514,
-0.2908686697483063,
-0.8866327404975891,
-0.7281086444854736,
-0.7514455914497375,
-0.7127498984336853,
-0.31673821806907654,
0.78129661083221... |
func (m *sdt) WeekOfMonth() string {
return m.weekOfMonthField
} | [
0.8609210848808289,
0.025793423876166344,
0.28874894976615906,
-0.2908182144165039,
-0.44789358973503113,
0.2767844796180725,
1.1511749029159546,
-0.6348722577095032,
0.10293331742286682,
-1.513667106628418,
0.4224347472190857,
-0.4569846987724304,
-0.14829473197460175,
-0.3187005519866943... |
func (m *sdt) SetWeekOfMonth(val string) {
m.weekOfMonthField = val
} | [
0.7761687636375427,
0.23458369076251984,
0.04913564398884773,
-0.4491890072822571,
-0.10549557954072952,
-0.19973497092723846,
0.9972217082977295,
-0.45164960622787476,
-0.29932719469070435,
-1.1382659673690796,
-0.30950137972831726,
-0.29647865891456604,
-0.36321380734443665,
0.3654357790... |
func UnmarshalSDTSlice(reader io.Reader, consumer runtime.Consumer) ([]SDT, error) {
var elements []json.RawMessage
if err := consumer.Consume(reader, &elements); err != nil {
return nil, err
}
var result []SDT
for _, element := range elements {
obj, err := unmarshalSDT(element, consumer)
if err != nil {
... | [
-1.1670007705688477,
0.29595279693603516,
0.6011877059936523,
-0.44226181507110596,
-0.620104968547821,
-0.8680953979492188,
-0.28964751958847046,
-0.6293696761131287,
-0.7372645735740662,
0.7775147557258606,
0.1828659623861313,
0.19260099530220032,
0.2963501513004303,
0.8514765501022339,
... |
func UnmarshalSDT(reader io.Reader, consumer runtime.Consumer) (SDT, error) {
// we need to read this twice, so first into a buffer
data, err := ioutil.ReadAll(reader)
if err != nil {
return nil, err
}
return unmarshalSDT(data, consumer)
} | [
0.37248945236206055,
-0.11678607016801834,
0.618897557258606,
-0.15753954648971558,
-1.5061404705047607,
-0.6386123299598694,
-0.9254060983657837,
-0.17641231417655945,
0.05195748805999756,
-0.2712191641330719,
0.514185905456543,
-0.005593703594058752,
0.6230430603027344,
-0.11650601029396... |
func (m *sdt) Validate(formats strfmt.Registry) error {
return nil
} | [
0.14616593718528748,
0.4963371157646179,
0.269586443901062,
-0.03446728736162186,
-0.31948864459991455,
0.6415287256240845,
0.3129701614379883,
-0.34264156222343445,
-0.23627135157585144,
-0.3750058114528656,
-0.11003440618515015,
0.20533403754234314,
-0.2727767825126648,
0.961078643798828... |
func User(w http.ResponseWriter, r *http.Request, db *mgo.Database) {
userID := chi.URLParam(r, "userID")
helloWorld := "Hello user " + userID
render.JSON(w, r, helloWorld)
} | [
-0.2928245961666107,
0.1811603158712387,
0.4160144627094269,
0.7614583969116211,
-0.22872480750083923,
0.624447226524353,
0.7929619550704956,
0.04593326151371002,
-0.15481166541576385,
-0.37214159965515137,
-0.6744661331176758,
0.07056617736816406,
0.6480769515037537,
1.6265283823013306,
... |
func FastPing(port string, host string) (string, error) {
var err error
var cmd *exec.Cmd
cmd = exec.Command("ping-wrapper.sh", host, port)
var out bytes.Buffer
var stderr bytes.Buffer
cmd.Stdout = &out
cmd.Stderr = &stderr
err = cmd.Run()
if err != nil {
return "OFFLINE", err
}
var rc = out.String()
if... | [
-0.022151798009872437,
-0.2939531207084656,
0.8393036723136902,
0.24990196526050568,
-0.4800339639186859,
0.3014824390411377,
-0.1607057750225067,
0.010401293635368347,
-0.4462439715862274,
0.3483112156391144,
0.4574457108974457,
0.8084507584571838,
-0.1669350266456604,
0.22953157126903534... |
func TokenToModel(id int64, tok *oauth2.Token) *models.TwitchToken {
return &models.TwitchToken{
TwitchID: id,
AccessToken: tok.AccessToken,
TokenType: tok.TokenType,
RefreshToken: tok.RefreshToken,
Expiry: tok.Expiry,
}
} | [
-0.056412871927022934,
-0.15841174125671387,
0.31471264362335205,
-0.6416646242141724,
-0.2722293734550476,
-0.13904784619808197,
-1.233574628829956,
-0.28848797082901,
0.27371981739997864,
-0.21738174557685852,
-1.3284893035888672,
0.7270653247833252,
1.1572771072387695,
-0.66712874174118... |
func ModelToToken(tt *models.TwitchToken) *oauth2.Token {
return &oauth2.Token{
AccessToken: tt.AccessToken,
TokenType: tt.TokenType,
RefreshToken: tt.RefreshToken,
Expiry: tt.Expiry,
}
} | [
-0.13857446610927582,
-0.8555320501327515,
0.3445269763469696,
-0.6395927667617798,
-0.2573915123939514,
-0.08781848102807999,
-1.0621315240859985,
-0.427521675825119,
0.2718491852283478,
0.10368121415376663,
-0.7234019637107849,
1.128539800643921,
1.133092999458313,
-0.23137463629245758,
... |
func UpsertToken(ctx context.Context, exec boil.ContextExecutor, tt *models.TwitchToken) error {
return tt.Upsert(ctx, exec, true, []string{models.TwitchTokenColumns.TwitchID}, tokenUpdate, boil.Infer())
} | [
-0.7113462686538696,
-0.016400210559368134,
0.4460628032684326,
-0.0734698548913002,
0.42234671115875244,
-0.08917322754859924,
0.031471215188503265,
0.6126853823661804,
-0.10923182219266891,
0.47697997093200684,
-0.8563328981399536,
0.7567149996757507,
0.15956878662109375,
0.6075819730758... |
func FullUpsertToken(ctx context.Context, exec boil.ContextExecutor, tt *models.TwitchToken) error {
return tt.Upsert(ctx, exec, true, []string{models.TwitchTokenColumns.TwitchID}, fullTokenUpdate, boil.Infer())
} | [
-0.21513034403324127,
0.04895998165011406,
0.4764802157878876,
-0.29399776458740234,
-0.18782955408096313,
-0.5032040476799011,
-0.021091563627123833,
0.5585033893585205,
-0.12945424020290375,
0.43501341342926025,
-1.1537001132965088,
0.36463066935539246,
0.12678635120391846,
0.56634068489... |
func DeleteCommandInfo(ctx context.Context, exec boil.ContextExecutor, info *models.CommandInfo) (repeated *models.RepeatedCommand, scheduled *models.ScheduledCommand, err error) {
repeated, err = info.RepeatedCommand().One(ctx, exec)
if err != nil {
if err != sql.ErrNoRows {
return nil, nil, err
}
} else {
... | [
0.13599100708961487,
-0.5369991064071655,
0.7462396621704102,
-0.09113285690546036,
0.005659827962517738,
-0.8289600014686584,
0.6273021101951599,
0.06764132529497147,
0.37480899691581726,
-0.6633361577987671,
-0.431195467710495,
0.0778736025094986,
-0.11600145697593689,
1.0440760850906372... |
func FindCommand(ctx context.Context, exec boil.Executor, id int64, name string, forUpdate bool) (info *models.CommandInfo, commandMsg null.String, found bool, err error) {
infoAndCommand := struct {
CommandInfo models.CommandInfo `boil:"command_infos,bind"`
Message null.String `boil:"message"`
}{}
q... | [
-0.22614209353923798,
-0.659514844417572,
0.6628862023353577,
-0.3042376935482025,
-0.17143681645393372,
-0.19925187528133392,
-0.11358830332756042,
-0.7070762515068054,
-0.19851510226726532,
-0.6769570708274841,
-0.07505673915147781,
-0.3488360643386841,
-0.23636877536773682,
1.4154306650... |
func ListActiveChannels(ctx context.Context, exec boil.Executor, botName string) ([]string, error) {
var channels []struct {
Name string
}
err := models.Channels(
qm.Select(models.ChannelColumns.Name),
models.ChannelWhere.Active.EQ(true),
models.ChannelWhere.BotName.EQ(botName),
).Bind(ctx, exec, &channels... | [
0.028215192258358,
-1.140235424041748,
0.35343894362449646,
-0.9044233560562134,
0.04600420221686363,
-0.5861986875534058,
-0.6548639535903931,
-0.5112813115119934,
-0.2909509241580963,
0.6897746324539185,
-0.22733791172504425,
0.17516706883907318,
-0.3736424446105957,
0.19749602675437927,... |
func DeleteChannel(ctx context.Context, exec boil.ContextExecutor, id int64) error {
// Reverse table order; shouldn't really matter when run in a transaction.
queries := []interface {
DeleteAll(context.Context, boil.ContextExecutor) error
}{
models.ScheduledCommands(models.ScheduledCommandWhere.ChannelID.EQ(id)... | [
0.020417911931872368,
0.09600025415420532,
0.4334903657436371,
-0.7170872688293457,
0.35860660672187805,
-0.4422006607055664,
0.4997164309024811,
-0.6911154389381409,
0.46600213646888733,
-0.3245896100997925,
0.3233901858329773,
0.47939926385879517,
0.24343284964561462,
0.941278874874115,
... |
func (in *FalconAPI) DeepCopyInto(out *FalconAPI) {
*out = *in
} | [
-0.1621430367231369,
0.15748214721679688,
0.5769810080528259,
0.24555686116218567,
-0.6053274869918823,
0.6417941451072693,
-0.4666530191898346,
1.0170406103134155,
-1.020341396331787,
-0.7767350673675537,
-0.9763479828834534,
0.757253885269165,
0.09389659762382507,
-0.43767786026000977,
... |
func (in *FalconAPI) DeepCopy() *FalconAPI {
if in == nil {
return nil
}
out := new(FalconAPI)
in.DeepCopyInto(out)
return out
} | [
-0.7693820595741272,
0.49264660477638245,
0.1234728991985321,
1.1747019290924072,
-0.15917828679084778,
0.20687395334243774,
-0.3977380394935608,
-0.04755428433418274,
-0.12355159968137741,
-0.6022315621376038,
-0.7153841257095337,
-0.06866082549095154,
-0.5461494326591492,
-0.732997834682... |
func (in *FalconContainer) DeepCopyInto(out *FalconContainer) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
out.Spec = in.Spec
in.Status.DeepCopyInto(&out.Status)
} | [
0.31765010952949524,
-0.020560363307595253,
0.46389126777648926,
0.2913183569908142,
-0.09201580286026001,
-0.005883739795535803,
-0.05840814858675003,
0.7242117524147034,
-1.2920984029769897,
-0.7777643203735352,
-0.6112483739852905,
1.0584743022918701,
0.6440408229827881,
-0.017868639901... |
func (in *FalconContainer) DeepCopy() *FalconContainer {
if in == nil {
return nil
}
out := new(FalconContainer)
in.DeepCopyInto(out)
return out
} | [
-0.4331744313240051,
1.2308465242385864,
0.2548174560070038,
1.132655143737793,
0.24505378305912018,
-0.854519784450531,
-0.11143696308135986,
-0.04425979033112526,
-0.23604820668697357,
-1.0459634065628052,
-0.002515283413231373,
-0.08565711975097656,
0.12989310920238495,
-0.0077979541383... |
func (in *FalconContainer) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
} | [
-0.31811097264289856,
0.33762043714523315,
0.6162728071212769,
0.8097304105758667,
-0.046905238181352615,
0.06549545377492905,
0.6769884824752808,
-0.0021205709781497717,
-0.6144291758537292,
-0.9405725002288818,
-0.3414419889450073,
-0.14682051539421082,
0.28160738945007324,
-0.2827376425... |
func (in *FalconContainerList) DeepCopyInto(out *FalconContainerList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]FalconContainer, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
... | [
-0.2503969967365265,
0.1891745775938034,
0.5720173120498657,
0.5830268263816833,
0.05479462072253227,
-0.3427012860774994,
-0.39893364906311035,
0.9578759670257568,
-0.6541082859039307,
-0.20531781017780304,
-0.9668958187103271,
0.12548665702342987,
0.5005369782447815,
-0.00831214617937803... |
func (in *FalconContainerList) DeepCopy() *FalconContainerList {
if in == nil {
return nil
}
out := new(FalconContainerList)
in.DeepCopyInto(out)
return out
} | [
-1.0387307405471802,
0.22824783623218536,
-0.0529903881251812,
1.1259667873382568,
0.3422335982322693,
-0.705609142780304,
-0.681077241897583,
0.31495416164398193,
0.38456395268440247,
-0.2843383550643921,
-1.0053774118423462,
-0.8495236039161682,
0.8708840012550354,
0.03407425433397293,
... |
func (in *FalconContainerList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
} | [
-0.7294115424156189,
0.07599912583827972,
0.5701563358306885,
0.831995964050293,
-0.03015650436282158,
0.023125559091567993,
0.5162289142608643,
0.11904053390026093,
-0.2467789500951767,
-0.7548410892486572,
-0.89170902967453,
-0.3449363112449646,
0.3543719947338104,
0.1840295046567917,
... |
func (in *FalconContainerSpec) DeepCopyInto(out *FalconContainerSpec) {
*out = *in
out.FalconAPI = in.FalconAPI
out.Registry = in.Registry
} | [
0.41720157861709595,
0.09599953144788742,
0.4260909855365753,
-0.27107399702072144,
0.0660044327378273,
-0.1877116560935974,
-0.3991410434246063,
0.8332229852676392,
-0.6968979835510254,
-0.6082785725593567,
-0.4344184994697571,
0.9388846158981323,
1.1030610799789429,
-0.24033433198928833,... |
func (in *FalconContainerSpec) DeepCopy() *FalconContainerSpec {
if in == nil {
return nil
}
out := new(FalconContainerSpec)
in.DeepCopyInto(out)
return out
} | [
-0.19978496432304382,
0.6004911065101624,
-0.0714457556605339,
0.3552858233451843,
0.2547462284564972,
-0.5445027351379395,
-0.6573165655136108,
-0.004052165895700455,
-0.1987161934375763,
-0.22129808366298676,
-0.21823081374168396,
-0.18477344512939453,
1.3851548433303833,
-0.313435882329... |
func (in *FalconContainerStatus) DeepCopyInto(out *FalconContainerStatus) {
*out = *in
if in.Conditions != nil {
in, out := &in.Conditions, &out.Conditions
*out = make([]v1.Condition, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
} | [
0.460436075925827,
0.15303896367549896,
0.37975072860717773,
0.38762861490249634,
-0.136819988489151,
-0.47133469581604004,
-0.3608689606189728,
1.0061568021774292,
-1.0662884712219238,
-0.3281143009662628,
-0.5706671476364136,
0.302391916513443,
0.3051786720752716,
-0.5073172450065613,
... |
func (in *FalconContainerStatus) DeepCopy() *FalconContainerStatus {
if in == nil {
return nil
}
out := new(FalconContainerStatus)
in.DeepCopyInto(out)
return out
} | [
-0.29853931069374084,
0.3228745460510254,
-0.3162012994289398,
0.2786562442779541,
0.25323742628097534,
-0.8926029801368713,
-0.8056962490081787,
0.1364651620388031,
-0.030277617275714874,
-1.0674338340759277,
-1.0408127307891846,
-0.7388907670974731,
0.9314466118812561,
-0.322584301233291... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.