text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (addon *CertmanagerAddon) Description() string { return "Auto-TLS provisioning & management" }
[ 0.8114748001098633, -0.8573786616325378, 0.3441031873226166, 0.6354501247406006, -0.7064935564994812, 1.324100136756897, -0.9492645859718323, 0.21914169192314148, 0.3809312582015991, 0.9326422214508057, -0.286533385515213, 0.9111966490745544, -0.555023193359375, 0.8508302569389343, 0.397...
func (addon *CertmanagerAddon) URL() string { return "https://github.com/jetstack/cert-manager" }
[ 0.7035077214241028, -0.3678159713745117, 0.3664734959602356, 0.34714874625205994, 0.07579178363084793, 1.2452877759933472, -1.0800215005874634, 1.3941375017166138, 0.007142491172999144, 0.3944731652736664, -0.7857805490493774, 0.44924893975257874, -0.881295919418335, 0.6122795939445496, ...
func (addon *CertmanagerAddon) Install(args ...string) { node := *addon.masterNode _, err := addon.communicator.RunCmd(node, "helm install --name cert-manager --namespace ingress stable/cert-manager") FatalOnError(err) log.Println("cert-manager installed") }
[ 0.2244151085615158, -0.9483130574226379, 0.6275562047958374, 0.3680960237979889, 0.2726188004016876, 0.6331592202186584, -0.4627520740032196, 0.3555951416492462, -0.7927871346473694, 0.2821233868598938, -0.9600264430046082, 0.11372223496437073, -1.0208476781845093, 1.1098047494888306, 0....
func (addon *CertmanagerAddon) Uninstall() { node := *addon.masterNode _, err := addon.communicator.RunCmd(node, "helm delete --purge cert-manager") FatalOnError(err) log.Println("cert-manager uninstalled") }
[ 0.6620071530342102, -0.5010812878608704, 0.545491099357605, -0.22929324209690094, 0.28965550661087036, 0.008916223421692848, 0.12225562334060669, 1.4820029735565186, -0.3322925269603729, 0.24199442565441132, -0.9257529377937317, 0.32396045327186584, -0.5793250799179077, 0.6664287447929382,...
func (c *Client) Resize(width, height int) error { width = 1000000 // TODO: Remove this dirty workaround for text overflow once ssh/terminal is fixed err := c.Term.SetSize(width, height) if err != nil { log.Printf("Resize failed: %dx%d", width, height) return err } c.termWidth, c.termHeight = width, height re...
[ -0.48207664489746094, 0.5375023484230042, 0.6468037366867065, -0.6571394205093384, 0.07089881598949432, -0.288841187953949, -1.2444393634796143, -0.23582778871059418, -0.2917448878288269, -0.4078280031681061, 0.11910334974527359, 0.5566934943199158, -1.007158637046814, 0.21754762530326843,...
func GetCreateFlags() []cli.Flag { return []cli.Flag{ cli.StringFlag{ EnvVar: "OCB_URL", Name: "crowbar-url", Usage: "OpenCrowbar API URL (include port)", Value: "http://192.168.124.10:3000"}, cli.StringFlag{ EnvVar: "OCB_USER", Name: "crowbar-user", Usage: "OpenCrowbar username", Va...
[ -0.08671567589044571, -0.006674335338175297, 0.5860123038291931, 0.06522087752819061, 1.6100640296936035, 0.9021177887916565, -0.36309483647346497, -0.5305537581443787, -1.2953797578811646, -0.19421544671058655, -1.014398455619812, 0.3565811812877655, -0.745177686214447, 0.8733565211296082...
func PathCfgDir() string { dir := os.Getenv(ENV_CFG_DIR) if dir != "" { return dir } homeDir, err := Home() if err != nil { log.Fatal("can not fetch home directory") } return filepath.Join(homeDir, DEFAULT_CFG_DIR) }
[ -0.09108796715736389, -0.31616806983947754, 0.5706461668014526, 0.7881375551223755, -0.08143887668848038, 0.09689812362194061, 0.6857023239135742, -0.22126051783561707, -0.7024953961372375, 0.5515627861022949, 0.0699959322810173, -0.4087202250957489, -0.6204078197479248, 1.054433822631836,...
func (user *User) SetPrivateKey(privateKey *rsa.PrivateKey) { user.privateKey = privateKey }
[ -0.39003103971481323, 0.5736029744148254, -0.14183691143989563, 1.2914135456085205, 0.6452933549880981, 0.1694723665714264, 0.0882275328040123, -0.9117538928985596, 0.7205622792243958, 0.6596169471740723, -0.6777992844581604, 0.7328682541847229, -0.41644150018692017, 1.1676743030548096, ...
func (user *User) CreateUser(ctx context.Context, privateKey *rsa.PrivateKey, fullname string) (*User, error) { pbts, err := x509.MarshalPKIXPublicKey(privateKey.Public()) if err != nil { return nil, err } paras := map[string]interface{}{ "session_secret": base64.StdEncoding.EncodeToString(pbts), "full_name"...
[ -0.39974406361579895, -0.2904498279094696, 0.5054687261581421, 0.4660148024559021, -0.2789263427257538, -0.004358536563813686, -0.814081072807312, -0.6846123337745667, 0.9808474183082581, 0.19082939624786377, -1.421128749847412, -0.16111934185028076, -1.077210545539856, -0.0016266384627670...
func ParseDocument(data []byte) (*Doc, error) { // validate did document if err := validate(data); err != nil { return nil, err } raw := &rawDoc{} err := json.Unmarshal(data, &raw) if err != nil { return nil, fmt.Errorf("JSON marshalling of did doc bytes bytes failed: %w", err) } publicKeys, err := popul...
[ -0.15984167158603668, 0.6091333031654358, 0.6017998456954956, -0.6371402740478516, -0.841955840587616, 1.019631028175354, 0.48123741149902344, -0.5077453851699829, 1.088602066040039, -0.41314348578453064, -0.052679285407066345, 0.2785586416721344, -0.3653397858142853, 0.20229415595531464, ...
func (doc *Doc) JSONBytes() ([]byte, error) { raw := &rawDoc{ Context: doc.Context, ID: doc.ID, PublicKey: populateRawPublicKeys(doc.PublicKey), Authentication: populateRawAuthentications(doc.Authentication), Service: populateRawServices(doc.Service), Created: doc.Crea...
[ -0.8478659391403198, 0.544843852519989, 0.42859160900115967, -0.6415839195251465, -1.1784234046936035, -0.5774292349815369, -0.12715770304203033, -1.0511516332626343, 0.7408562302589417, -0.5005308985710144, -0.5345535278320312, 0.7754954099655151, -0.13901354372501373, -0.0186859574168920...
func (doc *Doc) VerifyProof() error { if len(doc.Proof) == 0 { return ErrProofNotFound } docBytes, err := doc.JSONBytes() if err != nil { return err } v := verifier.New(&didKeyResolver{doc.PublicKey}) return v.Verify(docBytes) }
[ 0.25516530871391296, 0.25820571184158325, 0.2754725515842438, 0.45549339056015015, -0.450627863407135, 0.21050310134887695, 0.05599445849657059, -0.04805799201130867, 0.35233938694000244, 0.2346821427345276, -1.3540421724319458, 0.5032801628112793, -0.6822483539581299, 1.5892783403396606, ...
func WithPublicKey(pubKey []PublicKey) DocOption { return func(opts *Doc) { opts.PublicKey = pubKey } }
[ 0.569622814655304, 0.6526088714599609, 0.21680660545825958, 0.46987807750701904, -0.14019550383090973, -0.18531560897827148, 0.10202399641275406, -0.5858689546585083, 0.2401319146156311, 1.3424822092056274, -0.6329078674316406, -0.32927921414375305, 0.5081803798675537, 1.055314064025879, ...
func WithAuthentication(auth []VerificationMethod) DocOption { return func(opts *Doc) { opts.Authentication = auth } }
[ -0.2902415692806244, 0.029627421870827675, 0.13972103595733643, 0.8796945810317993, -0.20685985684394836, -0.08568210154771805, 1.1054270267486572, -0.7386130690574646, 1.1912648677825928, 0.46607452630996704, -0.7583734393119812, -0.5368933081626892, 0.6798467040061951, 0.3821134269237518...
func WithService(svc []Service) DocOption { return func(opts *Doc) { opts.Service = svc } }
[ 0.00721667381003499, 0.4839331805706024, 0.2814374268054962, 0.3309800326824188, -0.2927420139312744, 0.19237500429153442, 0.28204789757728577, -0.7966484427452087, 0.46854346990585327, -0.47620391845703125, 0.17323346436023712, -0.023743340745568275, 0.19629120826721191, 0.745019972324371...
func WithCreatedTime(t time.Time) DocOption { return func(opts *Doc) { opts.Created = &t } }
[ 0.6617786884307861, 0.4178559482097626, 0.2076895833015442, -0.027550045400857925, -0.31073227524757385, 0.36467650532722473, -0.18848136067390442, -0.6646653413772583, 0.7331727147102356, 0.09145663678646088, -0.49589622020721436, -0.9790804386138916, 0.4805249869823456, 1.071414828300476...
func WithUpdatedTime(t time.Time) DocOption { return func(opts *Doc) { opts.Updated = &t } }
[ -0.38044416904449463, -0.20051832497119904, 0.4329248368740082, -0.11514067649841309, -1.1177282333374023, 0.7865666747093201, -0.48928043246269226, -0.35975468158721924, 0.47059550881385803, 0.6937588453292847, -0.7849542498588562, -0.602111279964447, 0.27299264073371887, 0.72588884830474...
func BuildDoc(opts ...DocOption) *Doc { doc := &Doc{} doc.Context = []string{Context} for _, opt := range opts { opt(doc) } return doc }
[ 0.5034391283988953, 0.4203506410121918, 0.2952554523944855, 0.8347693085670471, -0.22675518691539764, 0.2168075442314148, 0.19032545387744904, 0.534694254398346, 0.347608357667923, -0.5759735107421875, 0.6747034788131714, 0.7450553774833679, 0.20123696327209473, -0.8524391651153564, -1.5...
func selectionSort(A []int) { for i := 0; i < len(A)-1; i++ { minIdx := i for j := i + 1; j < len(A); j++ { if A[j] < A[minIdx] { minIdx = j } } A[i], A[minIdx] = A[minIdx], A[i] } }
[ -0.6271739602088928, -0.466028094291687, 0.655685544013977, -1.2276021242141724, -0.8205105662345886, -0.6212431788444519, 0.8865749835968018, -1.030045986175537, 1.197557806968689, 0.3654487133026123, -0.2457543909549713, 0.7527334690093994, -0.1424674540758133, -0.07723012566566467, -0...
func (s *SubnetListener) Create(inctx context.Context, in *protocol.SubnetCreateRequest) (_ *protocol.Subnet, err error) { defer fail.OnExitConvertToGRPCStatus(inctx, &err) defer fail.OnExitLogError(inctx, &err) defer fail.OnExitWrapError(inctx, &err, "cannot create Subnet") if s == nil { return nil, fail.Invali...
[ -0.24980776011943817, 0.3244633376598358, 0.5331805348396301, 0.6355318427085876, 0.11281338334083557, 0.36417141556739807, 0.27916836738586426, -0.629396378993988, -0.28978919982910156, -0.17222443222999573, 0.1998697966337204, -0.1248321682214737, -0.362485408782959, 0.7484416365623474, ...
func (s *SubnetListener) Inspect(inctx context.Context, in *protocol.SubnetInspectRequest) (_ *protocol.Subnet, err error) { defer fail.OnExitConvertToGRPCStatus(inctx, &err) defer fail.OnExitLogError(inctx, &err) defer fail.OnExitWrapError(inctx, &err, "cannot inspect Subnet") defer fail.OnPanic(&err) if s == ni...
[ -0.05238453298807144, 0.143063023686409, 0.8368602395057678, -0.3732111155986786, -0.8268967866897583, 0.4535306990146637, 0.09349409490823746, -0.6526594161987305, -0.24040654301643372, 0.08031826466321945, 0.14398272335529327, 0.8557859063148499, -0.38467925786972046, -0.6227325797080994...
func (s *SubnetListener) BindSecurityGroup(inctx context.Context, in *protocol.SecurityGroupSubnetBindRequest) (empty *googleprotobuf.Empty, err error) { defer fail.OnExitConvertToGRPCStatus(inctx, &err) defer fail.OnExitLogError(inctx, &err) defer fail.OnExitWrapError(inctx, &err, "cannot bind Security Group to Sub...
[ -0.2285895049571991, 0.08143585920333862, 0.5236825942993164, 0.36848482489585876, -0.06356284767389297, 0.5053776502609253, -0.10564788430929184, -0.5351242423057556, -0.35480183362960815, -0.054853249341249466, -0.0691627562046051, 0.5176451206207275, -0.8387811183929443, 0.4811754226684...
func (s *SubnetListener) UnbindSecurityGroup(inctx context.Context, in *protocol.SecurityGroupSubnetBindRequest) (empty *googleprotobuf.Empty, err error) { defer fail.OnExitConvertToGRPCStatus(inctx, &err) defer fail.OnExitLogError(inctx, &err) defer fail.OnExitWrapError(inctx, &err, "cannot unbind Security Group fr...
[ -0.20261195302009583, 0.3952512741088867, 0.4174290895462036, 0.14835549890995026, -0.6222383975982666, 0.7261251211166382, 0.3474217355251312, -0.4909473955631256, -0.3680296838283539, 0.028129663318395615, -0.23892492055892944, 0.5006025433540344, -0.9311692118644714, 0.5302811861038208,...
func (s *SubnetListener) EnableSecurityGroup(inctx context.Context, in *protocol.SecurityGroupSubnetBindRequest) (empty *googleprotobuf.Empty, err error) { defer fail.OnExitConvertToGRPCStatus(inctx, &err) defer fail.OnExitLogError(inctx, &err) defer fail.OnExitWrapError(inctx, &err, "cannot enable Security Group of...
[ -0.17133942246437073, 0.5937100648880005, 0.47047609090805054, -0.04507598653435707, -0.03940804302692413, 0.7500423192977905, 0.1385381817817688, -0.23601272702217102, -0.41443127393722534, -0.04817331209778786, -0.6641186475753784, 0.606036365032196, -0.8927338123321533, 0.37736558914184...
func (s *SubnetListener) DisableSecurityGroup(inctx context.Context, in *protocol.SecurityGroupSubnetBindRequest) (empty *googleprotobuf.Empty, err error) { defer fail.OnExitConvertToGRPCStatus(inctx, &err) defer fail.OnExitLogError(inctx, &err) defer fail.OnExitWrapError(inctx, &err, "cannot disable Security Group ...
[ -0.2640884816646576, 0.21922871470451355, 0.490443617105484, 0.21721740067005157, -0.5414572954177856, 0.7610102891921997, 0.6353959441184998, -0.1713525354862213, -0.4586687386035919, 0.1646517813205719, -0.24560527503490448, 0.22355738282203674, -1.2315673828125, 0.5149834752082825, 0....
func (s *SubnetListener) ListSecurityGroups(inctx context.Context, in *protocol.SecurityGroupSubnetBindRequest) (_ *protocol.SecurityGroupBondsResponse, err error) { defer fail.OnExitConvertToGRPCStatus(inctx, &err) defer fail.OnExitLogError(inctx, &err) defer fail.OnExitWrapError(inctx, &err, "cannot list Security ...
[ -0.06720252335071564, 0.3917822241783142, 0.5109067559242249, 0.012120204977691174, -0.2509727478027344, 0.08022189885377884, -0.7391158938407898, -1.1362330913543701, 0.49373969435691833, 0.2079494148492813, -0.6680570244789124, 0.3455555737018585, -1.0931767225265503, 0.01398403476923704...
func (m *Meta) Mutable() *Meta { assert.That(m.difInfo == nil) ov2 := *m // copy ov2.difInfo = make(map[string]*Info) return &ov2 }
[ 0.08708201348781586, -1.147874355316162, 0.47695592045783997, 0.3127272129058838, -0.39654165506362915, 0.35475069284439087, -0.21035127341747284, -0.5207370519638062, -0.4077741503715515, -0.032488755881786346, 0.06817303597927094, 0.5832425355911255, 0.9782090783119202, -0.65712159872055...
func (m *Meta) GetRoInfo(table string) *Info { if ti, ok := m.difInfo[table]; ok { return ti } if ti, ok := m.info.Get(table); ok && !ti.IsTomb() { return ti } return nil }
[ 0.14180593192577362, 0.08529175072908401, 0.40931373834609985, 0.2693175673484802, 0.3823961615562439, -0.77892005443573, 0.37318986654281616, -0.7726136445999146, -0.8918378949165344, 0.14341075718402863, 0.3498741388320923, -0.23051248490810394, -1.0254799127578735, -0.2812691032886505, ...
func copyInfo(ti *Info) *Info { cp := *ti cp.Indexes = slices.Clone(cp.Indexes) for i, ov := range cp.Indexes { cp.Indexes[i] = ov.Copy() } return &cp }
[ 0.25014835596084595, -0.9535915851593018, 0.36755824089050293, 0.10562529414892197, -0.8491088151931763, 0.9128863215446472, 0.5275333523750305, -1.0242958068847656, -0.1458297073841095, 0.9013916254043579, -0.060383595526218414, 0.28234219551086426, 0.10200303792953491, -0.998010873794555...
func (m *Meta) Put(ts *Schema, ti *Info) *Meta { cp := *m // copy ts.lastMod = m.schema.Clock schema := m.schema.Mutable() schema.Put(ts) cp.schema.Hamt = schema.Freeze() if ti != nil { ti.lastMod = m.info.Clock info := m.info.Mutable() info.Put(ti) cp.info.Hamt = info.Freeze() } return &cp }
[ 0.19805805385112762, 0.3028096556663513, 0.42654839158058167, -0.6311337351799011, -0.35205575823783875, 0.3608857989311218, 0.19767995178699493, 0.21084077656269073, -0.7717468738555908, 0.7312314510345459, 0.030748609453439713, 0.910905122756958, -0.4918160140514374, -0.47007155418395996...
func (m *Meta) Ensure(a *schema.Schema, store *stor.Stor) ([]schema.Index, *Meta) { ts, ok := m.schema.Get(a.Table) if !ok || ts.IsTomb() { panic("ensure: couldn't find " + a.Table) } ts, ti := m.alterGet(a.Table) var newIdxs []schema.Index for i := range a.Indexes { if nil == ts.FindIndex(a.Indexes[i].Column...
[ -0.4665033519268036, 0.07099007815122604, 0.39079710841178894, 0.7200720310211182, 0.27579841017723083, -0.5051135420799255, 0.0783441811800003, 0.28767552971839905, 0.4156571328639984, 0.004718820098787546, -0.34372568130493164, 0.22735457122325897, 0.4650794565677643, -0.0300223529338836...
func (m *Meta) Drop(name string) *Meta { if m.GetView(name) != "" { // view return m.Put(m.newSchemaTomb("="+name), nil) } // table ts, ok := m.schema.Get(name) if !ok || ts.IsTomb() { return nil // nonexistent } if list := fkToHere(&ts.Schema); list != nil { panic("can't drop table used by foreign keys:...
[ -0.7958036065101624, 0.7910019755363464, 0.8408095836639404, 0.562073290348053, -0.8714079260826111, -0.2867113947868347, 0.39996033906936646, -0.38077080249786377, -0.21485771238803864, 0.3735935091972351, 0.33728331327438354, -0.48853135108947754, -0.12795059382915497, 0.6051009893417358...
func replaceUnique(list, from, to []string) []string { list = slices.Clone(list) for i, f := range from { j := slices.Index(list, f) if j == -1 { panic("can't rename nonexistent column: " + f) } if slices.Contains(list, to[i]) { panic("can't rename to existing column: " + to[i]) } list[j] = to[i] }...
[ -0.5144470930099487, -0.06551456451416016, 0.641960859298706, 0.18360130488872528, 0.15442465245723724, -0.3818449079990387, -0.4501798748970032, 0.9704935550689697, -0.23016370832920074, 1.1531989574432373, -1.5387400388717651, 0.843460738658905, 0.25097835063934326, -0.821340799331665, ...
func replace(list, from, to []string) []string { cloned := false for i, f := range from { for j := range list { if list[j] == f { if !cloned { list = slices.Clone(list) cloned = true } list[j] = to[i] } } } return list }
[ -0.1609245389699936, -0.3912770450115204, 0.6273854374885559, 0.43020105361938477, -0.2184009552001953, -0.47524410486221313, -1.2031116485595703, 1.4404443502426147, 0.18830689787864685, 0.9382519721984863, -0.8519916534423828, 0.26569828391075134, -0.4779343605041504, -0.1685637086629867...
func (m *Meta) PutNew(ts *Schema, ti *Info, ac *schema.Schema) *Meta { ts.created = m.schema.Clock ti.created = m.info.Clock mu := newMetaUpdate(m) mu.putSchema(ts) mu.putInfo(ti) m.createFkeys(mu, &ts.Schema, ac) return mu.freeze() }
[ -0.09373990446329117, 0.42194467782974243, 0.5042407512664795, 0.16715963184833527, -0.46631771326065063, 0.10623353719711304, -0.018758434802293777, -0.037123583257198334, -1.228598713874817, 0.5001057386398315, 0.14214201271533966, 0.3388765752315521, 0.24319331347942352, -0.107326544821...
func createIndexes(ts *Schema, ti *Info, idxs []schema.Index, store *stor.Stor) { if len(idxs) == 0 { return } ts.Indexes = slices.Clip(ts.Indexes) // copy on write nold := len(ts.Indexes) for i := range idxs { ix := &idxs[i] if ts.FindIndex(ix.Columns) != nil { panic("duplicate index: " + str.Join("(...
[ -0.5056264400482178, -0.08841731399297714, 0.482417494058609, 0.44897550344467163, 0.19877520203590393, 0.032648395746946335, 0.11071524769067764, 0.23383377492427826, 0.14010827243328094, 0.7743634581565857, 0.1823660284280777, -0.26983949542045593, -0.12181302905082703, -0.28149247169494...
func (m *Meta) CheckFkeys(ts *schema.Schema) { idxs := ts.Indexes for i := range idxs { fk := &idxs[i].Fk if fk.Table == "" { continue } tsi := ts.IIndex(idxs[i].Columns) fk = &ts.Indexes[tsi].Fk fkCols := fk.Columns if len(fkCols) == 0 { fkCols = idxs[i].Columns } target, ok := m.schema.Get(f...
[ -0.7547172904014587, 0.43162545561790466, 0.6985055804252625, 0.12746243178844452, 0.4495093822479248, -0.4178110361099243, 0.12635022401809692, -0.25737497210502625, -0.3346041440963745, 0.9340051412582397, 0.30873873829841614, -0.061109140515327454, -0.26916906237602234, 0.41464093327522...
func (m *Meta) TouchTable(table string) *Meta { schema := *m.GetRoSchema(table) // copy mu := newMetaUpdate(m) mu.putSchema(&schema) return mu.freeze() }
[ -0.04784221574664116, -0.29259389638900757, 0.4904896914958954, 0.672217607498169, -0.8376360535621643, -0.032539002597332, 0.28617531061172485, 0.8601729869842529, 0.11533752083778381, 0.4280742406845093, 0.06090610846877098, -0.4855606257915497, 0.11201080679893494, -0.27454695105552673,...
func (m *Meta) TouchIndexes(table string) *Meta { schema := *m.GetRoSchema(table) // copy schema.Indexes = slices.Clone(schema.Indexes) mu := newMetaUpdate(m) mu.putSchema(&schema) return mu.freeze() }
[ -0.4305444657802582, 0.03440096229314804, 0.38032594323158264, 0.8420373797416687, -0.8663292527198792, -0.1328122913837433, 0.45427414774894714, 1.011881947517395, 0.24613963067531586, 0.37972214818000793, -0.1391872763633728, -0.05265850946307182, -0.08354056626558304, -0.559820413589477...
func (m *Meta) LayeredOnto(latest *Meta) *Meta { // start with a snapshot of the latest hash table because it may have more assert.That(latest.difInfo == nil) info := latest.info.Mutable() for _, ti := range m.difInfo { lti, ok := info.Get(ti.Table) if !ok || lti.IsTomb() { continue } ti.Nrows = lti.Nrow...
[ 0.12175343185663223, -0.3053176701068878, 0.8692755699157715, -0.5415957570075989, -0.205104798078537, -0.08403989672660828, 0.1765819638967514, -0.42285656929016113, -1.1043814420700073, -0.11821981519460678, -0.31477299332618713, 0.04599279165267944, 0.34351393580436707, 0.32362005114555...
func linkFkeys(m *Meta) { m.schema.ForEach(func(s *Schema) { if s.IsTomb() { return } for i := range s.Indexes { fk := &s.Indexes[i].Fk if fk.Table != "" { fkCols := fk.Columns if len(fkCols) == 0 { fkCols = s.Indexes[i].Columns } // ok to modify actual schema because it's not share...
[ -0.7940478920936584, -0.113835409283638, 0.7769312262535095, 0.03208371251821518, 0.8209065794944763, -0.4762004613876343, 1.1071528196334839, 0.21572288870811462, 0.24097615480422974, 0.17013749480247498, 0.10494875907897949, 0.34826377034187317, -0.26498231291770935, 0.24392491579055786,...
func ValidateIDToken(idToken, clientID, hostedDomain string) (*IDTokenClaims, error) { token, err := jwt.Parse(idToken, GoogleKeyFunc) if err != nil { return nil, err } if !token.Valid { return nil, ErrInvalidIDToken } mapClaims, ok := token.Claims.(jwt.MapClaims) if !ok { return nil, ErrInvalidIDToken ...
[ 0.30577048659324646, -0.719066321849823, 0.647257387638092, -0.8555421233177185, -0.4158884882926941, 0.6132879853248596, -0.6755701899528503, -0.21795611083507538, 0.06053232029080391, -0.852868914604187, -0.5260655283927917, 0.7760560512542725, -0.7932047247886658, 0.3857262134552002, ...
func Dump(root, keyfile, outfile string) { pswd := getUserPswd() k := hashPswd(pswd) f, err := os.OpenFile(outfile, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0666) if err != nil { FatalError(err, "could not open outfile") } defer f.Close() writePswdStore(root, root, keyfile, f) encryptFile(k[:], outfile) }
[ -0.013241540640592575, -0.15089505910873413, 0.48194441199302673, 0.47450166940689087, -0.7887252569198608, 1.097409963607788, 1.0495885610580444, 0.8721998333930969, -0.36805227398872375, -0.2670672833919525, 0.0400550439953804, -0.0801786333322525, -0.45782360434532166, 0.778307855129241...
func Hey(remark string) string { remark = strings.Trim(remark, " \t\n\r") if remark == "" { return "Fine. Be that way!" } if IsQuestion(remark) { if HasLetters(remark) && IsYell(remark) { return "Calm down, I know what I'm doing!" } return "Sure." } if HasLetters(remark) && IsYell(remark) { return ...
[ 0.3817543387413025, -0.49327412247657776, 0.6843932271003723, -0.21929284930229187, 0.029160799458622932, -0.07516021281480789, 0.06077368184924126, -0.1089438647031784, 0.022170597687363625, -0.3990779221057892, -0.2271990180015564, 0.7745651602745056, 0.22054032981395721, 0.3703368008136...
func IsYell(remark string) bool { return remark == strings.ToUpper(remark) }
[ 0.006080486811697483, -1.001732587814331, 0.5370487570762634, 0.003997764550149441, -0.40346190333366394, 0.2216932475566864, 0.09235727787017822, 0.32538703083992004, 1.1492308378219604, -0.33990028500556946, -1.2210131883621216, 1.3436287641525269, 0.37341177463531494, 0.9282436370849609...
func IsQuestion(remark string) bool { return remark[len(remark)-1] == '?' }
[ 0.14195427298545837, -0.9745407104492188, 0.5631225109100342, 0.5791218280792236, -0.12947112321853638, -0.031175460666418076, -0.16495095193386078, 0.6604213714599609, 1.1642192602157593, 0.1901775747537613, -0.5145103335380554, 0.3344251811504364, -1.1029553413391113, -0.260626882314682,...
func HasLetters(remark string) bool { return strings.ContainsAny(strings.ToUpper(remark), "ABCDEFGHIJKLMNOPQRSTUVWXYZ") }
[ -0.051175087690353394, 0.11392045021057129, 0.602173924446106, -1.026421070098877, -0.3981669545173645, 0.1795138120651245, -0.4972689747810364, 0.5106402039527893, 0.5846040844917297, -0.15442746877670288, -0.47787874937057495, 0.5672436952590942, -0.4362103044986725, 0.7812635898590088, ...
func NewUserRepository(db *pgxpool.Pool) UserRepository { return userRepository{conn: db} }
[ -0.4092194736003876, -0.416797012090683, 0.190430149435997, 0.11849011480808258, -1.0573383569717407, -0.4335234463214874, -0.5161811113357544, 0.39883342385292053, 0.12411056458950043, -0.3920111656188965, -0.5128381252288818, -0.03393714874982834, 0.17347382009029388, 0.2282080203294754,...
func NewManagedInstancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedInstancesClient, error) { cl, err := arm.NewClient(moduleName+".ManagedInstancesClient", moduleVersion, credential, options) if err != nil { return nil, err } client := &ManagedInstancesCl...
[ 0.3814643919467926, -0.4584691822528839, 0.3068314790725708, -0.817979633808136, -0.6224623918533325, 0.21452893316745758, -0.6519426703453064, -1.1974682807922363, -0.07626329362392426, -0.12694795429706573, -0.14867454767227173, 1.3072381019592285, -0.6522356867790222, 0.0273181833326816...
func (client *ManagedInstancesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters ManagedInstance, options *ManagedInstancesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{reso...
[ -0.43887075781822205, -0.30225813388824463, 0.8330954909324646, -0.8464168906211853, -1.0438854694366455, 0.2997637391090393, -0.14028283953666687, -0.35393425822257996, 0.03539932146668434, 0.41092127561569214, 0.8431642055511475, 0.8878001570701599, -0.2229495346546173, 0.812527775764465...
func (client *ManagedInstancesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ManagedInstancesClientBeginDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/manag...
[ 0.16344866156578064, -0.21392977237701416, 0.9354715943336487, -0.5119152665138245, -1.0594874620437622, 0.09905440360307693, 0.06209227815270424, -0.24613970518112183, -0.05107536539435387, -0.25528934597969055, 0.916628897190094, 1.4479048252105713, -0.38242456316947937, 0.64803647994995...
func (client *ManagedInstancesClient) failoverCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ManagedInstancesClientBeginFailoverOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/m...
[ -0.2583112120628357, 0.07915342599153519, 0.899468719959259, -0.4229504466056824, -0.9758939743041992, 0.3478032648563385, -0.08066995441913605, -0.4632435441017151, -0.30717357993125916, -0.0946970134973526, 0.4716233015060425, 1.1395193338394165, -0.4416922628879547, 0.7715687155723572, ...
func (client *ManagedInstancesClient) getCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ManagedInstancesClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances...
[ -0.1524118036031723, 0.04440426081418991, 1.2100694179534912, -0.6811822652816772, -0.6859794855117798, 0.05832682177424431, -0.44215643405914307, -0.5178329944610596, -0.20758971571922302, 0.1590142399072647, 1.078889012336731, 1.6688069105148315, -0.3626313805580139, 0.2860857844352722, ...
func (client *ManagedInstancesClient) getHandleResponse(resp *http.Response) (ManagedInstancesClientGetResponse, error) { result := ManagedInstancesClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstance); err != nil { return ManagedInstancesClientGetResponse{}, err } return result, ni...
[ 0.14573298394680023, -0.4329759180545807, 0.6838987469673157, -0.4897342324256897, -0.6216630339622498, 0.11160904914140701, 0.15490862727165222, -0.5197014808654785, 0.6272748112678528, -0.817069947719574, -0.04562331363558769, -0.3302983045578003, -1.1195557117462158, -0.4653704166412353...
func (client *ManagedInstancesClient) NewListPager(options *ManagedInstancesClientListOptions) *runtime.Pager[ManagedInstancesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ManagedInstancesClientListResponse]{ More: func(page ManagedInstancesClientListResponse) bool { return page.NextLink != ...
[ -0.3724152147769928, -0.4572826623916626, 0.6260840892791748, -0.8467006087303162, -0.3849031329154968, -0.012807462364435196, -0.45141926407814026, -0.4629133343696594, 0.4405772387981415, 0.5239928960800171, 0.4350368082523346, 0.2589753270149231, -0.885150134563446, 1.5036591291427612, ...
func (client *ManagedInstancesClient) listCreateRequest(ctx context.Context, options *ManagedInstancesClientListOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscrip...
[ -0.041153762489557266, -0.09040071070194244, 0.925166130065918, -0.6933183073997498, -0.3579406440258026, -0.19182002544403076, -0.5081421732902527, 0.0647875964641571, 0.3203962743282318, 0.011377999559044838, 0.39159953594207764, 1.1474316120147705, -0.15579316020011902, 0.81178915500640...
func (client *ManagedInstancesClient) listHandleResponse(resp *http.Response) (ManagedInstancesClientListResponse, error) { result := ManagedInstancesClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstanceListResult); err != nil { return ManagedInstancesClientListResponse{}, err } ret...
[ -0.24746744334697723, -1.1926547288894653, 0.5088381171226501, -0.9806163907051086, -0.6314916014671326, 0.09479738026857376, -0.08831894397735596, -0.36205244064331055, 0.8907055258750916, 0.1274685114622116, -0.6063089966773987, -0.6571338772773743, -0.9280675053596497, 0.056988734751939...
func (client *ManagedInstancesClient) NewListByInstancePoolPager(resourceGroupName string, instancePoolName string, options *ManagedInstancesClientListByInstancePoolOptions) *runtime.Pager[ManagedInstancesClientListByInstancePoolResponse] { return runtime.NewPager(runtime.PagingHandler[ManagedInstancesClientListByInst...
[ -0.8564508557319641, -0.8832650184631348, 0.49545589089393616, -0.8271719217300415, -0.4580562710762024, 0.20422424376010895, -0.07605928182601929, -0.8673135638237, 0.2019175887107849, 0.667227029800415, 0.40002089738845825, 0.3715575039386749, -1.179263949394226, 1.2048695087432861, 0....
func (client *ManagedInstancesClient) listByInstancePoolCreateRequest(ctx context.Context, resourceGroupName string, instancePoolName string, options *ManagedInstancesClientListByInstancePoolOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Mic...
[ -0.6599884033203125, -0.39203977584838867, 0.64630126953125, -0.7079357504844666, -0.5077253580093384, -0.0712970718741417, 0.05965658277273178, -0.6354756355285645, -0.13010139763355255, 0.28717127442359924, 0.15870989859104156, 1.3697218894958496, -0.6973363161087036, 0.36508333683013916...
func (client *ManagedInstancesClient) listByInstancePoolHandleResponse(resp *http.Response) (ManagedInstancesClientListByInstancePoolResponse, error) { result := ManagedInstancesClientListByInstancePoolResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstanceListResult); err != nil { return Managed...
[ -0.2653047740459442, -1.0769168138504028, 0.1802663505077362, -0.8999075889587402, -0.3004065752029419, 0.21014638245105743, 0.41799935698509216, -0.7630034685134888, 0.07142793387174606, 0.5568720698356628, -1.023964762687683, -0.1278740018606186, -1.3469570875167847, 0.011129331775009632...
func (client *ManagedInstancesClient) NewListByManagedInstancePager(resourceGroupName string, managedInstanceName string, options *ManagedInstancesClientListByManagedInstanceOptions) *runtime.Pager[ManagedInstancesClientListByManagedInstanceResponse] { return runtime.NewPager(runtime.PagingHandler[ManagedInstancesClie...
[ -0.37421005964279175, -0.7342619895935059, 0.4017895460128784, -1.0390262603759766, -0.2940167188644409, 0.23651856184005737, -0.27496087551116943, -0.6547484993934631, 0.24816091358661652, 0.2721613645553589, 0.7329858541488647, 0.09746580570936203, -0.7907617092132568, 1.5080006122589111...
func (client *ManagedInstancesClient) listByManagedInstanceCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ManagedInstancesClientListByManagedInstanceOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/prov...
[ -0.22075384855270386, -0.014517370611429214, 0.6635366678237915, -0.7404088973999023, -0.010980935767292976, 0.22835847735404968, 0.26460620760917664, -0.23295697569847107, 0.090859554708004, 0.1414702832698822, 0.5598198771476746, 0.9454574584960938, -0.4839206635951996, 0.853017508983612...
func (client *ManagedInstancesClient) listByManagedInstanceHandleResponse(resp *http.Response) (ManagedInstancesClientListByManagedInstanceResponse, error) { result := ManagedInstancesClientListByManagedInstanceResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.TopQueriesListResult); err != nil { return Man...
[ 0.05073362961411476, -1.0965580940246582, 0.3436814546585083, -1.1107075214385986, -0.8157743215560913, 0.4604540467262268, 0.5016309022903442, -0.35355228185653687, 0.19775207340717316, 0.10792672634124756, -0.5793277621269226, -0.7324702143669128, -0.836345374584198, 0.12229077517986298,...
func (client *ManagedInstancesClient) NewListByResourceGroupPager(resourceGroupName string, options *ManagedInstancesClientListByResourceGroupOptions) *runtime.Pager[ManagedInstancesClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[ManagedInstancesClientListByResourceGroupResponse]{ ...
[ -0.4492967426776886, -0.4759826064109802, 0.18959997594356537, -1.025545597076416, -0.6680406928062439, 0.0017883561085909605, -0.0012796528171747923, -0.8103796243667603, 0.21181559562683105, 0.4084772765636444, 1.1149499416351318, -0.3135630190372467, -0.8352689743041992, 1.7535148859024...
func (client *ManagedInstancesClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ManagedInstancesClientListByResourceGroupOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInsta...
[ -0.05261905863881111, 0.03547436743974686, 0.31859710812568665, -0.8314018249511719, -0.5439415574073792, -0.16587911546230316, 0.09363385289907455, -0.689670979976654, -0.05593468248844147, 0.23630626499652863, 0.5480322241783142, 0.4972173273563385, -0.2768549919128418, 1.066909790039062...
func (client *ManagedInstancesClient) listByResourceGroupHandleResponse(resp *http.Response) (ManagedInstancesClientListByResourceGroupResponse, error) { result := ManagedInstancesClientListByResourceGroupResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ManagedInstanceListResult); err != nil { return Mana...
[ -0.008537313900887966, -0.6848691701889038, -0.07274980843067169, -1.2204015254974365, -0.832832396030426, 0.12139248102903366, 0.42727765440940857, -0.8103858232498169, 0.06842179596424103, 0.009041843004524708, -0.0536760650575161, -1.2257057428359985, -0.9043195843696594, 0.842489540576...
func (client *ManagedInstancesClient) NewListOutboundNetworkDependenciesByManagedInstancePager(resourceGroupName string, managedInstanceName string, options *ManagedInstancesClientListOutboundNetworkDependenciesByManagedInstanceOptions) *runtime.Pager[ManagedInstancesClientListOutboundNetworkDependenciesByManagedInstan...
[ -0.3362027108669281, -0.4861302077770233, 0.5062659382820129, -1.3433701992034912, -0.4774280786514282, 0.6464722156524658, 0.002807767828926444, -0.7282536625862122, 0.09546418488025665, -0.22419176995754242, 0.368071049451828, -0.07184158265590668, -0.498896986246109, 1.5362300872802734,...
func (client *ManagedInstancesClient) listOutboundNetworkDependenciesByManagedInstanceCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ManagedInstancesClientListOutboundNetworkDependenciesByManagedInstanceOptions) (*policy.Request, error) { urlPath := "/subscriptions/{s...
[ -0.25139138102531433, -0.11381883174180984, 0.6599018573760986, -1.149821400642395, -0.42954209446907043, 0.5059515237808228, 0.09266960620880127, -0.47515177726745605, -0.11599691957235336, -0.05506319925189018, 0.5020131468772888, 0.6987853646278381, -0.1376112848520279, 1.03669619560241...
func (client *ManagedInstancesClient) listOutboundNetworkDependenciesByManagedInstanceHandleResponse(resp *http.Response) (ManagedInstancesClientListOutboundNetworkDependenciesByManagedInstanceResponse, error) { result := ManagedInstancesClientListOutboundNetworkDependenciesByManagedInstanceResponse{} if err := runti...
[ 0.3087541162967682, -0.715625524520874, 0.3673611879348755, -1.4291481971740723, -0.6391314268112183, 1.004217505455017, 0.6106728315353394, -0.4386638104915619, 0.0051248581148684025, 0.28498443961143494, -0.5077941417694092, -0.9255983233451843, -0.730118453502655, 0.6769728660583496, ...
func (client *ManagedInstancesClient) startCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ManagedInstancesClientBeginStartOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managed...
[ 0.037316422909498215, -0.2818054258823395, 0.9086254835128784, -0.3658142685890198, -0.9259966611862183, 0.15045297145843506, 0.07746555656194687, -0.285539835691452, -0.5385241508483887, 0.08391867578029633, 0.7118731737136841, 1.8231502771377563, -0.38153454661369324, 0.7545175552368164,...
func (client *ManagedInstancesClient) stopCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ManagedInstancesClientBeginStopOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedIn...
[ -0.8084028363227844, -0.31116625666618347, 0.7974517345428467, -0.9608860611915588, -0.8826647400856018, 0.27949145436286926, 0.09376820176839828, -0.2656782567501068, -0.9456708431243896, 0.058083537966012955, 0.854081392288208, 1.1981457471847534, -0.5446932911872864, 0.27363044023513794...
func (client *ManagedInstancesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters ManagedInstanceUpdate, options *ManagedInstancesClientBeginUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupN...
[ -0.6101023554801941, -0.47208282351493835, 1.0375877618789673, -0.6274310946464539, -1.5068988800048828, 0.2026824802160263, -0.17477425932884216, -0.15366697311401367, -0.23617857694625854, 0.5385560989379883, 0.7828219532966614, 1.399168848991394, -0.3932413160800934, 0.41582542657852173...
func GetEnvVar(podSpec corev1.PodSpec, envName string) *corev1.EnvVar { for _, container := range podSpec.Containers { for _, containerEnv := range container.Env { if containerEnv.Name == envName { return &containerEnv } } } return nil }
[ -0.23516203463077545, -0.8719884753227234, 0.882997989654541, -0.16905739903450012, -0.2835294306278229, -0.03947534039616585, -0.08872845023870468, -0.768895149230957, -0.46370208263397217, 0.37400439381599426, 0.023377349600195885, 1.0193264484405518, -0.07721024751663208, 0.319044351577...
func Merge(changing [][]byte, static ...[]byte) (merged []byte) { merged = make([]byte, 0) if len(changing) <= 0 && len(static) <= 0 { return } for _, bs := range static { merged = append(merged, bs...) } for _, bs := range changing { merged = append(merged, Int64ToBytes(int64(len(bs)))...) merged = appen...
[ -1.1061831712722778, 0.9137717485427856, 0.7393131256103516, 0.7422481775283813, 0.12698593735694885, 0.12762637436389923, -1.311847448348999, -0.10614784806966782, -0.3669073283672333, -0.14560523629188538, -0.743849515914917, 0.8077618479728699, -0.7383804321289062, 1.6609973907470703, ...
func Demerge(comp []byte, length []int) (BS [][]byte) { BS = make([][]byte, 0) if len(comp) <= 0 && len(length) <= 0 { return } currIdx := 0 for _, l := range length { if currIdx+l > len(comp) { break } BS = append(BS, comp[currIdx:currIdx+l]) currIdx += l } for true { length := int(BytesToInt64(...
[ -0.5436972379684448, -0.12016969919204712, 1.1077709197998047, -0.4039113521575928, 0.16630196571350098, -0.3531128168106079, 0.015402224846184254, 0.4929610788822174, 0.922166645526886, 0.191189706325531, -0.42607632279396057, 0.3357333838939667, -1.4882270097732544, -0.06511358916759491,...
func CompressAll(changing [][]byte, static ...[]byte) (comp []byte) { comp = Merge(changing, static...) comp, _ = CompressBytes(comp) return }
[ 0.15467381477355957, 0.07610394060611725, 0.6838050484657288, 0.9706917405128479, -0.4850798547267914, 0.03102121315896511, -1.3101791143417358, 0.2541891038417816, 0.3299998641014099, 0.44852331280708313, -0.6383742690086365, 0.6091778874397278, -0.5571354627609253, 2.0888233184814453, ...
func DecompressAll(comp []byte, length []int) (BS [][]byte) { comp, _ = DecompressBytes(comp) BS = Demerge(comp, length) return }
[ 0.7575094699859619, -0.4020118713378906, 0.7967533469200134, 0.30493003129959106, -0.3278350830078125, -0.4344939589500427, -0.7553673982620239, 0.4658994674682617, 0.4732297360897064, -0.16746549308300018, -0.9660045504570007, 0.0501030758023262, -1.0862864255905151, 0.8656506538391113, ...
func (db *DB) InsertFacility(facility Facility) (sql.Result, error) { return db.Exec( fmt.Sprintf("INSERT INTO %s(%s) VALUES($1)", FacilityTableName, FacilityTypeCol), facility.Type, ) }
[ -1.3097504377365112, 1.1541111469268799, 0.29520493745803833, 0.42141175270080566, 0.8958542943000793, -0.3862934112548828, 1.219423770904541, -0.4311434328556061, -0.44498980045318604, -0.14760811626911163, -0.6510464549064636, -0.7652611136436462, -0.49494704604148865, 0.7386491298675537...
func (db *DB) AllFacilities() ([]*Facility, error) { rows, err := db.Query("SELECT * FROM facilities ORDER BY type") if err != nil { return nil, err } return generateFacilities(rows) }
[ -0.6149818301200867, -0.2945536971092224, 0.36679211258888245, 0.9930539727210999, 0.3104802370071411, -0.024069974198937416, 0.08895136415958405, -0.1008298248052597, 0.7797495722770691, -1.2528417110443115, 0.24157647788524628, 0.003871048102155328, 0.11795394867658615, 1.197449803352356...
func (db *DB) FindFacility(where string, params ...interface{}) (*Facility, error) { facility := new(Facility) row := db.QueryRow(fmt.Sprintf("SELECT * FROM facilities WHERE %s", where), params...) err := row.Scan(&facility.ID, &facility.Type) if err != nil { return nil, err } return facility, nil }
[ -0.3923850655555725, -0.03263728693127632, 0.3271919786930084, 0.6939045786857605, 0.6065798401832581, -1.2413207292556763, 0.6690080165863037, -1.0698211193084717, -0.408465176820755, -0.4225451350212097, 0.3853830099105835, -0.4554497301578522, -0.106368288397789, 0.9758110642433167, -...
func (n *nativeObject) SampleCount() int { return n.sampleCount }
[ 0.8156567811965942, -0.651311993598938, 0.4887036085128784, -0.20672808587551117, -0.20620959997177124, 0.5839616060256958, 0.5147140026092529, -0.266045480966568, -0.10145676881074905, -0.6835509538650513, -0.48779720067977905, 0.045861244201660156, 0.9847458600997925, 0.1949888914823532,...
func (n *nativeObject) Destroy() {}
[ -0.5246230959892273, -1.1945669651031494, 0.3388507068157196, 0.1181381493806839, -0.43553781509399414, 0.7154162526130676, -0.05675815790891647, -0.0248012263327837, 0.1604776680469513, -0.26638853549957275, -0.5416316390037537, -0.7011124491691589, -0.8807070851325989, 0.8571287989616394...
func statsStatusQuery(projectId string) bson.M { return bson.M{"_id": projectId} }
[ 0.5259715914726257, 0.08486051857471466, 0.048122912645339966, -0.14750464260578156, -0.09591503441333771, 0.7578246593475342, -0.5091433525085449, -0.07942689955234528, 0.46560144424438477, 0.23539792001247406, 0.4856693148612976, 0.426344096660614, 0.4788011610507965, 0.06552967429161072...
func hourlyTestStatsPipeline(projectId string, requester string, start time.Time, end time.Time, tasks []string, lastUpdate time.Time) []bson.M { return getHourlyTestStatsPipeline(projectId, requester, start, end, tasks, lastUpdate, false) }
[ -0.03178398311138153, -0.16958902776241302, 0.29812467098236084, 0.13685137033462524, 0.7740005254745483, 0.8449608683586121, -0.4733041524887085, -0.33147957921028137, -0.49587351083755493, 0.03945820778608322, -0.3446091115474701, -0.20625419914722443, -0.5090647339820862, 0.041671879589...
func hourlyTestStatsForOldTasksPipeline(projectId string, requester string, start time.Time, end time.Time, tasks []string, lastUpdate time.Time) []bson.M { // Using the same pipeline as for the tasks collection as the base. basePipeline := getHourlyTestStatsPipeline(projectId, requester, start, end, tasks, lastUpdat...
[ 0.1628793478012085, 0.16192626953125, 0.6944940686225891, -0.16183650493621826, 0.42159590125083923, 0.5498774647712708, -0.25454631447792053, -0.13986241817474365, -0.6309784054756165, 0.29789963364601135, -0.11601164937019348, -0.048014119267463684, 0.5146268606185913, -0.289745509624481...
func getHourlyTestStatsPipeline(projectId string, requester string, start time.Time, end time.Time, tasks []string, lastUpdate time.Time, oldTasks bool) []bson.M { var taskIdExpr string var displayTaskLookupCollection string if oldTasks { taskIdExpr = "$old_task_id" displayTaskLookupCollection = task.OldCollecti...
[ 0.25354865193367004, 0.31612735986709595, 0.6456311345100403, -0.4341902434825897, 0.15667957067489624, 0.383171021938324, 0.16754604876041412, -0.2385289967060089, -0.7717128992080688, 0.3030119836330414, -0.24974708259105682, -0.10660849511623383, 0.2593861222267151, 0.06791843473911285,...
func dailyTestStatsFromHourlyPipeline(projectId string, requester string, start time.Time, end time.Time, tasks []string, lastUpdate time.Time) []bson.M { pipeline := []bson.M{ {"$match": bson.M{ "_id.project": projectId, "_id.requester": requester, "_id.date": bson.M{"$gte": start, "$lt": end}, "...
[ -0.2080719769001007, 0.06845959275960922, 0.7985268831253052, 0.4021227955818176, 0.07076343148946762, 0.802275538444519, -0.00901104137301445, -0.16681599617004395, -1.274709701538086, 0.4857562184333801, 0.19402667880058289, -0.5424227714538574, 0.6766814589500427, -0.03211338445544243, ...
func dailyTaskStatsPipeline(projectId string, requester string, start time.Time, end time.Time, tasks []string, lastUpdate time.Time) []bson.M { return getDailyTaskStatsPipeline(projectId, requester, start, end, tasks, lastUpdate, false) }
[ -1.297261118888855, 0.43332958221435547, 0.4300411641597748, 0.8728809356689453, 0.07182096689939499, 0.6753071546554565, -0.04565326124429703, -0.1915568858385086, -0.629375696182251, 0.026238875463604927, -0.0429711639881134, -1.0880842208862305, 0.1658114343881607, 0.08403178304433823, ...
func dailyTaskStatsForOldTasksPipeline(projectId string, requester string, start time.Time, end time.Time, tasks []string, lastUpdate time.Time) []bson.M { // Using the same pipeline as for the tasks collection as the base. basePipeline := getDailyTaskStatsPipeline(projectId, requester, start, end, tasks, lastUpdate,...
[ -0.41085872054100037, 0.3608971834182739, 0.7228915095329285, 0.14950837194919586, 0.447668194770813, 0.2594965100288391, -0.01412951573729515, -0.22769032418727875, -0.6442561745643616, 0.11978772282600403, -0.22630588710308075, -0.2955840528011322, 0.4661639332771301, 0.3669458329677582,...
func getDailyTaskStatsPipeline(projectId string, requester string, start time.Time, end time.Time, tasks []string, lastUpdate time.Time, oldTasks bool) []bson.M { var taskIdExpr string var displayTaskLookupCollection string if oldTasks { taskIdExpr = "$old_task_id" displayTaskLookupCollection = task.OldCollectio...
[ -0.18989695608615875, 0.7473365068435669, 0.7739433646202087, -0.015792537480592728, -0.19578196108341217, 0.4174759089946747, -0.07862722128629684, 0.16804274916648865, -1.0057817697525024, 0.6695429086685181, 0.05263642966747284, -0.38495075702667236, 0.18851760029792786, 0.2439632564783...
func statsToUpdatePipeline(projectId string, start time.Time, end time.Time) []bson.M { pipeline := []bson.M{ {"$match": bson.M{ task.ProjectKey: projectId, task.FinishTimeKey: bson.M{"$gte": start, "$lt": end}, }}, {"$project": bson.M{ task.IdKey: 0, "project": taskProjectKeyRef, "requester...
[ -0.7692724466323853, 0.1915503442287445, 0.8364880681037903, -0.9496456980705261, -0.16315358877182007, 0.2658853530883789, 0.080258809030056, -0.6971703171730042, -1.3626428842544556, 0.4683663249015808, -0.12562474608421326, 0.07376930862665176, 1.220575213432312, 0.1466962695121765, -...
func aggregateWithCallback(collection string, pipeline []bson.M, callback func(interface{}) error) error { session, database, err := db.GetGlobalSessionFactory().GetSession() if err != nil { return errors.Wrap(err, "Error establishing db connection") } defer session.Close() session.SetSocketTimeout(0) pipe := ...
[ 0.1384451985359192, 0.44597524404525757, 1.0045486688613892, -0.19819188117980957, 0.1849987506866455, -0.33018091320991516, -0.11267749220132828, -0.6990697383880615, -0.6973459720611572, 0.8451889753341675, 0.6560950875282288, -0.416562557220459, -0.06882098317146301, 0.6854560971260071,...
func aggregateIntoCollection(collection string, pipeline []bson.M, outputCollection string) error { session, database, err := db.GetGlobalSessionFactory().GetSession() if err != nil { err = errors.Wrap(err, "Error establishing db connection") return err } defer session.Close() ctx := context.TODO() opts := ...
[ -0.19908785820007324, 0.14671114087104797, 0.9616696834564209, -0.3687954545021057, 0.5877976417541504, -0.5553999543190002, 0.7270112633705139, -0.6612542271614075, -1.0125701427459717, 0.6630151867866516, 0.2033849060535431, -0.4320031702518463, -0.6675257682800293, 0.5273016095161438, ...
func makeSum(condition bson.M) bson.M { return bson.M{"$sum": bson.M{"$cond": bson.M{"if": condition, "then": 1, "else": 0}}} }
[ 0.21074028313159943, 0.6203117370605469, 0.3243498206138611, 0.3000149726867676, -0.8779276013374329, 0.5866098403930664, 0.2493402361869812, 0.14148440957069397, -0.06406375765800476, 0.42774391174316406, -0.22067539393901825, -0.6063598990440369, 0.10504814982414246, -0.2040700614452362,...
func (params Params) Validate() error { if params.NoteID == "" { return errEmptyNoteID } return params.Params.Validate() }
[ 0.31324899196624756, 0.7944793701171875, 0.41892310976982117, 0.3037733733654022, 1.2155876159667969, 0.14524288475513458, -0.17502903938293457, -0.4294861853122711, -0.2671065628528595, 0.6284500956535339, 0.7797995805740356, 0.6927861571311951, -1.0575834512710571, 1.0811902284622192, ...
func (params UpdateParams) Validate() error { if params.Message == "" { return errEmptyNoteMessage } if params.UserID == "" { return errEmptyUserID } if params.Params.NoteID == "" { return errEmptyNoteID } return params.Params.Validate() }
[ -0.17809493839740753, 0.12796729803085327, 0.7798479199409485, 0.48030662536621094, 0.4281955361366272, 0.8784598112106323, -0.5050790905952454, -0.35328832268714905, -0.7198677062988281, 1.0807297229766846, 0.6612417101860046, 0.4630943834781647, -1.695656418800354, 0.9532387852668762, ...
func AddGenericPassword(service string, account string, label string, password string, accessGroup string) error { item := keychain.NewGenericPassword(service, account, label, []byte(password), accessGroup) return keychain.AddItem(item) }
[ -0.7957918643951416, 0.2028125822544098, 0.5460720062255859, 0.790885329246521, -0.006749715190380812, 1.3301277160644531, -1.898860216140747, -0.1716194897890091, -0.16888102889060974, -0.2974247634410858, 0.1348225325345993, 0.5629099011421204, -0.3269076943397522, 0.056793104857206345, ...
func DeleteGenericPassword(service string, account string, accessGroup string) error { item := keychain.NewItem() item.SetSecClass(keychain.SecClassGenericPassword) item.SetService(service) item.SetAccount(account) item.SetAccessGroup(accessGroup) return keychain.DeleteItem(item) }
[ -0.37231478095054626, 0.019831929355859756, 0.6257059574127197, 0.9099913835525513, -0.07456795126199722, 1.1657071113586426, -0.9499773979187012, -0.4006504416465759, 0.022411048412322998, -0.001329219900071621, -0.0787021815776825, 0.9752548933029175, -0.1530357003211975, 0.3442575633525...
func GenericPasswordTest(t Test, service string, accessGroup string) { var err error account := "Testing account with unicode テスト" item := keychain.NewGenericPassword(service, account, "", []byte("toomanysecrets"), accessGroup) item.SetSynchronizable(keychain.SynchronizableNo) item.SetAccessible(keychain.Accessib...
[ -0.038538940250873566, 0.5402798652648926, 0.8020077347755432, 0.17747558653354645, 0.33614447712898254, 0.8850051760673523, -0.009509140625596046, -0.7089958786964417, 0.03648081421852112, -0.1548479050397873, -0.4405139088630676, 0.29830402135849, -0.22365757822990417, -0.076522350311279...
func getStoredParamsByPath(svc *ssm.SSM, startsWith string, nextToken string, params []*ssm.Parameter) ([]*ssm.Parameter, error) { input := &ssm.GetParametersByPathInput{ Recursive: aws.Bool(true), Path: aws.String(startsWith), WithDecryption: aws.Bool(true), MaxResults: aws.Int64(10), } ...
[ -0.028571950271725655, -0.11449270695447922, 0.34070059657096863, 0.4568382203578949, -0.3599936068058014, -0.3275473117828369, -0.00033213390270248055, -1.3145136833190918, -0.26816895604133606, 0.06225326284766197, -0.22264312207698822, 1.1173065900802612, -0.7571908831596375, 0.75374674...