text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (r *AutoRoller) Tick(ctx context.Context) error { r.runningMtx.Lock() defer r.runningMtx.Unlock() sklog.Infof("Running autoroller.") // Update the config vars. if err := r.reg.Update(ctx); err != nil { sklog.Errorf("Failed to update config registry; continuing, but config may be out of date: %s", err) } ...
[ 0.2438168227672577, -0.3092218339443207, 0.7168384194374084, -0.25361359119415283, 0.28063827753067017, -0.1285380870103836, 0.866834282875061, -0.9416967630386353, 0.19469623267650604, 0.4792213439941406, 0.07344482094049454, 0.9422385096549988, 0.7413434982299805, -0.11512255668640137, ...
func (r *AutoRoller) AddComment(ctx context.Context, issueNum int64, message, user string, timestamp time.Time) error { roll, err := r.recent.Get(ctx, issueNum) if err != nil { return skerr.Fmt("No such issue %d", issueNum) } id := fmt.Sprintf("%d_%d", issueNum, len(roll.Comments)) roll.Comments = append(roll.Co...
[ -0.6973711848258972, -0.0178593248128891, 0.787507176399231, -0.06671852618455887, 0.5233964323997498, -0.07639006525278091, 0.6028821468353271, 0.3243293762207031, 0.03238945081830025, -0.32934167981147766, 0.2974875271320343, -0.42772623896598816, -0.02337757498025894, -0.004868155345320...
func (r *AutoRoller) rollFinished(ctx context.Context, justFinished codereview.RollImpl) error { recent := r.recent.GetRecentRolls() // Sanity check: pop any rolls which occurred after the one which just // finished. idx := -1 var currentRoll *autoroll.AutoRollIssue for i, roll := range recent { issue := fmt.Sp...
[ 0.08650445193052292, 0.23708440363407135, 0.5189966559410095, 0.010150207206606865, 0.5871326327323914, -0.5567179322242737, 0.3423733115196228, -0.3285036087036133, -0.02777690999209881, 0.10466217249631882, -0.887147843837738, 0.4929916262626648, 0.524493932723999, 1.1170259714126587, ...
func (r *AutoRoller) handleManualRolls(ctx context.Context) error { r.runningMtx.Lock() defer r.runningMtx.Unlock() if r.GetMode() == modes.ModeOffline { return nil } sklog.Infof("Searching manual roll requests for %s", r.cfg.RollerName) reqs, err := r.manualRollDB.GetIncomplete(r.cfg.RollerName) if err != n...
[ -0.5281409621238708, 0.10120584070682526, 0.5706981420516968, -0.0225059911608696, -0.021338531747460365, 0.3761635422706604, -0.6249977350234985, -0.15828923881053925, -0.272728830575943, -0.05446767434477806, -0.038171082735061646, 0.2101159244775772, -0.15086910128593445, 0.840697228908...
func (r *AutoRoller) getRevision(ctx context.Context, id string) (*revision.Revision, error) { if id == r.lastRollRev.Id { return r.lastRollRev, nil } if id == r.nextRollRev.Id { return r.nextRollRev, nil } if id == r.tipRev.Id { return r.tipRev, nil } for _, rev := range r.notRolledRevs { if id == rev.I...
[ 0.1357533186674118, -0.3254179358482361, 0.7615163922309875, 0.08466248214244843, 0.0003932327963411808, -0.8379964828491211, 0.07857953757047653, -0.10924248397350311, 0.8217745423316956, -0.10489435493946075, -0.2317947894334793, 1.1757376194000244, -0.16373111307621002, -0.4438919723033...
func newMapTile(fpath string, pixWid, pixHigh int, n, s, e, w float64) *mapTile { if n > 90 || s < -90 || n < s { panic("No crossing a pole and map's North must be greater than South") } rv := &mapTile{ fpath: fpath, width: pixWid, height: pixHigh, box: [4]float64{n, s, normEasting(e), normEasting(w)}...
[ -0.5378929972648621, -0.4029660224914551, 0.3819904327392578, -0.04711693152785301, -1.6492993831634521, 0.6455525159835815, -0.9092181921005249, -0.3729706406593323, 0.18996953964233398, -0.5059316158294678, -0.032966237515211105, -0.6867952942848206, 0.25224608182907104, 0.28153848648071...
func newMapTileFromFile(fpath string, n, s, e, w float64) (*mapTile, error) { wid, high, err := imageWxH(fpath) if err != nil { return nil, err } return newMapTile(fpath, wid, high, n, s, e, w), nil }
[ 0.39471596479415894, -0.5710089206695557, 0.31302905082702637, 0.12654200196266174, -1.7040224075317383, 0.9490323066711426, -0.4910501539707184, -0.09977298229932785, -0.20873072743415833, 0.16538874804973602, -0.32017821073532104, -0.4372585117816925, 0.11420741677284241, 0.7175348401069...
func getBox(image string) (base string, box []float64, err error) { c := strings.Split(image, "_") if len(c) != 5 { err = fmt.Errorf("File name must include bounding box name_N_S_E_W.jpg in decimal degrees, e.g. Grouse-Mountain_49.336694_49.470628_-123.132056_-122.9811.jpg") return } base = filepath.Base(c[0]) ...
[ -0.4693833589553833, -0.2569778859615326, 0.9787247776985168, 0.1408369541168213, -0.12405034154653549, -0.41193267703056335, 0.23602211475372314, -0.896622359752655, -0.6886823773384094, 0.26756078004837036, -0.22575445473194122, -0.030983075499534607, 0.6005179286003113, 0.91120779514312...
func imageWxH(imageFilename string) (width int, height int, err error) { if _, err := os.Stat(imageFilename); os.IsNotExist(err) { return 0, 0, err } cmd := exec.Command(identifyProg, "-format", "%w %h", imageFilename) glog.Infof("About to run: %#v\n", cmd.Args) var b []byte b, err = cmd.Output() if err != nil...
[ -0.35853341221809387, -0.2736557424068451, 1.0078312158584595, -0.13744154572486877, -0.21126455068588257, -0.051422279328107834, 0.2029184103012085, 0.023592976853251457, -0.09845943748950958, 0.9600766897201538, -0.17926165461540222, 0.5120858550071716, -0.5949335694313049, 1.08417308330...
func process(v *viper.Viper, args []string) error { maxTiles := v.GetInt("max_tiles") drawingOrder := v.GetInt("drawing_order") keepTmp := v.GetBool("keep_tmp") fmt.Printf("maxTiles %v, drawingOrder: %v, keepTmp: %v\n", maxTiles, drawingOrder, keepTmp) if len(args) == 0 { return fmt.Errorf("Image file required...
[ 0.04319925606250763, 0.04525311291217804, 1.1203688383102417, 0.7887040972709656, -0.15852060914039612, 0.16237545013427734, 1.2300832271575928, -0.1310705691576004, 0.124677374958992, 0.5605072379112244, 0.07022487372159958, -0.42940354347229004, 0.018062449991703033, 1.4330912828445435, ...
func finishTileBox(tile, fullMap *mapTile) { nsDeltaDeg, ewDeltaDeg := delta(tile.width, tile.height, fullMap.box, fullMap.width, fullMap.height) tile.box[south] = tile.box[north] - nsDeltaDeg tile.box[east] = tile.box[west] + ewDeltaDeg }
[ -0.3609735071659088, -0.5257443785667419, 0.4635526239871979, -0.748103678226471, -0.4674413800239563, 0.7682740092277527, 0.33611252903938293, -0.39675480127334595, -0.33380088210105896, 0.24623341858386993, -1.1133970022201538, -0.10464467853307724, 0.5604885816574097, 0.8463132977485657...
func delta(tileWidth, tileHeight int, box [4]float64, totWidth, totHeight int) (nsDeltaDeg float64, ewDeltaDeg float64) { nsDeltaDeg = (float64(tileHeight) / float64(totHeight)) * (box[north] - box[south]) ewDeg := eastDelta(box[east], box[west]) ewDeltaDeg = (float64(tileWidth) / float64(totWidth)) * ewDeg return ...
[ -0.3331814706325531, 0.13348425924777985, 0.762172281742096, -0.4195588529109955, 0.004421889781951904, 0.3097968101501465, 0.18814322352409363, -0.3491099774837494, 0.23560833930969238, 0.017679110169410706, -0.48740920424461365, -0.23572638630867004, 0.7991786003112793, 0.628147602081298...
func eastDelta(e, w float64) float64 { e = normEasting(e) w = normEasting(w) if e < w { return 360 + e - w } return e - w }
[ 0.05281442403793335, -0.6739659905433655, 0.6640275716781616, -0.7262547016143799, -0.5327680706977844, 0.9150009155273438, 0.19953250885009766, -0.712285578250885, 0.142630472779274, 0.7202675938606262, 0.5349502563476562, 0.45417898893356323, 0.3121439814567566, 0.4010842740535736, 0.1...
func normEasting(deg float64) float64 { // go's Mod fcn preserves sign on first param if deg < -180 { return math.Mod(deg+180, 360) + 180 } if deg > 180 { return math.Mod(deg-180, 360) - 180 } return deg }
[ -1.2929832935333252, 0.1426571011543274, 0.5248749256134033, -1.464009404182434, -1.462975263595581, 0.09870066493749619, 0.18313458561897278, 0.2660098969936371, 0.5750880837440491, 0.09706424176692963, 0.4796653687953949, -0.2863540053367615, -0.1010778546333313, 0.9367918968200684, 0....
func zipd(dir string, w io.Writer) error { z := zip.NewWriter(w) defer func() { if err := z.Flush(); err != nil { fmt.Printf("Error flushing ZIP writer: %v\n", err) } if err := z.Close(); err != nil { fmt.Printf("Error closing ZIP writer: %v\n", err) } }() filepath.Walk(dir, func(path string, info os....
[ 0.19219441711902618, -0.692674994468689, 1.2642238140106201, -0.4477565586566925, -0.5470972061157227, 1.0405395030975342, 1.4621429443359375, -0.5238613486289978, 0.41598013043403625, -0.5755858421325684, 0.6652491092681885, 0.2551515996456146, 0.13102687895298004, 0.34297528862953186, ...
func NewSection(name string) *Section { return &Section{Name: name, Options: []*OptionValue{}} }
[ -0.10792683064937592, -0.8202279806137085, 0.11796097457408905, -0.1462506800889969, -1.384988784790039, -0.11825267225503922, -0.6061881184577942, -1.127961277961731, 0.08196736872196198, 0.3245571553707123, -0.24671916663646698, 0.21101593971252441, 0.5280242562294006, 0.5796442627906799...
func With(w http.ResponseWriter, r *http.Request, status int, data interface{}) { mutex.RLock() opts := options[r] multiple := responded[r] mutex.RUnlock() with(w, r, status, data, opts, multiple) }
[ -0.04467596858739853, -0.9806355237960815, 0.5077903866767883, -0.5060619711875916, -0.226399764418602, -0.11913476884365082, -0.4992712736129761, -0.6894558668136597, 0.44679248332977295, -0.7616362571716309, -0.0578191913664341, -0.01686355471611023, 0.1764538586139679, 0.243440628051757...
func (o *Options) Handler(handler http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { initOnce.Do(func() { options = make(map[*http.Request]*Options) responded = make(map[*http.Request]bool) }) mutex.Lock() options[r] = o mutex.Unlock() defer func() { ...
[ -0.22974887490272522, 0.046737078577280045, 0.4180241823196411, -0.20518916845321655, 0.3529343008995056, 0.23605789244174957, 0.8350110054016113, -0.21721071004867554, 0.42015188932418823, -0.49066904187202454, -0.17572298645973206, -0.4487009346485138, 0.2988174855709076, 0.0375114306807...
func (o *Options) OnErrLog(err error) { log.Println("respond: " + err.Error()) }
[ 0.2164347767829895, -0.4002358913421631, 0.4958116412162781, -0.7524707913398743, -0.547885537147522, -0.43488699197769165, 1.0574170351028442, -0.5098209977149963, 0.5396105647087097, 0.29247671365737915, 0.42541998624801636, 0.278670996427536, 0.16808359324932098, -0.3321341574192047, ...
func (r *DHCPServerReconciler) ensureIPv4GatewayLease( ctx context.Context, dhcpServer *dhcpv1alpha1.DHCPServer, ippool *ipamv1alpha1.IPv4Pool, ) (_ *ipamv1alpha1.IPv4Lease, err error) { if dhcpServer.Spec.IPv4 == nil { return nil, nil } // Ensure Gateway IP is Leased gwlease := &ipamv1alpha1.IPv4Lease{ Obje...
[ -0.4644657373428345, -0.6368410587310791, 0.2498936653137207, -0.768962025642395, -0.08582530170679092, -0.13634814321994781, -0.06945711374282837, -0.7006114721298218, 0.04099896922707558, 0.23526309430599213, 0.4975166618824005, -0.5095658898353577, -1.5713692903518677, 0.479282408952713...
func (r *DHCPServerReconciler) ensureIPv6GatewayLease( ctx context.Context, dhcpServer *dhcpv1alpha1.DHCPServer, ippool *ipamv1alpha1.IPv6Pool, ) (_ *ipamv1alpha1.IPv6Lease, err error) { if dhcpServer.Spec.IPv6 == nil { return nil, nil } // Ensure Gateway IP is Leased gwlease := &ipamv1alpha1.IPv6Lease{ Obje...
[ -0.2720502018928528, -0.6752561926841736, 0.29036444425582886, -0.46670040488243103, -0.12618811428546906, -0.2476053535938263, -0.1838410645723343, -0.6612095236778259, 0.23658981919288635, 0.5190273523330688, 0.23771421611309052, -0.5089829564094543, -1.3643043041229248, 0.44014236330986...
func getEndpoints(pod string) []string { resp, _ := http.Get("http://172.17.8.101:8080/api/v1beta1/endpoints/" + pod + "?namespace=default") body, _ := ioutil.ReadAll(resp.Body) var endpoints v1beta1.Endpoints json.Unmarshal(body, &endpoints) return (endpoints.Endpoints) }
[ -1.7395771741867065, -0.26744315028190613, 0.5033849477767944, 0.16332735121250153, 1.0924930572509766, 0.2033935785293579, -0.7857000827789307, -0.47191792726516724, -0.4171622395515442, 0.5139160752296448, -0.2835371494293213, 0.4940459132194519, -0.9381268620491028, -0.3243303894996643,...
func (this pool) add( handle string, context ServerContext, access Access, ) error { // Confirm that the given user exists if _, err := getRawUserInfo(handle, context, access); err != nil { return err } // Add handle to user pool this.users.add(handle) // Update data err := access.Save(&this, true, context)...
[ -0.7053051590919495, -0.5188729166984558, 0.782970666885376, -0.2781814634799957, 0.28717413544654846, 1.6199496984481812, 0.5468496084213257, -0.09577465802431107, 0.2952852249145508, -0.6698462963104248, 0.07415121048688889, 0.9545363783836365, -0.5106199979782104, -0.07733383029699326, ...
func (this pool) block( handle string, context ServerContext, access Access, ) error { // Ignore self if handle == this.handle { return fmt.Errorf( "user \"%s\" attempted to delete self from pool", this.handle, ) } // Confirm that the given user exists if _, err := getRawUserInfo(handle, context, access);...
[ -0.5650264024734497, 0.1747409850358963, 0.9900760054588318, -0.16751709580421448, -0.33485841751098633, 1.2716901302337646, 1.313820481300354, -0.7581052184104919, 0.010202581062912941, -0.3388092517852783, -0.06410414725542068, 0.8123603463172913, -0.4698653817176819, 0.11184396594762802...
func (this pool) clean(context ServerContext, access Access) (modified bool) { // Iterate through handles in user pool for _, handle := range this.users { // If user cannot be loaded, remove handle if _, err := getRawUserInfo(handle, context, access); err != nil { log.Printf("Cleaned \"%s\" from %s", handle, t...
[ -0.7672598361968994, -0.9564148187637329, 0.8074997067451477, -0.6060371398925781, -0.6648133397102356, 1.1974899768829346, 0.7310380339622498, -0.38962289690971375, -0.27423402667045593, 0.30024731159210205, 0.3237052857875824, 0.6107804775238037, -0.8314684629440308, 0.7954825758934021, ...
func addPool( handle string, context ServerContext, access Access, ) (*pool, error) { this := &pool{ handle: handle, users: newUserPool(), } // Add self to pool this.users.add(handle) // Update data if err := access.Save(this, true, context); err != nil { return nil, err } log.Printf("Created new poo...
[ -0.8433613181114197, -0.2620745897293091, 0.7201428413391113, 0.5901621580123901, -0.2613694965839386, 1.452310562133789, 0.9300842881202698, 0.039581604301929474, 0.3213808238506317, -1.4329252243041992, 0.15777738392353058, 0.6571318507194519, -0.49695202708244324, -0.026736773550510406,...
func getRawPool( handle string, context ServerContext, access Access, ) ([]byte, error) { loaded := &pool{handle: handle} buffer, err := access.LoadRaw(loaded, context) if err != nil { return nil, err } // Deserialize (unfortunately has to be done) for cleaning err = loaded.UnmarshalBinary(buffer) if err !...
[ -0.5426885485649109, -0.38231387734413147, 1.1793525218963623, -0.739686906337738, -1.0825752019882202, 0.35866308212280273, 0.2022063136100769, -0.3395226001739502, 0.7570309042930603, -0.6112386584281921, -0.2816694378852844, 1.0297603607177734, -0.5356850624084473, -0.13166309893131256,...
func getPool( handle string, context ServerContext, access Access, ) (*pool, error) { buffer, err := getRawPool(handle, context, access) if err != nil { return nil, err } loaded := &pool{handle: handle} err = loaded.UnmarshalBinary(buffer) if err != nil { return nil, err } return loaded, nil }
[ 0.13910932838916779, -0.026219705119729042, 0.8342447280883789, -0.19804885983467102, -0.2502189874649048, 0.3306660056114197, 0.4735834002494812, -0.3760128915309906, 0.31463539600372314, -0.7523987293243408, -0.03330804780125618, 1.3138031959533691, -0.175480455160141, -0.706677556037902...
func removePool( handle string, context ServerContext, access Access, ) error { target := pool{handle: handle} err := access.Remove(target, context) if err != nil { return err } return nil }
[ -0.6876828074455261, -0.03486242517828941, 0.6157058477401733, -0.10724100470542908, -0.04079478234052658, 0.2677338123321533, 0.8395984768867493, 0.5841134786605835, 0.40307512879371643, -0.2215096652507782, 0.314215749502182, 1.0464633703231812, -0.6373497247695923, -0.3182453513145447, ...
func (this *pool) MarshalBinary() ([]byte, error) { // Create wrapper from pool struct and serialize wrapper := &poolData{this.users} return serialize(wrapper) }
[ -0.3809043765068054, -0.9043614268302917, 0.4312784671783447, 0.2872921824455261, 0.1895725280046463, 0.6601752042770386, -0.7427864074707031, -0.75385582447052, 0.41341066360473633, -0.2668413519859314, -0.5720535516738892, 1.3066047430038452, -0.5293952226638794, -0.023456361144781113, ...
func (s *APIsService) ListAPIs() ([]*API, error) { var p []*API err := s.client.GET("/apis", &p) if err != nil { return nil, err } return p, nil }
[ -1.1709349155426025, -0.17823141813278198, -0.38871726393699646, 0.06819707155227661, -0.0377102792263031, 0.19402624666690826, -1.703872799873352, -0.7291085720062256, 1.0004756450653076, -0.3794967234134674, -0.37927573919296265, 1.2237132787704468, -0.8159098029136658, 0.034955248236656...
func (s *APIsService) GetAPI(id string) (*API, error) { u := fmt.Sprintf("/apis/%s", id) p := new(API) err := s.client.GET(u, p) if err != nil { return nil, err } return p, nil }
[ -0.6108284592628479, 0.2504945397377014, 0.07820601016283035, 0.5196253061294556, 0.15575119853019714, -0.20376285910606384, -0.5128082633018494, -0.4786038100719452, 0.2049291729927063, -0.48127129673957825, -0.905242919921875, 0.7360935807228088, -0.4635287821292877, -0.9378716945648193,...
func (s *APIsService) CreateAPI(opt *CreateAPIOptions) error { err := s.client.POST("/apis", nil, opt) if err != nil { return err } return nil }
[ -0.7036300301551819, 0.5329594612121582, 0.25437378883361816, 0.9685825109481812, 0.7967511415481567, 0.9414336681365967, -0.3879104256629944, -0.5203762054443359, -0.2135615050792694, -0.0069013251923024654, -0.517163872718811, -0.11180856823921204, -0.9696753621101379, -0.332312941551208...
func (s *APIsService) DeleteAPI(id string) error { u := fmt.Sprintf("/apis/%s", id) return s.client.DELETE(u, nil) }
[ -1.0736734867095947, -0.04665890336036682, -0.14450104534626007, 0.10019989311695099, -0.2146691381931305, 0.046122435480356216, -0.5933249592781067, -0.2191351056098938, 0.5247398018836975, -0.2215002030134201, -0.8973056674003601, 0.5033574104309082, -0.5815436244010925, 0.14312654733657...
func (fs *MediaScan) Folders() (string, string) { return fs.baseFolder, fs.subFolder }
[ -1.015895128250122, -0.9468029141426086, 0.599213182926178, 0.0007390923565253615, -0.8658323287963867, 0.06133422628045082, -0.045695241540670395, -0.5022817254066467, 0.115186408162117, -0.9245878458023071, 0.012849660590291023, 0.051216624677181244, -0.1529621034860611, 0.62582665681838...
func (fs *MediaScan) SetFolders(baseFolder, subFolder string) { fs.baseFolder = baseFolder fs.subFolder = subFolder }
[ -0.34266555309295654, -0.17365247011184692, 0.24287649989128113, 0.4150659143924713, -0.1608380377292633, -0.019284117966890335, -0.5180083513259888, 0.08091739565134048, -0.5746548771858215, -1.3200604915618896, -0.2906568646430969, 0.09741594642400742, -0.469963014125824, 1.0768228769302...
func (fs *MediaScan) Verbose(v bool) { fs.verbose = v }
[ 0.46999654173851013, 0.47461798787117004, 0.19924017786979675, 0.22010517120361328, 0.5061799883842468, -0.056409403681755066, -0.08717966079711914, -0.22636914253234863, -0.3020402491092682, 0.31880518794059753, 0.04471426084637642, 0.16131919622421265, -0.56618332862854, 0.49806928634643...
func (fs *MediaScan) WhoAmI() string { return "Media Scan" }
[ -0.246528759598732, -1.1945834159851074, 0.34590888023376465, 0.49133557081222534, -0.4364796578884125, -0.06093928962945938, -0.016202092170715332, -0.07694178074598312, -0.01686112768948078, -0.41983601450920105, 0.10196421295404434, -0.1434776335954666, 0.22236531972885132, 0.0098806191...
func (fs *MediaScan) Scan( baseFolder, subFolder string, walkCancelChan chan struct{}) (int, error) { // Halt file system walk if needed var mutex sync.RWMutex haltWalk := false go func(haltWalk bool) { // Wait until signal recieved <- walkCancelChan // Halt fs walk mutex.Lock() haltWalk = true...
[ -0.6179928183555603, -0.21872732043266296, 0.968576192855835, 0.33837923407554626, -0.5560306906700134, 0.48056456446647644, 1.019858717918396, -0.43889886140823364, -0.983335554599762, -0.4194730222225189, 0.1521734893321991, 0.2839815616607666, -0.11624202877283096, 0.7430559992790222, ...
func (status VerifyImageStatus) ImageDownloadDirNames() (string, string, string) { downloadDirname := DownloadDirname + "/" + status.ObjType var pendingDirname, verifierDirname, verifiedDirname string if status.IsContainer { pendingDirname = downloadDirname + "/pending/" + status.ImageID.String() verifierDirnam...
[ -0.7701331377029419, -0.515748918056488, 0.6738884449005127, -0.11297471821308136, 0.25360196828842163, -0.7350565195083618, -0.3064005970954895, -0.1331626921892166, 0.607883870601654, 0.22147642076015472, -0.7993124723434448, 0.38877615332603455, 0.3788823187351227, 1.1366324424743652, ...
func (status VerifyImageStatus) ImageDownloadFilenames() (string, string, string) { var pendingFilename, verifierFilename, verifiedFilename string pendingDirname, verifierDirname, verifiedDirname := status.ImageDownloadDirNames() if status.IsContainer { pendingFilename = pendingDirname + "/" + status.ContainerI...
[ -0.29831889271736145, -0.40192097425460815, 0.7258201837539673, 0.07576660066843033, 0.17283490300178528, -0.4290618300437927, -0.3767118453979492, 0.0629601702094078, 0.05909884721040726, 0.29812896251678467, -0.5270079374313354, -0.1062060073018074, 0.24876953661441803, 0.736661851406097...
func initConfig() { if cfgFile != "" { viper.SetConfigFile(cfgFile) } else { home, err := os.UserHomeDir() if err != nil { log.Fatalf("Reading home directory: %s", err) } viper.AddConfigPath(home) viper.SetConfigName(".rproxy") } if err := viper.ReadInConfig(); err != nil { log.Fatalf("Loading con...
[ 0.7134255170822144, -0.16275089979171753, 0.7126669883728027, 0.3944222033023834, 0.16575153172016144, -0.29605546593666077, 0.6225359439849854, 1.3779531717300415, -0.7876061797142029, 0.5072203278541565, 0.003481305902823806, -0.10542483627796173, -0.5451179146766663, 1.006058931350708, ...
func initLogging(verbose bool) { log.SetOutput(os.Stdout) log.SetLevel(log.DebugLevel) if verbose { log.SetLevel(log.InfoLevel) } log.SetFormatter(&log.JSONFormatter{}) }
[ 0.0898686945438385, 0.25319576263427734, 0.7297466993331909, 0.4922099709510803, -0.3998287320137024, -0.4447733461856842, -0.9024825692176819, 0.08915943652391434, -0.5531208515167236, 0.33994776010513306, -0.2758864462375641, 0.1595618724822998, 0.16005630791187286, 0.9964688420295715, ...
func checkSnakeCase(field string) (bool, string) { snake := strcase.SnakeCase(field) snake = strings.ToLower(snake) return snake == field, snake }
[ -0.5979167819023132, -0.5316128730773926, 0.5230938196182251, 0.42848172783851624, 0.30873236060142517, -0.32984742522239685, -0.387369841337204, -0.011480133049190044, 0.7172784805297852, 1.8442399501800537, -0.5444657802581787, 0.7061687707901001, -0.8870554566383362, 1.2757351398468018,...
func checkAbbreviation(field string) (bool, string) { var expectedAbbreviations = map[string]string{ "configuration": "config", "identifier": "id", "information": "info", "specification": "spec", "statistics": "stats", } if suggestion, exists := expectedAbbreviations[field]; exists { return true...
[ -1.0886236429214478, -0.11861595511436462, 0.6519253849983215, -0.4142703413963318, 0.4204086661338806, 0.5213035941123962, 0.24870441854000092, -0.1183963268995285, -0.7621373534202576, 1.3406277894973755, -0.21171477437019348, 0.3188765048980713, 0.015154292806982994, 1.0165938138961792,...
func checkNumbers(field string) bool { var numberStart = regexp.MustCompile("^[0-9]") for _, segment := range strings.Split(field, "_") { if numberStart.MatchString(segment) { return true } } return false }
[ -1.0045987367630005, 0.5895450115203857, 0.60800701379776, -0.20437651872634888, 0.040872879326343536, 0.25216034054756165, -0.13150744140148163, 0.9722743034362793, -0.8885152339935303, 0.413383811712265, -1.056599497795105, -0.7796368598937988, -1.0428439378738403, 0.7369510531425476, ...
func checkReservedWords(field string) bool { reservedWordsSet := []string{"abstract", "and", "arguments", "as", "assert", "async", "await", "boolean", "break", "byte", "case", "catch", "char", "class", "const", "continue", "debugger", "def", "default", "del", "delete", "do", "double", "elif", "else", "enum", "eval...
[ -0.5007178783416748, 0.2960395812988281, 0.7987338304519653, -1.0549818277359009, -0.5266005992889404, -0.015528981573879719, 0.27330490946769714, -0.2953034043312073, -1.120511770248413, 0.20871886610984802, -0.48282936215400696, -0.32849377393722534, -1.2019752264022827, 0.74977827072143...
func checkPrepositions(field string) bool { preps := []string{"after", "at", "before", "between", "but", "by", "except", "for", "from", "in", "including", "into", "of", "over", "since", "to", "toward", "under", "upon", "with", "within", "without"} for _, segment := range strings.Split(field, "_") { result := so...
[ -1.6685279607772827, 0.13352131843566895, 0.7651578187942505, -0.9665693044662476, -0.6108468770980835, 0.325051486492157, 0.031428176909685135, -0.9461698532104492, -0.8207690715789795, 0.20303595066070557, -0.8257059454917908, -0.968841016292572, -0.47283700108528137, 0.358940452337265, ...
func AIP140Driver(f Field) []MessageType { messages := make([]MessageType, 0) val, sugg := checkSnakeCase(f.Name) if !val { m := []string{"Error", "Parameter names must follow case convention: lower_snake_case\n", fmt.Sprintf("Rename field %s to %s\n", f.Name, sugg)} temp := MessageType{Message: m, Path: f.Pa...
[ -0.7471637725830078, -0.6232243776321411, 0.8814131617546082, -0.4961690604686737, 0.3564741313457489, -0.8376085162162781, 0.36925143003463745, -0.465584397315979, -0.7160602807998657, 0.9590823650360107, 0.46788695454597473, 0.017863674089312553, -0.6869196891784668, 1.3235790729522705, ...
func (fn GetStorageByPathHandlerFunc) Handle(params GetStorageByPathParams) middleware.Responder { return fn(params) }
[ 0.526516854763031, -0.4129317104816437, 0.4423786997795105, 1.2938963174819946, 0.4246211051940918, -0.4780997633934021, 0.8980163335800171, -0.5126197338104248, -0.2317853718996048, -0.7578353881835938, 0.30014556646347046, -0.749233603477478, -0.41035863757133484, -0.5314117074012756, ...
func NewGetStorageByPath(ctx *middleware.Context, handler GetStorageByPathHandler) *GetStorageByPath { return &GetStorageByPath{Context: ctx, Handler: handler} }
[ 0.7907840013504028, -0.6824408173561096, 0.11701930314302444, 1.0372103452682495, -0.5343378186225891, -0.3130091428756714, 0.3831577003002167, -1.331343173980713, -0.6416854858398438, -0.13984890282154083, -0.20742672681808472, -0.3295905590057373, -0.3521021008491516, -0.1141909062862396...
func (*SendMessageRequest) Descriptor() ([]byte, []int) { return file_proto_imp_api_messaging_messaging_proto_rawDescGZIP(), []int{0} }
[ -1.1607141494750977, 0.5675767660140991, 0.6470765471458435, -0.29534944891929626, -0.004589202348142862, -0.41864368319511414, 0.6843053102493286, 0.14766648411750793, -0.05900131165981293, 0.4084295928478241, -0.06253257393836975, 0.11910010129213333, -0.750270664691925, 2.02273869514465...
func (*SendMessageResponse) Descriptor() ([]byte, []int) { return file_proto_imp_api_messaging_messaging_proto_rawDescGZIP(), []int{1} }
[ -0.6328474879264832, 0.6087964177131653, 0.16640950739383698, -0.31035926938056946, -0.08606026321649551, -0.9591779708862305, 0.6943269968032837, -0.2890568673610687, 0.20815296471118927, 0.6182379722595215, -0.5416985750198364, -0.5363795757293701, -1.6767199039459229, 1.0609570741653442...
func (p *BaseRouter) IdentifyPeerWithMyID(peer *PttPeer) error { if p.myEntity == nil { return ErrInvalidEntity } myID := p.myEntity.GetID() salt, err := peer.InitID(myID, p.quitSync, true) if err != nil { return err } data := &IdentifyPeerWithMyID{ ID: myID, Challenge: salt, } peer.IDEntity...
[ -0.9641495943069458, -1.0328762531280518, 0.6895785331726074, 0.4041617810726166, 0.2157939374446869, -0.1360168159008026, -0.4401857256889343, -0.6687082648277283, 0.15158607065677643, 0.35688093304634094, -1.2649133205413818, 0.2586336135864258, -0.6727191805839539, 1.4094876050949097, ...
func RegisterAuthServerImpl(name string, authServer AuthServer) { if _, ok := authServers[name]; ok { log.Fatalf("AuthServer named %v already exists", name) } authServers[name] = authServer }
[ -1.557627558708191, -0.1644357293844223, 0.3810898959636688, -0.7767128348350525, -0.11568254977464676, 0.1565452367067337, -0.3832574784755707, -0.8127310276031494, 0.8735532164573669, 0.37692755460739136, -1.6267749071121216, 0.9918103814125061, 0.04387310519814491, 0.5150806903839111, ...
func GetAuthServer(name string) AuthServer { authServer, ok := authServers[name] if !ok { log.Exitf("no AuthServer name %v registered", name) } return authServer }
[ -0.8950586318969727, -0.4944385588169098, 0.3286164402961731, -0.2706722617149353, -0.35071924328804016, 0.071944460272789, -0.14408321678638458, -0.5463004112243652, 0.6796903610229492, -0.2228981852531433, -0.6533486247062683, 1.4095630645751953, -0.5046605467796326, 0.7482686042785645, ...
func NewSalt() ([]byte, error) { salt := make([]byte, 20) if _, err := rand.Read(salt); err != nil { return nil, err } // Salt must be a legal UTF8 string. for i := 0; i < len(salt); i++ { salt[i] &= 0x7f if salt[i] == '\x00' || salt[i] == '$' { salt[i]++ } } return salt, nil }
[ 0.11904006451368332, -0.24422232806682587, 0.42855846881866455, -0.6230152249336243, -0.7853435277938843, -0.5548410415649414, -0.8017808794975281, -0.4602023661136627, 0.5899302363395691, 0.028123483061790466, -0.03482460975646973, 0.7637306451797485, -0.19273358583450317, 0.2526315450668...
func ScrambleMysqlNativePassword(salt, password []byte) []byte { if len(password) == 0 { return nil } // stage1Hash = SHA1(password) crypt := sha1.New() crypt.Write(password) stage1 := crypt.Sum(nil) // scrambleHash = SHA1(salt + SHA1(stage1Hash)) // inner Hash crypt.Reset() crypt.Write(stage1) hash := c...
[ 0.05765940994024277, 0.021172329783439636, 0.8605140447616577, 1.1147123575210571, -1.3331120014190674, 0.12958478927612305, -1.0470044612884521, 0.12575560808181763, 0.3013005554676056, 0.34813421964645386, -0.7898643612861633, -0.11047621071338654, -0.4830521047115326, -0.278144270181655...
func ScrambleCachingSha2Password(salt []byte, password []byte) []byte { if len(password) == 0 { return nil } // stage1Hash = SHA256(password) crypt := sha256.New() crypt.Write(password) stage1 := crypt.Sum(nil) // scrambleHash = SHA256(SHA256(stage1Hash) + salt) crypt.Reset() crypt.Write(stage1) innerHash...
[ -0.18884389102458954, -0.038086533546447754, 0.8208969831466675, 1.3387123346328735, -1.00538170337677, 0.041216205805540085, -0.5694302916526794, 0.45413723587989807, 0.6096207499504089, 0.3475725054740906, -0.9539274573326111, 0.4192054569721222, 0.1932496875524521, 0.19829323887825012, ...
func EncryptPasswordWithPublicKey(salt []byte, password []byte, pub *rsa.PublicKey) ([]byte, error) { if len(password) == 0 { return nil, nil } buffer := make([]byte, len(password)+1) copy(buffer, password) for i := range buffer { buffer[i] ^= salt[i%len(salt)] } sha1Hash := sha1.New() enc, err := rsa.Enc...
[ 0.4164741337299347, 0.2098333239555359, 0.3937808573246002, 0.6425774693489075, 0.37567567825317383, 0.7812114953994751, -0.5533390045166016, -0.046165432780981064, 0.30498138070106506, 1.4887787103652954, -0.3278323709964752, -0.5082745552062988, -0.21016721427440643, 1.4454375505447388, ...
func authServerDialogSwitchData() []byte { result := make([]byte, len(mysqlDialogMessage)+2) result[0] = mysqlDialogAskPassword writeNullString(result, 1, mysqlDialogMessage) return result }
[ -1.1651694774627686, 0.21754224598407745, 0.3470449447631836, 0.27290329337120056, -0.36986345052719116, 0.00960506685078144, -0.41689664125442505, -0.5510239601135254, 0.6461775898933411, 0.3366880416870117, -0.7551870942115784, 0.9406896829605103, -0.1704433709383011, 0.3077268898487091,...
func AuthServerReadPacketString(c *Conn) (string, error) { // Read a packet, the password is the payload, as a // zero terminated string. data, err := c.ReadPacket() if err != nil { return "", err } if len(data) == 0 || data[len(data)-1] != 0 { return "", vterrors.Errorf(vtrpc.Code_INTERNAL, "received invalid...
[ -0.24138352274894714, -0.3711318373680115, 0.7501874566078186, -0.6656097769737244, -0.7316305637359619, 0.12482164055109024, -0.8023946285247803, -0.7460892200469971, 0.7285600304603577, 0.03040151298046112, 0.8098328113555908, 0.32547298073768616, -0.06580391526222229, -1.128377318382263...
func AuthServerNegotiateClearOrDialog(c *Conn, method string) (string, error) { switch method { case MysqlClearPassword: // The password is the next packet in plain text. return AuthServerReadPacketString(c) case MysqlDialog: return AuthServerReadPacketString(c) default: return "", vterrors.Errorf(vtrpc.C...
[ 0.05779628828167915, 0.4223323464393616, 0.36831730604171753, -0.777179479598999, -0.8950420022010803, 0.08437610417604446, -0.8994993567466736, -0.6488743424415588, 0.808782696723938, 0.7444872260093689, 0.5708580613136292, 0.6922618746757507, 0.3690832555294037, -0.09780469536781311, 1...
func (i *identity) Write(p []byte) (n int, err error) { i.data = append(i.data, p...) return len(p), nil }
[ -2.1901674270629883, 0.9521597623825073, 0.5752555131912231, 0.0406414233148098, 1.2769489288330078, 0.5397529006004333, -0.3647528886795044, 0.6774773597717285, 0.4852674901485443, 0.3948439955711365, -1.6928410530090332, -0.5845080614089966, -1.3837970495224, -0.06148663908243179, 0.49...
func (i *identity) Sum(b []byte) []byte { return append(b, i.data...) }
[ -1.2812576293945312, 0.3614482581615448, 0.5867248773574829, 0.7496517300605774, 0.669126570224762, 0.9362833499908447, -0.6662189960479736, -0.5142138600349426, 0.5482022166252136, 0.3488205373287201, -1.6742547750473022, 0.318595290184021, -1.2242149114608765, -0.45520254969596863, -0....
func (i *identity) Reset() { i.data = make([]byte, 0) }
[ -0.3979828357696533, 0.2593294382095337, 0.10674600303173065, 0.004393925424665213, 1.3013956546783447, 0.5797171592712402, 0.0470588356256485, -0.3677123486995697, -0.3851422667503357, -0.03690985590219498, -1.10693359375, 0.9461662173271179, -0.8865973949432373, -0.939115047454834, -0....
func (i *identity) Size() int { return len(i.Sum(nil)) }
[ -0.7030026912689209, 0.7406238317489624, 0.34351012110710144, 0.03428880497813225, 0.9819595813751221, 0.3100661635398865, 1.038216471672058, 0.40339383482933044, 0.8906092643737793, -0.28876253962516785, -1.227405309677124, -0.2844858169555664, -0.6897777318954468, -0.1458788812160492, ...
func (i *identity) BlockSize() int { return 0 }
[ -0.5822428464889526, 0.9231572151184082, 0.6684139966964722, 0.9482779502868652, 0.2915358543395996, 0.7616371512413025, 1.131929636001587, -0.20695264637470245, -0.000598374754190445, -0.14063280820846558, -0.38327282667160034, -0.3122127652168274, -1.2467892169952393, 0.5452184677124023,...
func findDuplicates(cfg *duplicate.Config) { if cfg.File == "" { var dup = duplicate.FindAllDuplicates(cfg.Folder) duplicate.PrintAllDuplicates(dup) } else { var ent = duplicate.NewFile(cfg.File) var dup = ent.FindDuplicates(cfg.Folder) duplicate.PrintDuplicates(dup, "") } }
[ 0.23662389814853668, 0.5775355100631714, 0.7803739309310913, 0.3467563986778259, 0.3956882655620575, 0.34557241201400757, 0.6574756503105164, -0.4940631687641144, -0.5472428798675537, 0.041567351669073105, -0.43469375371932983, 0.5142863988876343, -0.18866434693336487, 2.173929452896118, ...
func deleteDuplicates(cfg *duplicate.Config) { if cfg.File == "" { var dup = duplicate.DeleteAllDuplicates(cfg.Folder) duplicate.PrintAllFiles(dup) } else { var ent = duplicate.NewFile(cfg.File) var dup = ent.DeleteDuplicates(cfg.Folder) duplicate.PrintDuplicates(dup, "") } }
[ 0.6000733375549316, 0.23612776398658752, 0.7019883990287781, 0.3684777617454529, 0.45839425921440125, 0.7125637531280518, 0.700063943862915, 0.8205926418304443, 0.16172854602336884, -0.23384492099285126, -0.7559154033660889, 0.7742205262184143, -0.046811673790216446, 1.3031924962997437, ...
func createDuplicates(cfg *duplicate.Config) { if cfg.File == "" { fmt.Println("Please specify the original file path (flag \"-file\")") } else { fmt.Println("Functionality in development") } }
[ 0.6730659604072571, 0.07614751160144806, 0.3958587944507599, 0.2805061638355255, 0.9640675783157349, 1.4229912757873535, 0.7255954146385193, 0.39890187978744507, -0.7757153511047363, -0.220184326171875, -0.036161281168460846, 0.7488207221031189, -0.37735676765441895, 1.2506890296936035, ...
func (obj *grpcTransport) RequestTimeout() int { return int(obj.requestTimeout / time.Second) }
[ -0.3640819787979126, 0.5501453280448914, 0.5584683418273926, 0.31512969732284546, 0.12066663056612015, 0.08631675690412521, 0.018936458975076675, -0.11284732818603516, -0.2548288404941559, -0.33918043971061707, 0.16121123731136322, 0.1601027101278305, -1.0335779190063477, -0.44715046882629...
func (obj *grpcTransport) SetRequestTimeout(value int) GrpcTransport { obj.requestTimeout = time.Duration(value) * time.Second return obj }
[ -0.9190734624862671, 0.43083637952804565, 0.5237699747085571, 0.24677573144435883, -0.014228361658751965, 0.6270853281021118, -0.11579772084951401, -0.413252055644989, -0.08898614346981049, -0.21359005570411682, -0.48740097880363464, -0.354611873626709, -0.7842203974723816, -0.457919895648...
func (obj *httpTransport) Verify() bool { return obj.verify }
[ -0.025335416197776794, -0.05169077590107918, 0.30244380235671997, 0.4315339922904968, 0.02201773039996624, 0.8120525479316711, -0.5386083126068115, -0.372665673494339, -0.2649672329425812, -0.3667071759700775, -1.9575172662734985, 0.1609027087688446, -0.4854046106338501, 0.1207172572612762...
func (obj *httpTransport) SetVerify(value bool) HttpTransport { obj.verify = value return obj }
[ -0.2713150978088379, 0.8163994550704956, 0.33281052112579346, 0.42068248987197876, 0.03552985191345215, 0.8863906860351562, -0.21521210670471191, -0.12981663644313812, -0.6540825963020325, -0.011606905609369278, -2.0241334438323975, -0.4414203464984894, -0.3760017454624176, 0.3205134570598...
func (api *api) NewGrpcTransport() GrpcTransport { api.grpc = &grpcTransport{ location: "localhost:5050", requestTimeout: 10 * time.Second, } api.http = nil return api.grpc }
[ -0.10745090246200562, -0.49134814739227295, 0.37230968475341797, -0.5575788021087646, -0.3963346779346466, 0.09519866108894348, 0.2421669363975525, -0.7713196873664856, -0.42628809809684753, 0.4123222827911377, -1.1458560228347778, 0.3429035246372223, -1.5953614711761475, -0.43250477313995...
func (api *api) hasGrpcTransport() bool { return api.grpc != nil }
[ 0.27944883704185486, -0.01880957931280136, 0.4547275900840759, -0.5860266089439392, 0.7811262607574463, 0.20657284557819366, -0.059908244758844376, -0.49072036147117615, -0.6288038492202759, 0.10533331334590912, -1.3398951292037964, -0.4009822607040405, -0.6839086413383484, 0.0499205254018...
func (api *api) NewHttpTransport() HttpTransport { api.http = &httpTransport{ location: "https://localhost:443", verify: false, } api.grpc = nil return api.http }
[ -0.15592561662197113, -0.43357712030410767, 0.34205928444862366, 0.15626344084739685, -0.0059752133674919605, 0.36883801221847534, 0.07078234851360321, -0.30352580547332764, -0.4098603427410126, -0.16598142683506012, -1.330419898033142, 0.4586755633354187, -0.9410848021507263, -0.089208655...
func (s *SyncStub) SetServerOption(opt *syncOpt) { f := s.srvOptTemplate.SyncMsgPrefilter s.srvOptTemplate = *opt s.srvOptTemplate.SyncMsgPrefilter = f }
[ -0.35323867201805115, 0.2532635033130646, 0.48738422989845276, 0.538732647895813, 0.116775743663311, 0.13754139840602875, 1.1943962574005127, 0.12577782571315765, 0.10149386525154114, 1.079048991203308, -1.397276520729065, 0.7626245617866516, -0.6351505517959595, 1.5823862552642822, -0.0...
func (s *SyncStub) NewStreamHandlerImpl(id *pb.PeerID, _ *pb.StreamStub, _ bool) (pb.StreamHandlerImpl, error) { theOpt := s.srvOptTemplate return newSyncHandler(s.ctx, id, s.localLedger, &theOpt), nil }
[ -0.34361156821250916, -0.006573966704308987, 0.1555202603340149, -0.04401422291994095, -1.5279399156570435, 0.06084039807319641, 0.48628756403923035, -0.039893534034490585, 0.07807067036628723, 1.1549569368362427, -0.5194336771965027, 0.17869879305362701, -0.5934664607048035, 0.47157770395...
func NewPutProductsNameParams() *PutProductsNameParams { return &PutProductsNameParams{ timeout: cr.DefaultTimeout, } }
[ -0.723376989364624, -0.7146735787391663, 0.4612768888473511, -0.6274046301841736, -1.1684916019439697, 0.2208191156387329, 0.13419705629348755, -0.23729556798934937, -0.0644245520234108, 1.6628715991973877, -1.064772129058838, 0.07657726109027863, -0.8533966541290283, -1.1672942638397217, ...
func NewPutProductsNameParamsWithTimeout(timeout time.Duration) *PutProductsNameParams { return &PutProductsNameParams{ timeout: timeout, } }
[ -0.05853220447897911, -0.862975537776947, 0.6362414956092834, -0.5067556500434875, -1.1189687252044678, 0.8207791447639465, -0.8384615778923035, -0.12900492548942566, -0.35269030928611755, 2.1557154655456543, -0.5992785096168518, 0.23372811079025269, -0.5408121943473816, -0.783762335777282...
func NewPutProductsNameParamsWithContext(ctx context.Context) *PutProductsNameParams { return &PutProductsNameParams{ Context: ctx, } }
[ -0.3957368731498718, -0.7236315011978149, 0.8362613320350647, -0.9779311418533325, -0.8837375640869141, 0.6085835695266724, -0.6690745949745178, -1.034926176071167, 0.08436110615730286, 1.5407509803771973, -0.8287113308906555, 0.028754297643899918, -0.5876919627189636, -1.2555091381072998,...
func NewPutProductsNameParamsWithHTTPClient(client *http.Client) *PutProductsNameParams { return &PutProductsNameParams{ HTTPClient: client, } }
[ -0.4461558759212494, -0.8622978925704956, 0.5827405452728271, -0.7688161730766296, -0.7423620223999023, 0.7224208116531372, 0.2135237455368042, -0.20148244500160217, -0.21984274685382843, 1.0524723529815674, -1.021605134010315, -0.04045359417796135, -0.5495002865791321, -0.9542593955993652...
func (o *PutProductsNameParams) WithDefaults() *PutProductsNameParams { o.SetDefaults() return o }
[ -0.32906436920166016, 0.21483314037322998, 0.19408012926578522, -1.0167763233184814, 0.39611032605171204, -0.4638846516609192, -0.3483401834964752, -1.0946261882781982, 0.0236208438873291, 0.7065843343734741, -0.4790152907371521, -1.0328896045684814, -0.6590964198112488, -0.588100016117096...
func (o *PutProductsNameParams) SetDefaults() { // no default values defined for this parameter }
[ -1.0832390785217285, 0.44075921177864075, 0.33777573704719543, -1.092453956604004, 0.5552679896354675, 0.23972943425178528, 0.0778229609131813, -1.0104339122772217, -0.3628963828086853, 0.649088978767395, -0.6060845255851746, -0.07792261242866516, -1.5586222410202026, -0.693113386631012, ...
func (o *PutProductsNameParams) WithTimeout(timeout time.Duration) *PutProductsNameParams { o.SetTimeout(timeout) return o }
[ -0.1950037032365799, -0.19660495221614838, 0.4224961996078491, -0.9604891538619995, -0.7264715433120728, 0.3186004161834717, 0.0037137730978429317, -0.41125887632369995, 0.10021652281284332, 1.9563684463500977, -0.4022885262966156, -0.09351100027561188, -0.145423024892807, -0.4439871311187...
func (o *PutProductsNameParams) SetTimeout(timeout time.Duration) { o.timeout = timeout }
[ -0.8709014654159546, -0.04480490833520889, 0.3686397969722748, -1.100580096244812, -0.23345696926116943, 0.8460714817047119, 0.13207976520061493, -0.11475447565317154, -0.33256933093070984, 2.0018298625946045, -0.26070964336395264, 0.20348292589187622, -0.9669681787490845, -0.5748319625854...
func (o *PutProductsNameParams) WithContext(ctx context.Context) *PutProductsNameParams { o.SetContext(ctx) return o }
[ -0.9839254021644592, 0.033812351524829865, 0.632305920124054, -1.2008205652236938, -0.667038083076477, 0.29673075675964355, -0.17170481383800507, -1.4041796922683716, 0.35248422622680664, 1.414385437965393, -0.5492539405822754, -0.01525735855102539, -0.792182445526123, -0.8836821913719177,...
func (o *PutProductsNameParams) SetContext(ctx context.Context) { o.Context = ctx }
[ -1.4625780582427979, 0.38300028443336487, 0.40606483817100525, -0.9846325516700745, -0.032965078949928284, 0.5795735120773315, 0.08261705935001373, -1.0233582258224487, 0.5023357272148132, 1.3532606363296509, -0.4450235664844513, 0.3724074959754944, -1.3962006568908691, -0.7436479926109314...
func (o *PutProductsNameParams) WithHTTPClient(client *http.Client) *PutProductsNameParams { o.SetHTTPClient(client) return o }
[ -0.5221912860870361, -0.9224439263343811, 0.43420547246932983, -1.3246073722839355, -0.5640602707862854, 0.09774333238601685, 0.46542999148368835, -0.9580128192901611, -0.3465557396411896, 0.6878451108932495, -0.7051430344581604, -0.11994795501232147, 0.0017726522637531161, -0.728799045085...
func (o *PutProductsNameParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client }
[ -0.678850531578064, -0.6004735231399536, 0.33107027411460876, -1.6464998722076416, -0.5480361580848694, 0.17121060192584991, 0.5070573091506958, -0.8855637907981873, -0.7436505556106567, 0.7803019285202026, -0.8477181792259216, 0.32856452465057373, -0.755395770072937, -0.9178609848022461, ...
func (o *PutProductsNameParams) WithName(name string) *PutProductsNameParams { o.SetName(name) return o }
[ -1.3034440279006958, -0.3403298258781433, 0.5093724727630615, -1.0225287675857544, -0.448494017124176, -0.13050100207328796, 0.5129475593566895, -0.9218376874923706, -0.0577065572142601, 2.1899852752685547, -0.6380276679992676, -0.6126582622528076, -0.8037893772125244, -0.6808410286903381,...
func (o *PutProductsNameParams) SetName(name string) { o.Name = name }
[ -1.9337079524993896, -0.5018242001533508, 0.3785255253314972, -0.8478156924247742, -0.38215646147727966, 0.2663114070892334, 0.26493263244628906, -0.8182700276374817, -0.18102945387363434, 2.0858314037323, -0.8791018724441528, -0.2591577470302582, -1.182469129562378, -0.24211730062961578, ...
func (o *PutProductsNameParams) WithProduct(product PutProductsNameBody) *PutProductsNameParams { o.SetProduct(product) return o }
[ -0.8736162781715393, 0.2809925079345703, 0.455135703086853, -0.6742314100265503, -0.3528514504432678, 0.40173396468162537, -0.10163243114948273, -1.1428306102752686, 0.39542514085769653, 0.6451171636581421, -0.86004638671875, -0.566586434841156, -0.46313875913619995, -0.4508955776691437, ...
func (o *PutProductsNameParams) SetProduct(product PutProductsNameBody) { o.Product = product }
[ -1.5503932237625122, 0.08370400965213776, 0.29739436507225037, -0.5317878723144531, -0.22542327642440796, 0.637060284614563, 0.2122282087802887, -1.047169804573059, 0.3990073502063751, 0.9399253726005554, -1.1742887496948242, -0.18744301795959473, -1.006070852279663, -0.32956263422966003, ...
func (o *PutProductsNameParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error // path param name if err := r.SetPathParam("name", o.Name); err != nil { return err } if err := r.SetBodyParam(o.Product); err !...
[ -1.3686652183532715, -0.3170277774333954, 0.8565419912338257, -0.993486225605011, 0.589344322681427, 0.06956417858600616, 0.9488163590431213, -0.5112892985343933, -0.363092839717865, 1.2351861000061035, -0.22422724962234497, 0.09180871397256851, -0.8516654372215271, -0.27415522933006287, ...
func (data *MoveRequest) Bind(r *http.Request) error { return nil }
[ -1.3875842094421387, -0.9008769989013672, 0.4951265752315521, 0.4347606301307678, -0.24118204414844513, 0.5245280861854553, -0.31580349802970886, -0.5194993615150452, -0.14145073294639587, -0.31080323457717896, 0.3012743592262268, 0.45582905411720276, -0.17772656679153442, 0.69324588775634...
func AddGigasecond(t time.Time) time.Time { return t.Add(gigasecond) }
[ 0.09480666369199753, 0.2564759850502014, 0.2544407248497009, -0.016868911683559418, -0.5125800371170044, 0.651081383228302, -1.2127244472503662, -0.7951614856719971, -0.987432062625885, 0.7568069696426392, -0.734538197517395, -0.6000698208808899, -0.3664805591106415, 1.2274061441421509, ...
func NewDSM(username string, password string, host string, port string, tenant string, verifySSL bool) (DSM, error) { dsm := DSM{Host: host, Port: port, Tenant: tenant} if dsm.Host == "" { dsm.Host = dsasHost dsm.Port = dsasPort } dsm.RestURL = fmt.Sprintf("https://%s:%s/rest/", dsm.Host, dsm.Port) dsm.SoapU...
[ -0.020435307174921036, -0.2031906545162201, 0.6458704471588135, 0.25159570574760437, -0.4736153483390808, 0.02558327093720436, -0.6752782464027405, -0.061121005564928055, 0.48244261741638184, -0.7572423815727234, 0.11755792796611786, 0.8075700402259827, -0.02179655060172081, 0.416877985000...