text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (h *GetItemInfoHandler) GetItemInfoHandle(w http.ResponseWriter, r *http.Request) error { //read the following GET data: // - sku sku := r.URL.Query().Get("sku") stockObj, err := h.InventoryService.GetItemInfo(sku) if err != nil { //compose failed response return composeError(err) } //compose successful...
[ -0.7809845805168152, -0.519605278968811, 0.6803032159805298, 0.5175413489341736, 0.01539635844528675, 0.4545096457004547, -0.21944980323314667, -0.8979745507240295, -0.18980535864830017, -0.3464072346687317, 0.45547372102737427, 0.3600604832172394, -0.5818709135055542, -0.7035475373268127,...
func (h *GetItemInfoHandler) StartUp() { //Note: perform initialization/bootstrapping here }
[ -0.04023106396198273, -1.109056830406189, 0.34067943692207336, 1.1040092706680298, 0.6287161707878113, -0.04515039920806885, 0.33463579416275024, 0.7728893756866455, 0.10238480567932129, -0.39157140254974365, -0.18689526617527008, 0.39801451563835144, 0.11462830007076263, 0.352511703968048...
func (h *GetItemInfoHandler) Shutdown() { //Note: perform any cleanup here }
[ -0.02838478982448578, -0.7931804060935974, 0.3737356960773468, 0.08364484459161758, 0.6911922097206116, 0.7847943902015686, 0.5576725006103516, 0.4572085738182068, 0.2580454349517822, -0.6779389381408691, 0.2429163157939911, 0.6343229413032532, -0.6554121971130371, -0.04476666450500488, ...
func NewPage(title, content, burl, url string) *Page { return &Page{title, content, burl, url} }
[ 0.830742359161377, -0.5061362981796265, 0.17563749849796295, -0.13636115193367004, -0.20133568346500397, 0.2576630115509033, -0.6083241105079651, -0.014515713788568974, -0.4192342758178711, -0.5392664074897766, 0.42051637172698975, -0.1673000305891037, -0.9384827613830566, -0.5070224404335...
func (p *Page) Print() { out, err := os.Create(p.url) if err != nil { fmt.Printf("Could not create file [%s].\n", p.url) panic(err) } defer out.Close() // Print header. FprintHeader(out, p.title) // Print title. fmt.Fprintf(out, "<h1>%s</h1>\n\n", p.title) // Print contents. fmt.Fprintf(out, "%s\n\n",...
[ 0.21923623979091644, 0.42314979434013367, 0.5893123149871826, -0.2128339260816574, 0.717605710029602, 1.1797608137130737, -0.3742679953575134, -0.12586425244808197, -0.9838865399360657, -1.0539644956588745, 0.8176894783973694, -0.20123279094696045, -0.4970420002937317, 0.7295525074005127, ...
func GhostConfigByName(name string) (*GhostConfig, error) { bucket, err := db.GetBucket(ghostBucketName) if err != nil { return nil, err } rawConfig, err := bucket.Get(fmt.Sprintf("%s.%s", ghostConfigNamespace, name)) if err != nil { return nil, err } config := &GhostConfig{} err = json.Unmarshal(rawConfig,...
[ -0.897738516330719, -0.06640330702066422, 0.7616814970970154, -0.4318141043186188, -0.8216186761856079, -0.17000027000904083, -0.27868586778640747, -0.3552718162536621, -0.6656891107559204, 1.4965062141418457, -1.5147910118103027, 0.35581088066101074, -0.6308389902114868, 0.407437771558761...
func GhostConfigMap() (map[string]*GhostConfig, error) { bucket, err := db.GetBucket(ghostBucketName) if err != nil { return nil, err } ls, err := bucket.List(ghostConfigNamespace) configs := map[string]*GhostConfig{} for _, config := range ls { ghostName := config[len(ghostConfigNamespace)+1:] config, err ...
[ -1.6391310691833496, -0.03251112252473831, 0.6834996938705444, 0.4079384505748749, -0.4988373816013336, 0.2869192063808441, -0.5449177622795105, 0.3025720417499542, 0.1247728019952774, 1.0992158651351929, -1.5448143482208252, -0.17080706357955933, -0.1362384855747223, 1.19137704372406, 0...
func GhostConfigSave(config *GhostConfig) error { bucket, err := db.GetBucket(ghostBucketName) if err != nil { return err } rawConfig, err := json.Marshal(config) if err != nil { return err } storageLog.Infof("Saved config for '%s'", config.Name) return bucket.Set(fmt.Sprintf("%s.%s", ghostConfigNamespace, ...
[ -1.316579818725586, 0.18173643946647644, 0.5137909054756165, -0.68086177110672, -0.17987030744552612, 0.5314357876777649, -0.3985827565193176, -0.23270075023174286, -0.41851040720939636, 1.4924763441085815, -2.0642318725585938, -0.5460286736488342, -0.26779863238334656, 0.3874276876449585,...
func GhostFileSave(name, fpath string) error { bucket, err := db.GetBucket(ghostBucketName) if err != nil { return err } rootAppDir, _ := filepath.Abs(assets.GetRootAppDir()) fpath, _ = filepath.Abs(fpath) if !strings.HasPrefix(fpath, rootAppDir) { return fmt.Errorf("Invalid path '%s' is not a subdirectory o...
[ 0.031262680888175964, 0.43445146083831787, 0.625508189201355, -0.5738241672515869, 0.06958892941474915, 0.6128926277160645, -0.09997671097517014, -0.19470670819282532, -1.223049521446228, 0.2674696445465088, -0.8948402404785156, -0.6586146354675293, -0.5112742185592651, 0.09059582650661469...
func GhostFileByName(name string) ([]byte, error) { bucket, err := db.GetBucket(ghostBucketName) if err != nil { return nil, err } ghost, err := bucket.Get(fmt.Sprintf("%s.%s", ghostFileNamespace, name)) if err != nil { return nil, ErrGhostNotFound } return ghost, nil }
[ 0.5642091035842896, 0.4138687252998352, 0.4873284697532654, -0.6368212699890137, -0.12083929032087326, -0.09479072690010071, 0.030560992658138275, -0.5741484761238098, -1.0980820655822754, 0.6708555817604065, -0.7757818698883057, 0.11627188324928284, -1.0488481521606445, 0.4200389087200165...
func GhostFiles() ([]string, error) { bucket, err := db.GetBucket(ghostBucketName) if err != nil { return nil, err } keys, err := bucket.List(ghostFileNamespace) if err != nil { return nil, err } // Remove namespace prefix names := []string{} for _, key := range keys { names = append(names, key[len(ghos...
[ -0.1989264190196991, 0.20517633855342865, 0.4953731298446655, -0.4806593954563141, 0.08901809900999069, 0.6699399948120117, -0.7594258785247803, 0.004893843084573746, 0.049061648547649384, 0.9445403218269348, -0.49825137853622437, 0.25815168023109436, -1.4350773096084595, 0.373982340097427...
func AddGigasecond(t time.Time) time.Time { return t.Add(time.Second * 1000000000) }
[ 0.6141436100006104, 0.6528065204620361, 0.3828582167625427, -0.08192641288042068, -0.2757437825202942, 0.19636312127113342, -1.05173921585083, -0.7999314665794373, -0.442604660987854, 0.8664600849151611, -0.6242945194244385, -0.32600754499435425, -0.1607283353805542, 1.5681036710739136, ...
func Get(instanceType string) (limit ipamTypes.Limits, ok bool) { limitsOnce.Do(populateStaticENILimits) limits.RLock() limit, ok = limits.m[instanceType] limits.RUnlock() return }
[ -1.3791167736053467, 0.47857028245925903, 0.39485934376716614, -0.12262968719005585, 0.35773134231567383, 0.09204991161823273, -0.539463222026825, -0.7037193179130554, -0.2844046652317047, 0.8992688655853271, -0.374359667301178, 0.49024367332458496, -1.1351118087768555, -0.8168632388114929...
func UpdateFromUserDefinedMappings(m map[string]string) (err error) { limitsOnce.Do(populateStaticENILimits) limits.Lock() defer limits.Unlock() for instanceType, limitString := range m { limit, err := parseLimitString(limitString) if err != nil { return err } // Add or overwrite limits limits.m[inst...
[ -0.7175568342208862, -0.5840098857879639, 0.36319977045059204, 0.9159753322601318, -0.731460452079773, 0.5839632153511047, -0.29538750648498535, 0.0007835278520360589, 0.09101811796426773, 1.168796181678772, -0.28476864099502563, -0.16221760213375092, 0.02213325724005699, 0.334344387054443...
func UpdateFromEC2API(ctx context.Context, ec2Client *ec2shim.Client) error { instanceTypeInfos, err := ec2Client.GetInstanceTypes(ctx) if err != nil { return err } limitsOnce.Do(populateStaticENILimits) limits.Lock() defer limits.Unlock() for _, instanceTypeInfo := range instanceTypeInfos { instanceType ...
[ -0.571936845779419, -0.5146704912185669, 0.6184173226356506, -0.20764589309692383, -0.43390944600105286, 0.2859584391117096, 0.034665368497371674, -0.45355120301246643, -0.42620959877967834, 0.5773629546165466, -0.787663459777832, -0.009470614604651928, -0.08710145950317383, 0.072923496365...
func parseLimitString(limitString string) (limit ipamTypes.Limits, err error) { intSlice := make([]int, 3) stringSlice := strings.Split(strings.ReplaceAll(limitString, " ", ""), ",") if len(stringSlice) != 3 { return limit, fmt.Errorf("invalid limit value") } for i, s := range stringSlice { intLimit, err := st...
[ 0.17882424592971802, -0.4472741484642029, 0.6331593990325928, -0.46292996406555176, -0.5568739175796509, -0.4863545596599579, -0.7350492477416992, 0.061172839254140854, 0.7563726305961609, 0.25800424814224243, -0.1916540116071701, -0.0802634060382843, -0.6878584623336792, -1.44379496574401...
func NewTransformsRecord() *TransformsRecord { r := &TransformsRecord{} return r }
[ 0.9333703517913818, -0.5407329201698303, 0.050752557814121246, -1.2008424997329712, -0.17227332293987274, -0.13124673068523407, -0.02955039218068123, -1.0129990577697754, -0.3635587990283966, -1.0815240144729614, -0.5206844806671143, -0.07862697541713715, -0.4132930636405945, 0.83011639118...
func (c *canceler) Cancel() { c.cancel() }
[ 1.5006103515625, -0.733702540397644, -0.0697956457734108, 0.5433857440948486, -0.4747767448425293, 0.5216538310050964, 0.36227747797966003, 0.8105302453041077, -1.0230441093444824, -0.31128570437431335, 0.10113832354545593, -0.027284080162644386, 0.07939664274454117, 1.2542253732681274, ...
func (f *inFlow) onData(n uint32) error { if n == 0 { return nil } f.lock.Lock() defer f.lock.Unlock() if f.pendingData+f.pendingUpdate+n > f.limit { return fmt.Errorf("recieved %d-bytes data exceeding the limit %d bytes", f.pendingData+f.pendingUpdate+n, f.limit) } if f.connInFlow != nil { err := f.connIn...
[ -0.40634024143218994, -0.04307851195335388, 0.7232979536056519, -0.6082761287689209, -0.3244977295398712, -0.11019149422645569, -0.5288097858428955, 0.18982897698879242, -0.1441241055727005, -1.021803855895996, 0.12461531162261963, -0.05341774970293045, -0.5725523829460144, 0.6845638751983...
func (f *inFlow) connOnRead(n uint32) uint32 { if n == 0 || f.connInFlow != nil { return 0 } f.lock.Lock() defer f.lock.Unlock() f.pendingData -= n f.pendingUpdate += n if f.pendingUpdate >= f.limit/4 { ret := f.pendingUpdate f.pendingUpdate = 0 return ret } return 0 }
[ -0.7204892635345459, -0.6464327573776245, 0.6259456276893616, -0.606149435043335, -0.7102138996124268, 0.21611887216567993, 0.2622711956501007, 0.19105684757232666, -0.4415103793144226, -0.8827557563781738, 0.909083902835846, -0.6245498061180115, -1.2426384687423706, -0.2795793414115906, ...
func (f *inFlow) onRead(n uint32) (swu, cwu uint32) { if n == 0 { return } f.lock.Lock() defer f.lock.Unlock() if f.pendingData == 0 { // pendingData has been adjusted by restoreConn. return } f.pendingData -= n f.pendingUpdate += n if f.pendingUpdate >= f.limit/4 { swu = f.pendingUpdate f.pendingUpd...
[ -0.32932788133621216, -0.5407565236091614, 0.6280049085617065, -0.6480270028114319, -0.7397638559341431, -0.354963093996048, -0.17481188476085663, 0.08147425949573517, -0.132717102766037, -0.9394922852516174, 0.7577700614929199, -0.2049677073955536, -0.6717764735221863, 0.14603573083877563...
func (f *inFlow) restoreConn() uint32 { if f.connInFlow == nil { return 0 } f.lock.Lock() defer f.lock.Unlock() n := f.pendingData f.pendingData = 0 f.pendingUpdate = 0 return f.connInFlow.connOnRead(n) }
[ 0.07306639850139618, -1.016252040863037, 0.6440617442131042, -0.11976346373558044, -0.26396191120147705, -0.9669932723045349, -0.5081185698509216, 1.2769170999526978, -0.23072125017642975, -1.259487509727478, 0.34490612149238586, -0.241193026304245, -1.6351584196090698, -0.4643115997314453...
func newQuotaPool(q int) *quotaPool { qp := &quotaPool{ acquireChannel: make(chan int, 1), } if q > 0 { qp.acquireChannel <- q } else { qp.quota = q } return qp }
[ -0.4455409049987793, -0.29881104826927185, 0.42532700300216675, -0.29901981353759766, -0.7783253192901611, 0.1449969857931137, 0.13551385700702667, -0.9496546983718872, 0.6840154528617859, 0.04531509429216385, -0.6448027491569519, 0.5973384976387024, 0.07534203678369522, 0.1564165651798248...
func (qp *quotaPool) add(n int) { qp.lock.Lock() defer qp.lock.Unlock() qp.quota += n if qp.quota <= 0 { return } select { case qp.acquireChannel <- qp.quota: qp.quota = 0 default: } }
[ -0.9316428303718567, -0.33661124110221863, 0.5202069282531738, -0.13706327974796295, 0.6571769714355469, 0.7836270928382874, -0.25493547320365906, -1.3628774881362915, 0.2977117896080017, 0.04108084365725517, 0.10299059748649597, 0.5981417298316956, -0.5787867307662964, 0.19398850202560425...
func (qp *quotaPool) cancel() { qp.lock.Lock() defer qp.lock.Unlock() select { case n := <-qp.acquireChannel: qp.quota += n default: } }
[ 0.7188988924026489, -0.5642367601394653, 0.5473344922065735, 0.11056658625602722, -0.011852865107357502, 0.22522583603858948, 0.29863521456718445, -0.6450207829475403, -0.6922206282615662, 0.3225911855697632, 0.2744203507900238, 0.5717070698738098, -0.2643229365348816, -0.25498709082603455...
func (qp *quotaPool) reset(v int) { qp.lock.Lock() defer qp.lock.Unlock() select { case n := <-qp.acquireChannel: qp.quota += n default: } qp.quota += v if qp.quota <= 0 { return } select { case qp.acquireChannel <- qp.quota: qp.quota = 0 default: } }
[ -0.7451461553573608, 0.1476965695619583, 0.46984249353408813, -0.6053821444511414, 0.34876173734664917, 0.24520224332809448, 0.4386517107486725, -1.6146776676177979, -0.5761532187461853, 0.6993462443351746, 0.15290124714374542, 0.971199095249176, -0.5730312466621399, -1.0486899614334106, ...
func (qp *quotaPool) acquire() <-chan int { return qp.acquireChannel }
[ -0.478529691696167, -0.8892476558685303, 0.6022456884384155, -0.47215986251831055, 0.5866660475730896, 0.12897367775440216, 0.12219679355621338, -0.7112554311752319, -0.3409144878387451, -1.3518092632293701, 0.5132239460945129, 1.4987602233886719, -0.37145566940307617, 0.08484208583831787,...
func Blast(store speedmap.Store, n int, operation string) (*BlastResult, error) { if operation != "Get" && operation != "Put" && operation != "Delete" && operation != "GetOrCreate" { return nil, fmt.Errorf("unknown operation '%s'", operation) } wait := new(sync.WaitGroup) wait.Add(n) result := &BlastResult{Oper...
[ -0.2624616026878357, 1.4556081295013428, 0.745160698890686, 0.41163045167922974, -0.41152748465538025, -1.0879793167114258, 0.5792798399925232, -0.541777491569519, -0.37693825364112854, 0.2518230378627777, -0.08614381402730942, -0.8394938111305237, -0.4957939386367798, -0.23267492651939392...
func NewServer(db drivers.DB, bkbaseConf *types.BkbaseConfig) store.Server { return &server{ ModelCluster: NewModelCluster(db), ModelNamespace: NewModelNamespace(db), ModelWorkload: NewModelWorkload(db), ModelProject: NewModelProject(db), ModelPublic: NewModelPublic(db), ModelPo...
[ -0.4307490289211273, -0.32127395272254944, 0.19774898886680603, 0.38874176144599915, 0.3258354663848877, 0.12423925846815109, 0.22501368820667267, -0.36822912096977234, -0.1813323050737381, 0.06173516437411308, -0.8045502305030823, -0.03488468751311302, -0.8837047815322876, 0.5778501033782...
func (v *Validator) IsSkippable() bool { return false }
[ -1.434145212173462, -0.20067010819911957, 0.6324925422668457, 0.8769180178642273, -0.5196110606193542, 1.156930923461914, 0.33083969354629517, 0.06255766749382019, -0.4426397383213043, 0.7796408534049988, -0.15447533130645752, -0.9909221529960632, -0.3271823227405548, 0.195795938372612, ...
func (v *Validator) Validate(sl steplib.StepLib) error { cliVersionURLs, err := getTestableCLIVersionDownloadURLs() if err != nil { return err } for _, cliVersionURL := range cliVersionURLs { fmt.Println(" - downloading and running:", cliVersionURL) tmpBinaryPath, err := setupBinary(cliVersionURL) if err ...
[ 0.15671375393867493, -0.11288271844387054, 0.8853626251220703, 0.7834743857383728, 0.5736593008041382, -0.0902538150548935, 0.8673146367073059, -0.8934832811355591, -0.881102979183197, 0.017143631353974342, 0.12376794964075089, -0.03958521783351898, -0.2711617648601532, 1.4161008596420288,...
func (v *Validator) String() string { return "Ensure CLI is working properly with the new collection" }
[ -0.17460381984710693, -0.8999156355857849, -0.10589238256216049, 0.040882863104343414, 0.25208571553230286, 0.978337287902832, 0.23883064091205597, -1.3422476053237915, -0.9518815279006958, 0.07637985795736313, 0.34904778003692627, 0.864555299282074, -0.35630282759666443, 0.525272727012634...
func (o *GetLolLobbyV1PartiesPlayerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewGetLolLobbyV1PartiesPlayerOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err ...
[ -0.3742283284664154, -1.1646881103515625, 0.6583359837532043, -0.03402867540717125, 0.006555560510605574, -0.4291161894798279, -0.1322096884250641, -0.28901833295822144, 0.36773911118507385, 0.29589056968688965, 0.19029057025909424, -0.5043319463729858, -1.3611677885055542, -0.316113799810...
func NewGetLolLobbyV1PartiesPlayerOK() *GetLolLobbyV1PartiesPlayerOK { return &GetLolLobbyV1PartiesPlayerOK{} }
[ 0.12946410477161407, -0.6023468375205994, 0.3430865406990051, 0.5540811419487, 0.11283984780311584, 0.06832309812307358, -0.19394470751285553, 0.45745986700057983, -0.6470739245414734, -0.5594867467880249, -0.4274062514305115, -0.0176471509039402, -1.12491774559021, 0.10158362984657288, ...
func (plugin *IscsiPlugin) LoginTarget(blockDev model.BlockDeviceAccessInfo) (err error) { log.Tracef(">>>>> LoginTarget, TargetName=%v", blockDev.TargetName) defer log.Traceln("<<<<< LoginTarget") // If the iSCSI iqn is not provided, fail the request if blockDev.TargetName == "" { err := cerrors.NewChapiError(c...
[ -0.43115368485450745, -0.5970021486282349, 0.8618515729904175, -0.30955761671066284, -0.10151021182537079, -0.7250022888183594, -0.7678991556167603, -0.5138813257217407, 0.23468752205371857, -0.4176817834377289, 0.6768755316734314, 0.6067991852760315, -1.0388636589050293, -0.99585700035095...
func (plugin *IscsiPlugin) IsTargetLoggedIn(targetName string) (bool, error) { log.Tracef(">>>>> IsTargetLoggedIn, targetName=%v", targetName) defer log.Traceln("<<<<< IsTargetLoggedIn") // Call platform specific module return plugin.isTargetLoggedIn(targetName) }
[ -1.1666507720947266, -0.5052966475486755, 0.49846458435058594, 0.2608765959739685, -0.19424864649772644, -0.32960760593414307, -0.0421900637447834, -0.06211833655834198, 0.44211387634277344, 0.27607372403144836, -0.3714827597141266, 1.02777099609375, 0.1185171827673912, -0.5680792331695557...
func (plugin *IscsiPlugin) LogoutTarget(targetName string) error { log.Tracef(">>>>> LogoutTarget, TargetName=%v", targetName) defer log.Traceln("<<<<< LogoutTarget") // Call platform specific module return plugin.logoutTarget(targetName) }
[ -1.2451053857803345, -0.8053624629974365, 0.2922822833061218, -0.777235209941864, -0.294043630361557, -0.8654034733772278, -0.47039684653282166, -0.37627384066581726, 0.6512284278869629, 0.20546458661556244, 0.5703113675117493, 1.077974557876587, -0.5945368409156799, -1.1599054336547852, ...
func (plugin *IscsiPlugin) GetIscsiInitiators() (*model.Initiator, error) { return getIscsiInitiators() }
[ -0.5090364813804626, -0.41399648785591125, 0.05341609567403793, 0.9164280295372009, 0.3759516179561615, -1.079065203666687, -0.19660469889640808, 1.04673433303833, 0.10863170772790909, -0.15620777010917664, -1.9677752256393433, -0.2688932716846466, -1.2171213626861572, -0.6976320743560791,...
func (plugin *IscsiPlugin) GetTargetScope(targetName string) (string, error) { return getTargetScope(targetName) }
[ -1.5248692035675049, -0.5974476337432861, 0.4825381934642792, -0.022671306505799294, -0.26411718130111694, -1.10049569606781, -0.0660405308008194, -0.4168478548526764, 0.3552541434764862, 0.8042387366294861, 0.2314015030860901, 1.0697357654571533, 0.05332062020897865, -0.9272714853286743, ...
func (plugin *IscsiPlugin) RescanIscsiTarget(lunID string) error { log.Tracef(">>>>> RescanIscsiTarget initiated for lunID %v", lunID) defer log.Traceln("<<<<< RescanIscsiTarget") return rescanIscsiTarget(lunID) }
[ 0.2117876410484314, -0.7641637325286865, 0.08122173696756363, 0.3861779570579529, -0.3062759339809418, -1.3018953800201416, -0.5574858784675598, 0.10456879436969757, 0.10594668239355087, -0.9184432029724121, 0.12543383240699768, 0.5217591524124146, -0.8525548577308655, -0.7072405219078064,...
func (s UpdateCostCategoryDefinitionInput) String() string { return awsutil.Prettify(s) }
[ 0.16183702647686005, 0.10002013295888901, 0.028284480795264244, -0.14088933169841766, -0.9859275817871094, 0.5649210214614868, 0.4684848189353943, -0.5498575568199158, -0.22067342698574066, 0.44644272327423096, 0.15698760747909546, 0.3536204993724823, 0.550192654132843, -0.1457749158143997...
func (s *UpdateCostCategoryDefinitionInput) Validate() error { invalidParams := aws.ErrInvalidParams{Context: "UpdateCostCategoryDefinitionInput"} if s.CostCategoryArn == nil { invalidParams.Add(aws.NewErrParamRequired("CostCategoryArn")) } if s.CostCategoryArn != nil && len(*s.CostCategoryArn) < 20 { invalidP...
[ -0.24787014722824097, 0.1830877661705017, 0.5614388585090637, 0.20196174085140228, -0.5375702977180481, -0.20207393169403076, -0.059508781880140305, -0.22305245697498322, -0.8138064742088318, 0.5670139193534851, 0.5113988518714905, 0.3148863613605499, -0.2525462806224823, 1.096705555915832...
func (s UpdateCostCategoryDefinitionOutput) String() string { return awsutil.Prettify(s) }
[ 0.6786322593688965, -0.20857766270637512, 0.08361119031906128, -0.18864603340625763, -1.2835185527801514, -0.05286507308483124, 0.3062930405139923, -0.5569131970405579, -0.5770882964134216, 0.4651910662651062, 0.37108689546585083, 0.3225897252559662, 0.8319160342216492, -0.2478154003620147...
func (r UpdateCostCategoryDefinitionRequest) Send(ctx context.Context) (*UpdateCostCategoryDefinitionResponse, error) { r.Request.SetContext(ctx) err := r.Request.Send() if err != nil { return nil, err } resp := &UpdateCostCategoryDefinitionResponse{ UpdateCostCategoryDefinitionOutput: r.Request.Data.(*Update...
[ -0.6687740683555603, 0.10148951411247253, 0.29314619302749634, 0.2623709738254547, -0.6015893220901489, -0.41534650325775146, -0.4154248833656311, -0.27881261706352234, -0.1876911222934723, 0.3909221291542053, -0.9878653883934021, 0.8262826204299927, 0.10153063386678696, 0.3428572118282318...
func (r *UpdateCostCategoryDefinitionResponse) SDKResponseMetdata() *aws.Response { return r.response }
[ -0.23689857125282288, 0.07242976129055023, 0.35281091928482056, -0.1141989454627037, -0.9159805774688721, -0.15735282003879547, -0.5188179612159729, 0.14475126564502716, 0.3249168395996094, 0.7611432671546936, -0.8087690472602844, -0.11341157555580139, 0.6238324046134949, -0.60307854413986...
func SquashLayers(layerFiles []*os.File, streamWriter io.Writer) error { layerLen := len(layerFiles) if layerLen == 0 { return errors.New("got no layers to squash") } if streamWriter == nil { return errors.New("got a nil stream writer") } // First, render to a temporary directory unpackDir, err := ioutil.Te...
[ -0.027466444298624992, 0.058923035860061646, 0.7441240549087524, 0.27166518568992615, 0.04218033701181412, -0.28589335083961487, 0.846860408782959, -0.025400275364518166, -0.00022909986728336662, 0.34421083331108093, 0.14371271431446075, -0.9943165183067322, -0.011192085221409798, 0.581455...
func CloseLayers(layers []*os.File) error { var errRet error for _, fp := range layers { if err := fp.Close(); err != nil { errRet = err } } return errRet }
[ -0.3769518733024597, -0.7315340042114258, 0.41486647725105286, 0.08579667657613754, -0.056132230907678604, 0.9580784440040588, 0.27744415402412415, -1.1079225540161133, -0.8302175402641296, 0.2510526776313782, 0.8521837592124939, -0.39103278517723083, -0.36830464005470276, 1.52660691738128...
func (dao *releasedHookDao) Get(kit *kit.Kit, bizID, appID, releaseID uint32, tp table.HookType) ( *table.ReleasedHook, error) { if bizID == 0 { return nil, errf.New(errf.InvalidParameter, "bizID is 0") } if appID == 0 { return nil, errf.New(errf.InvalidParameter, "appID is 0") } if err := tp.Validate(); err ...
[ -0.27651411294937134, -0.3851279020309448, 0.620248019695282, 0.06857804954051971, 0.3512027859687805, 0.19473178684711456, -0.07361823320388794, 0.22316911816596985, -0.6892719268798828, 0.9606160521507263, 0.4707883894443512, 0.6201967597007751, -0.90658038854599, -0.5487377643585205, ...
func (dao *releasedHookDao) GetByReleaseID(kit *kit.Kit, bizID, releaseID uint32) ( *table.ReleasedHook, *table.ReleasedHook, error) { if bizID == 0 { return nil, nil, errf.New(errf.InvalidParameter, "bizID is 0") } m := dao.genQ.ReleasedHook pre, err := m.WithContext(kit.Ctx).Where(m.BizID.Eq(bizID), m.ReleaseI...
[ 0.16351138055324554, -0.5886324048042297, 0.9344383478164673, 0.11653946340084076, -0.03985739126801491, -0.5092054009437561, 0.32104867696762085, 0.47918030619621277, -0.4479380249977112, 0.8973506093025208, -0.2543790638446808, 0.5386576652526855, -0.6912345290184021, 0.4447174668312073,...
func (dao *releasedHookDao) UpsertWithTx(kit *kit.Kit, tx *gen.QueryTx, rh *table.ReleasedHook) error { if rh == nil { return errors.New("released hook is nil") } if err := rh.ValidateCreate(); err != nil { return err } // upsert the released hook. m := tx.ReleasedHook old, err := m.WithContext(kit.Ctx).Wh...
[ -0.08154626190662384, -0.29167744517326355, 0.8297312259674072, -0.32413530349731445, -0.15205854177474976, 0.2158210128545761, -0.4339616000652313, -0.27016159892082214, -0.042119137942790985, 1.1121445894241333, -0.35715287923812866, -0.5125409960746765, -0.47434890270233154, -0.03547622...
func (dao *releasedHookDao) UpdateHookRevisionByReleaseIDWithTx(kit *kit.Kit, tx *gen.QueryTx, bizID, releaseID, hookID uint32, hookRevision *table.HookRevision) error { if bizID == 0 { return errf.New(errf.InvalidParameter, "bizID is 0") } if hookID == 0 { return errf.New(errf.InvalidParameter, "hookID is 0") ...
[ -0.29235073924064636, -0.647128701210022, 0.4437071681022644, -0.5117303729057312, -0.4485880136489868, -0.14175093173980713, -0.48964810371398926, 0.25176554918289185, -0.36503270268440247, 1.0983176231384277, -0.18025490641593933, -0.1522536277770996, -0.45950961112976074, -0.15285326540...
func (dao *releasedHookDao) CreateWithTx(kit *kit.Kit, tx *gen.QueryTx, rh *table.ReleasedHook) ( uint32, error) { if rh == nil { return 0, errors.New("released hook is nil") } if err := rh.ValidateCreate(); err != nil { return 0, err } rh.Content = base64.StdEncoding.EncodeToString([]byte(rh.Content)) //...
[ -0.011403811164200306, 0.0465882383286953, 0.5712778568267822, -0.2547851502895355, -0.5006996989250183, 0.28531184792518616, -0.5895814895629883, -0.47226056456565857, -0.06653948873281479, 0.508823812007904, -0.9689329266548157, -0.6527842283248901, -0.676668107509613, 0.1169731169939041...
func (dao *releasedHookDao) ListAll(kit *kit.Kit, bizID uint32) ([]*table.ReleasedHook, error) { if bizID == 0 { return nil, errf.New(errf.InvalidParameter, "bizID is 0") } m := dao.genQ.ReleasedHook rhs, err := m.WithContext(kit.Ctx).Where(m.BizID.Eq(bizID)).Find() if err != nil { return nil, err } for i :...
[ -0.11401474475860596, -1.006514072418213, 0.6358554363250732, 0.4623536765575409, -0.07683149725198746, 0.07752013951539993, -0.4254295229911804, 0.4564581513404846, 0.014651798643171787, 1.1155540943145752, -0.08724971115589142, 0.8866302967071533, -0.9060484766960144, 0.5862608551979065,...
func (dao *releasedHookDao) DeleteByUniqueKeyWithTx(kit *kit.Kit, tx *gen.QueryTx, rh *table.ReleasedHook) error { if rh == nil { return errors.New("released hook is nil") } if rh.AppID == 0 { return errf.New(errf.InvalidParameter, "appID is 0") } if rh.BizID == 0 { return errf.New(errf.InvalidParameter, "bi...
[ -0.06416784971952438, -0.169793501496315, 0.6980296969413757, 0.10165295004844666, -0.19094818830490112, -0.07398130744695663, 0.357160359621048, 0.7423771619796753, 0.1836276650428772, 1.266222357749939, -0.25538691878318787, -0.44438880681991577, -0.5055074095726013, 0.43198883533477783,...
func (dao *releasedHookDao) DeleteByHookIDAndReleaseIDWithTx(kit *kit.Kit, tx *gen.QueryTx, bizID, hookID, releaseID uint32) error { if bizID == 0 { return errf.New(errf.InvalidParameter, "bizID is 0") } if hookID == 0 { return errf.New(errf.InvalidParameter, "hook is 0") } m := tx.ReleasedHook _, err := m.W...
[ 0.2063801884651184, -0.7456439733505249, 0.5878334641456604, -0.4002305269241333, -0.12012241035699844, -0.22311313450336456, -0.024024125188589096, 0.2883531451225281, 0.1315731704235077, 0.9776913523674011, 0.21609118580818176, 0.14588889479637146, -0.16245882213115692, 0.370348602533340...
func (dao *releasedHookDao) DeleteByHookRevisionIDAndReleaseIDWithTx(kit *kit.Kit, tx *gen.QueryTx, bizID, hookID, hookRevisionID, releaseID uint32) error { if bizID == 0 { return errf.New(errf.InvalidParameter, "bizID is 0") } if hookID == 0 { return errf.New(errf.InvalidParameter, "hook is 0") } if hookRevi...
[ 0.11952266097068787, -0.5914021134376526, 0.46302732825279236, -0.11072132736444473, -0.4257308542728424, -0.43897318840026855, 0.011293674819171429, 0.2960660755634308, -0.47672057151794434, 1.1265512704849243, 0.4911842942237854, 0.04171455651521683, -0.40058186650276184, 0.3227352201938...
func (dao *releasedHookDao) CountByHookIDAndReleaseID(kit *kit.Kit, bizID, hookID, releaseID uint32) (int64, error) { if bizID == 0 { return 0, errf.New(errf.InvalidParameter, "bizID is 0") } if hookID == 0 { return 0, errf.New(errf.InvalidParameter, "hook is 0") } m := dao.genQ.ReleasedHook return m.WithCont...
[ -0.013379751704633236, -0.9100137948989868, 0.6442016959190369, -0.42036452889442444, 0.28465279936790466, -0.4499087929725647, 0.4681529402732849, 0.598283052444458, -0.20517916977405548, 0.8051003217697144, -0.20738433301448822, 0.45763689279556274, -0.5610141754150391, 0.946572482585907...
func (dao *releasedHookDao) CountByHookRevisionIDAndReleaseID(kit *kit.Kit, bizID, hookID, hookRevisionID, releaseID uint32) (int64, error) { if bizID == 0 { return 0, errf.New(errf.InvalidParameter, "bizID is 0") } if hookID == 0 { return 0, errf.New(errf.InvalidParameter, "hook is 0") } if hookRevisionID ==...
[ -0.014202728867530823, -0.5782842636108398, 0.579934298992157, -0.14089947938919067, 0.02136511355638504, -0.35405564308166504, 0.5182859301567078, 0.6826567649841309, -0.8112248182296753, 0.8274789452552795, -0.0220143124461174, 0.24480827152729034, -0.7872352004051208, 0.6496918797492981...
func FromMS(layout string) string { return msStringReplacer.Replace(layout) }
[ 1.1693730354309082, -0.485704630613327, 0.17652282118797302, -0.5488724112510681, -1.8860267400741577, 0.08906722068786621, -0.0917409360408783, 0.04987648129463196, 1.1795982122421265, -0.3752385973930359, 0.7909652590751648, 0.04481574520468712, 0.03405667096376419, -0.42718344926834106,...
func FromOracle(layout string) string { return oracleStringReplacer.Replace(strings.ToUpper(layout)) }
[ 0.4551258683204651, -0.2796158194541931, 0.1998608261346817, -0.7184759974479675, -0.8498244285583496, 0.28662043809890747, 0.11582091450691223, 0.019577693194150925, 1.2560770511627197, 0.384957492351532, 0.30880463123321533, -0.14019706845283508, 0.7092737555503845, -1.000507116317749, ...
func routerCAConfigMapName() types.NamespacedName { return types.NamespacedName{ Namespace: GlobalMachineSpecifiedConfigNamespace, Name: caCertConfigMapName, } }
[ -0.6707674264907837, -0.9566370844841003, 0.6068511009216309, 0.6072177290916443, -0.6051596403121948, 0.23731209337711334, 0.1461096704006195, 0.5142815113067627, 0.40881332755088806, 1.174830436706543, -0.4903017580509186, 0.23522503674030304, 0.18884584307670593, 0.31781336665153503, ...
func (r *reconciler) ensureRouterCAConfigMap(secret *corev1.Secret, ingresses []ingressv1alpha1.ClusterIngress) error { desired, err := desiredRouterCAConfigMap(secret, ingresses) if err != nil { return err } current, err := r.currentRouterCAConfigMap() if err != nil { return err } switch { case desired == ...
[ -0.8779523372650146, -0.7690324783325195, 0.650149941444397, 0.47443804144859314, 0.5440410375595093, -0.39637306332588196, 0.5385034680366516, -0.054596684873104095, 0.417666494846344, 0.6795433759689331, 0.47890543937683105, 0.15724097192287445, -0.617138683795929, 0.33162614703178406, ...
func desiredRouterCAConfigMap(secret *corev1.Secret, ingresses []ingressv1alpha1.ClusterIngress) (*corev1.ConfigMap, error) { if !shouldPublishRouterCA(ingresses) { return nil, nil } name := routerCAConfigMapName() cm := &corev1.ConfigMap{ ObjectMeta: metav1.ObjectMeta{ Name: name.Name, Namespace: n...
[ -0.8976854681968689, -0.7667317390441895, 0.47306305170059204, 0.4358269274234772, -0.43348193168640137, 0.11725707352161407, 0.420236200094223, 0.6042763590812683, 0.2228441834449768, 0.2593965530395508, 0.2954126298427582, 0.5384570956230164, -0.3820068836212158, 0.5653175115585327, 0....
func shouldPublishRouterCA(ingresses []ingressv1alpha1.ClusterIngress) bool { for _, ci := range ingresses { if ci.Spec.DefaultCertificateSecret == nil { return true } } return false }
[ -0.2251424789428711, 0.2507089376449585, 0.3125256896018982, 1.0264155864715576, 0.9871194958686829, 0.0057085249572992325, 0.37347668409347534, 0.7135026454925537, -0.263554185628891, 0.5641129612922668, 0.04305287078022957, 0.08524304628372192, -1.040480375289917, 0.4727480113506317, -...
func (r *reconciler) currentRouterCAConfigMap() (*corev1.ConfigMap, error) { name := routerCAConfigMapName() cm := &corev1.ConfigMap{} if err := r.Client.Get(context.TODO(), name, cm); err != nil { if errors.IsNotFound(err) { return nil, nil } return nil, err } return cm, nil }
[ -1.4704763889312744, -1.0381817817687988, 0.6138724684715271, 0.08414137363433838, -0.23823297023773193, -0.47252339124679565, 0.8041175007820129, 0.1552550047636032, 0.08931006491184235, 0.5639396905899048, 0.23523136973381042, 0.26491937041282654, -0.3363249897956848, 0.7285061478614807,...
func (r *reconciler) createRouterCAConfigMap(cm *corev1.ConfigMap) error { if err := r.Client.Create(context.TODO(), cm); err != nil { if errors.IsAlreadyExists(err) { return nil } return err } logrus.Infof("created configmap %s/%s", cm.Namespace, cm.Name) return nil }
[ -0.9565465450286865, -0.12639164924621582, 0.6698381304740906, -0.09215689450502396, 0.4081149697303772, -0.06130567193031311, 1.0224874019622803, -0.2628002166748047, 0.07347212731838226, 0.5835582613945007, -0.5227245688438416, -0.5687253475189209, -0.4134683310985565, 0.7080487012863159...
func (r *reconciler) updateRouterCAConfigMap(current, desired *corev1.ConfigMap) error { if routerCAConfigMapsEqual(current, desired) { return nil } updated := current.DeepCopy() updated.Data = desired.Data if err := r.Client.Update(context.TODO(), updated); err != nil { if errors.IsAlreadyExists(err) { ret...
[ -1.7636830806732178, -1.1503926515579224, 0.4660639464855194, -0.13912680745124817, -0.2808992266654968, -0.08207567781209946, 0.39160773158073425, -0.01650928147137165, -0.05890309810638428, 0.6813485622406006, -0.2625576853752136, 0.6944326162338257, -0.8620076775550842, 0.38559794425964...
func (r *reconciler) deleteRouterCAConfigMap(cm *corev1.ConfigMap) error { if err := r.Client.Delete(context.TODO(), cm); err != nil { if errors.IsNotFound(err) { return nil } return err } logrus.Infof("deleted configmap %s/%s", cm.Namespace, cm.Name) return nil }
[ -0.4850466549396515, -0.26742833852767944, 0.3317139744758606, -0.3482825458049774, -0.22919528186321259, -0.09199687838554382, 1.1113245487213135, 0.16650788486003876, 0.236636683344841, 0.636627197265625, -0.633262574672699, 0.01643369160592556, -1.2603516578674316, 1.155108094215393, ...
func routerCAConfigMapsEqual(a, b *corev1.ConfigMap) bool { if a.Data["ca-bundle.crt"] != b.Data["ca-bundle.crt"] { return false } return true }
[ -0.716478168964386, -1.1550589799880981, 0.4594389498233795, 1.1185117959976196, 0.5186229944229126, 0.48709648847579956, 0.5064899921417236, 0.3373642563819885, 0.20962415635585785, 1.202768325805664, -0.5853112936019897, -0.13705819845199585, -0.4765503704547882, 0.38933178782463074, 0...
func (m *EnclosureUpdateBody) Validate(formats strfmt.Registry) error { var res []error if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }
[ -0.7958855032920837, -0.32769012451171875, 0.5031763911247253, 0.2003978192806244, -0.2352583259344101, -0.0031256284564733505, 0.04983234405517578, 0.0283086895942688, 0.04140917956829071, 0.7185220718383789, 0.32074785232543945, -0.47923609614372253, -0.9133954048156738, 0.46144858002662...
func TestLocking(t *testing.T){ conn, err := dlock_client.Connect("localhost", "8422") if err != nil { t.Error("Connection error "+err.Error()) } result := 0 n := 10 delay := 100 * time.Millisecond for i := 0; i < n; i++ { _i := i //capture go func(){ entity := "thread_"+strconv.Itoa(_i) b := dlock...
[ 0.13888798654079437, 0.923378586769104, 0.7376766204833984, -0.016785452142357826, 1.4755935668945312, 0.11221090704202652, 0.4354119598865509, -0.21031752228736877, -0.38558724522590637, -0.813548743724823, 0.14739732444286346, 0.0018075444968417287, -0.201292484998703, -0.078595384955406...
func TestLockOrdering(t *testing.T){ conn1, err := dlock_client.Connect("localhost", "8422") if err != nil { t.Error("Connection error "+err.Error()) } conn2, err := dlock_client.Connect("localhost", "8422") if err != nil { t.Error("Connection error") } limit := 1000 finish_order := make(chan int, limit) ...
[ -0.4985317885875702, 0.9515545964241028, 0.8155899047851562, 0.05685839802026749, 1.503328800201416, -0.5552546381950378, 0.33256006240844727, -0.5997751951217651, -0.5771290063858032, -0.3159993886947632, -0.01587126962840557, 0.4927666485309601, 0.146807461977005, -0.319195419549942, 1...
func SetTracer(customTracer Tracer) { tracer = customTracer }
[ 0.5393132567405701, -0.3208359181880951, 0.008756833150982857, 0.031102551147341728, -0.8962461352348328, 0.15479162335395813, 0.5171296000480652, 0.34865984320640564, 0.34493371844291687, -0.9812900424003601, -0.6485314965248108, 0.4046320915222168, 0.39720043540000916, 1.1949111223220825...
func (dl *DummyTracer) Trace(ctx context.Context, format string, args ...interface{}) { fmt.Printf(format+"\n", args...) }
[ 0.5559958815574646, 0.20270022749900818, 0.5999796986579895, -0.05273215472698212, 1.2897491455078125, 0.154138445854187, -0.22967375814914703, -1.052625298500061, 0.4737528860569, -0.5573790073394775, -0.13183832168579102, 0.7117204666137695, -0.3999421298503876, 0.6844348907470703, -1....
func Trace(ctx context.Context, format string, args ...interface{}) { tracer.Trace(ctx, format, args...) }
[ 0.794108510017395, -0.2579140365123749, 0.4496018588542938, 0.5461474061012268, 0.8720291256904602, 0.526192843914032, -0.28859248757362366, -1.0453587770462036, 0.42565104365348816, -0.5048648715019226, 0.35113534331321716, 0.105890654027462, 0.1393069475889206, 0.4482622742652893, -0.7...
func parseText(strBytes []byte) (string, error) { if len(strBytes) == 0 { return "", errors.New("empty id3 frame") } if len(strBytes) < 2 { // Not an error according to the spec (because at least 1 byte big) return "", nil } encoding, strBytes := strBytes[0], strBytes[1:] switch encoding { case 0: // ISO-...
[ 0.6147531867027283, 0.08320742100477219, 0.6150169372558594, 0.2522713840007782, -0.4787828028202057, -0.5127955675125122, -0.5762560367584229, -0.3662375211715698, 1.2540292739868164, 0.3622613847255707, -0.3514534831047058, -0.1752953678369522, -0.7912631034851074, -1.0197001695632935, ...
func requestParamsFromRpc(rpc *specSpec.Rpc) []Qparams { // path params regexFindAll "{[a-zA-Z]*}" $method.deeplink.href 10 regex := regexp.MustCompile(`{([^{]+)}`) matches := regex.FindAllStringSubmatch(rpc.Deeplink.Href, 50) params := []Qparams{} i := 1 for _, match := range matches { params = append(params,...
[ -0.7534924745559692, -0.5429475903511047, 0.6172816753387451, -0.7388443946838379, 0.3964981436729431, 0.04271961748600006, -0.4322836995124817, -0.25481653213500977, -0.3924463391304016, -0.16065368056297302, 0.3533613979816437, 0.4364307224750519, -0.9077003598213196, 0.9002141356468201,...
func NewCommand(commandInfo mesos.CommandInfo, env []string, options ...func(*exec.Cmd) error) (Command, error) { // TODO(janisz): Implement shell policy // From: https://github.com/apache/mesos/blob/1.1.3/include/mesos/mesos.proto#L509-L521 // There are two ways to specify the command: // 1) If 'shell == true', th...
[ 1.2355456352233887, -0.5625714063644409, 0.7482746243476868, 0.40002143383026123, -0.49235010147094727, 0.1463799774646759, -0.1366286724805832, 0.28201666474342346, -0.4067806303501129, -0.28200608491897583, 0.1870400309562683, 0.06306333839893341, -0.09363303333520889, 0.5495402216911316...
func ForwardCmdOutput() func(*exec.Cmd) error { return func(cmd *exec.Cmd) error { cmd.Stderr = os.Stderr cmd.Stdout = os.Stdout return nil } }
[ 0.8766908049583435, -0.2717568874359131, 0.5374719500541687, -1.3219752311706543, -0.9854193925857544, -0.0888122096657753, 0.5886673927307129, -0.21384002268314362, -0.228529155254364, -0.10689374804496765, 0.574691116809845, -0.0403875857591629, 1.0852501392364502, 0.2685239315032959, ...
func ScrapCmdOutput(s scraper.Scraper, a appender.Appender, extenders ...servicelog.Extender) func(*exec.Cmd) error { return func(cmd *exec.Cmd) error { entries, writer := scraper.Pipe(s) entries = servicelog.Extend(entries, extenders...) cmd.Stderr = writer cmd.Stdout = writer go a.Append(entries) return ...
[ 0.42838054895401, -0.07065500319004059, 0.6475924849510193, -0.7703675031661987, -0.9638794660568237, -0.496730238199234, 0.5153499841690063, 0.6077218651771545, 0.29710033535957336, -0.7232254147529602, 0.2693121135234833, -0.02379324659705162, 0.9600831270217896, 0.24280916154384613, -...
func envWithoutExecutorConfig() (env []string) { for _, variable := range os.Environ() { if !strings.HasPrefix(variable, strings.ToUpper(EnvironmentPrefix)) { env = append(env, variable) } else { } } return env }
[ -0.6821412444114685, -0.7830308079719543, 0.5776121616363525, -0.6946519613265991, -0.26048943400382996, 0.13184435665607452, 0.44144362211227417, -0.0036335221957415342, -0.2588120102882385, 0.6710447669029236, -0.5745994448661804, 0.7455527782440186, -0.05772925540804863, 1.3242980241775...
func (m *monitor) Start() error { log.Info("sensor: starting monitors...") // if err := m.peMon.Start(); err != nil { // return err // } if err := m.fanMon.Start(); err != nil { log. WithError(err). Error("sensor: composite monitor - FAN failed to start running") return err } if err := m.ptMon.Star...
[ 0.023942379280924797, -0.5187403559684753, 0.3079906105995178, 0.48611700534820557, 1.1959245204925537, 0.45223209261894226, 0.5324254631996155, -0.20649248361587524, -0.22050292789936066, -0.08224549889564514, -0.26020950078964233, 0.5108415484428406, -0.6330300569534302, 0.68860292434692...
func NewMemoryParams(localStorageRoot string, localStorageWebRoot string) MemoryParams { absTmpPath, err := filepath.Abs(localStorageRoot) if err != nil { log.Fatalln(fmt.Errorf("could not get absolute path for %s", localStorageRoot)) } storagePath := path.Join(absTmpPath, localStorageWebRoot) webRoot := "/" + l...
[ 1.0664830207824707, -1.0200557708740234, 0.47997960448265076, -0.1156734973192215, -0.5727436542510986, -0.2146499752998352, -0.5556222796440125, 0.5063856840133667, -0.2068524956703186, 0.5349515080451965, 0.3741490840911865, 0.614521324634552, -0.38171884417533875, 1.9745689630508423, ...
func NewMemory(params MemoryParams) *Memory { var fs = afero.NewMemMapFs() var tempFs = afero.NewMemMapFs() return &Memory{ root: params.root, webRoot: params.webRoot, fs: &afero.Afero{Fs: fs}, tempFs: &afero.Afero{Fs: tempFs}, } }
[ 0.5062987804412842, -1.1529916524887085, 0.2826842963695526, 0.6618184447288513, 0.05936542898416519, -0.28518322110176086, 0.4040031135082245, -0.27563273906707764, -0.03174954652786255, 0.05955319106578827, 0.7022759318351746, 0.7402734756469727, -0.15080706775188446, 1.1436867713928223,...
func (fs *Memory) Store(key string, data io.ReadSeeker, _ string, _ *string) (*StoreResult, error) { if key == "" { return nil, errors.New("A valid StorageKey must be set before data can be uploaded") } joined := filepath.Join(fs.root, key) dir := filepath.Dir(joined) err := fs.fs.MkdirAll(dir, 0755) if err !...
[ -0.009713319130241871, -0.03159639611840248, 0.8780080676078796, -0.11382895708084106, -0.7344187498092651, 0.5195533037185669, 0.7248401641845703, -0.5619832873344421, -0.08429326862096786, -0.4990484118461609, 0.07685605436563492, 0.04475153982639313, -0.6921685934066772, 0.4335542321205...
func (fs *Memory) Delete(key string) error { joined := filepath.Join(fs.root, key) return errors.Wrap(fs.fs.Remove(joined), "could not remove file") }
[ 0.8530694842338562, -0.05479063093662262, 0.42714300751686096, 0.4485630989074707, -0.43297478556632996, 0.22721688449382782, -0.1694975644350052, 0.46984657645225525, -0.027050865814089775, 0.520942747592926, 0.5177561044692993, -0.4908844530582428, -0.9535559415817261, 0.9854565262794495...
func (fs *Memory) PresignedURL(key, contentType string) (string, error) { values := url.Values{} values.Add("contentType", contentType) url := fs.webRoot + "/" + key + "?" + values.Encode() return url, nil }
[ -0.19095002114772797, -0.02400045283138752, 0.23992571234703064, 0.10188812762498856, -0.04604513198137283, -0.3228811025619507, -0.4513183534145355, 0.20179513096809387, 0.03879866749048233, -0.08091516047716141, -0.37552788853645325, -0.2769589424133301, -0.7031781673431396, 1.2994284629...
func (fs *Memory) Fetch(key string) (io.ReadCloser, error) { sourcePath := filepath.Join(fs.root, key) f, err := fs.fs.Open(sourcePath) return f, errors.Wrap(err, "could not open file") }
[ 0.3383457064628601, -0.8706408739089966, 0.3625718057155609, -0.5684664845466614, -1.5916651487350464, 0.07721936702728271, -0.7481904029846191, -0.09327787160873413, -0.12515658140182495, -0.2008102983236313, 0.31177324056625366, 0.6045446991920471, 0.4819325804710388, 0.9550723433494568,...
func (fs *Memory) Tags(_ string) (map[string]string, error) { tags := make(map[string]string) return tags, nil }
[ -0.609592616558075, -0.19869229197502136, 0.37219253182411194, -1.4579858779907227, -0.6619061827659607, -0.7307021617889404, -0.8414873480796814, -0.38254305720329285, -0.48895207047462463, -0.259272962808609, -1.0712181329727173, 0.09114839881658554, 0.048241011798381805, 0.8041939139366...
func (fs *Memory) FileSystem() *afero.Afero { return fs.fs }
[ 0.43467268347740173, -0.41363731026649475, 0.21515634655952454, 0.15527105331420898, -0.4714967906475067, -1.2219102382659912, 0.4726565480232239, -1.255924940109253, 1.4695007801055908, -1.4561041593551636, 0.9210305213928223, 0.369538813829422, 0.4331080913543701, 0.8312393426895142, -...
func (fs *Memory) TempFileSystem() *afero.Afero { return fs.tempFs }
[ 0.46206972002983093, -0.46323874592781067, 0.16869701445102692, -0.747475266456604, -0.05511951446533203, -0.947770893573761, 0.11587940901517868, -1.0356826782226562, 0.9218543767929077, -0.8515910506248474, 0.1355859935283661, -0.04085288569331169, 0.02578034996986389, 0.5829029679298401...
func NewMemoryHandler(root string) http.HandlerFunc { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { contentType := r.URL.Query().Get("contentType") if contentType != "" { w.Header().Add("Content-Type", contentType) } input := filepath.Join(root, filepath.FromSlash(path.Clean("/"+r....
[ 0.7146958112716675, -0.9542355537414551, 0.5012000799179077, -0.5736315250396729, -1.1410248279571533, -0.08115775138139725, 0.504216730594635, -0.08346028625965118, -0.13201354444026947, 0.1343216598033905, 0.21530894935131073, 0.44420531392097473, -0.48510023951530457, 0.8399395942687988...
func (s GetFileUploadURLInput) String() string { return awsutil.Prettify(s) }
[ 0.025821520015597343, -0.42635247111320496, 0.08608977496623993, -0.5943489074707031, -0.20474371314048767, 0.6449497938156128, 0.6716690063476562, -0.6052150726318359, -0.2876993417739868, -0.5060846209526062, 0.20844817161560059, 0.5797876715660095, 0.3694174289703369, -0.168529137969017...
func (s *GetFileUploadURLInput) Validate() error { invalidParams := aws.ErrInvalidParams{Context: "GetFileUploadURLInput"} if s.AssignmentId == nil { invalidParams.Add(aws.NewErrParamRequired("AssignmentId")) } if s.AssignmentId != nil && len(*s.AssignmentId) < 1 { invalidParams.Add(aws.NewErrParamMinLen("Assi...
[ -0.3449394404888153, -0.0235803984105587, 0.4414155185222626, -0.09723909199237823, -0.09396366775035858, 0.73200523853302, -0.12145230919122696, -0.26680028438568115, -0.49019941687583923, -0.42496469616889954, 1.0019279718399048, 0.12718211114406586, -0.27718421816825867, 0.6943601965904...
func (s GetFileUploadURLOutput) String() string { return awsutil.Prettify(s) }
[ 0.5168810486793518, -0.9690418243408203, 0.15831992030143738, -0.6666824817657471, -0.47229939699172974, -0.09533374756574631, 0.8439804315567017, -0.443903386592865, -0.6667720079421997, -0.5559273362159729, 0.39440637826919556, 0.5993196964263916, 0.7386728525161743, -0.47007954120635986...
func (r GetFileUploadURLRequest) Send(ctx context.Context) (*GetFileUploadURLResponse, error) { r.Request.SetContext(ctx) err := r.Request.Send() if err != nil { return nil, err } resp := &GetFileUploadURLResponse{ GetFileUploadURLOutput: r.Request.Data.(*GetFileUploadURLOutput), response: &aw...
[ -0.7471261024475098, 0.006937593687325716, 0.4204140901565552, 0.03893478587269783, 0.48123008012771606, -0.26831090450286865, -0.031233983114361763, -0.6923890709877014, -0.4865926504135132, -0.7053272128105164, -0.10286027193069458, 0.3849485516548157, 0.11140351742506027, 0.130964189767...
func (r *GetFileUploadURLResponse) SDKResponseMetdata() *aws.Response { return r.response }
[ 0.05893274396657944, -0.3552916944026947, 0.45437583327293396, -0.5202347040176392, 0.2315605878829956, 0.16643188893795013, -0.5421651005744934, -0.11256242543458939, 0.3318382501602173, -0.4955257773399353, -0.29892396926879883, -0.3881939947605133, 0.36238181591033936, -0.79494887590408...
func (c *Conn) ListIndexes(ctx context.Context, schema, table string) ([]*ddl.Index, error) { db, err := catalog.New(ctx, c.conn) if err != nil { return nil, err } return db.ListIndexes(ctx, schema, table) }
[ -0.8898436427116394, -0.4081073999404907, 0.20524965226650238, 1.2111279964447021, 0.24076667428016663, -0.6934196949005127, -1.0437142848968506, 0.2745651304721832, 0.08066167682409286, 0.09749886393547058, -0.6940538287162781, 0.5326344966888428, -0.7902590036392212, -0.293343722820282, ...
func NewCurl(rounds ...CurlRounds) SpongeFunction { r := NumberOfRounds if len(rounds) > 0 { r = rounds[0] } return &Curl{ rounds: r, direction: SpongeAbsorbing, } }
[ 0.3026835024356842, -0.2814972400665283, 0.2596677243709564, 0.08240067213773727, -0.6834359765052795, 0.36981597542762756, 1.3535271883010864, -0.38536468148231506, 0.622571587562561, 0.2584817111492157, 0.3180333971977234, 0.16680212318897247, 0.40765872597694397, -0.040945637971162796, ...
func NewCurlP27() SpongeFunction { return NewCurl(CurlP27) }
[ 0.3091636002063751, -0.9541993737220764, 0.03460719808936119, 0.3287246525287628, -1.0728908777236938, -0.0717121809720993, -0.37427404522895813, 0.5782305002212524, 0.058004070073366165, 0.15074431896209717, -0.04305216297507286, 0.04933902621269226, -0.005077279172837734, 0.0621383264660...