text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (tse *taskSelectorEvaluator) evalSelector(s Selector) ([]string, error) { // keep a slice of results per criterion results := []string{} if len(s) == 0 { return nil, fmt.Errorf("cannot evaluate selector with no criteria") } for i, sc := range s { taskNames, err := tse.evalCriterion(sc) if err != nil { ...
[ -0.7360054850578308, -0.20549890398979187, 0.6924602389335632, -0.12237498164176941, -0.3806802034378052, 0.09727323055267334, -0.10842851549386978, 0.2176457941532135, -0.1748378425836563, 0.7080090641975403, 0.6318378448486328, 0.2983787953853607, 0.1846906989812851, 0.9228996634483337, ...
func (tse *taskSelectorEvaluator) evalCriterion(sc selectCriterion) ([]string, error) { switch { case sc.Validate() != nil: return nil, fmt.Errorf("criterion '%v' is invalid: %v", sc, sc.Validate()) case sc.name == SelectAll: // special "All Tasks" case names := []string{} for _, task := range tse.tasks { ...
[ 0.33313748240470886, -0.852384626865387, 0.8574433326721191, 0.066701240837574, -0.7386024594306946, -0.29066967964172363, -0.2818923890590668, 0.6113508939743042, -0.1490361988544464, 1.163713812828064, 0.14101266860961914, 0.3516448736190796, 0.9016677141189575, 1.1066081523895264, 0.3...
func CreateKubeNamespace(baseName string, kubeClientSet kubernetes.Interface) (*v1.Namespace, error) { ns := &v1.Namespace{ ObjectMeta: metav1.ObjectMeta{ GenerateName: fmt.Sprintf("e2e-tests-%v-", baseName), }, } return kubeClientSet.CoreV1().Namespaces().Create(context.TODO(), ns, metav1.CreateOptions{}) }
[ -0.22030895948410034, -0.5071192383766174, 0.45927152037620544, 0.12677612900733948, -0.1519087851047516, 0.4062398672103882, -0.2211403101682663, -0.6976133584976196, 0.28373727202415466, 0.562980055809021, 0.16392427682876587, -0.07052437961101532, -0.8947135210037231, 0.1130495741963386...
func DeleteKubeNamespace(namespace string, kubeClientSet kubernetes.Interface) error { return kubeClientSet.CoreV1().Namespaces().Delete(context.TODO(), namespace, metav1.DeleteOptions{}) }
[ -0.13964363932609558, -0.15136466920375824, 0.05851660296320915, 0.5265074372291565, -0.5069037079811096, -0.009717202745378017, -0.7632880210876465, -1.1818350553512573, 0.9970649480819702, 0.12667906284332275, 0.14321257174015045, 0.13844923675060272, -1.3803435564041138, 0.5318633317947...
func WaitForKubeNamespaceNotExist(namespace string, kubeClientSet kubernetes.Interface) error { return wait.PollImmediate(Poll, time.Minute*2, namespaceNotExist(kubeClientSet, namespace)) }
[ -0.35407447814941406, -0.262056827545166, 0.1768164038658142, -0.3074389100074768, -0.1401880979537964, 0.6063878536224365, -1.2405962944030762, -1.48441743850708, -0.24584056437015533, -0.2015531361103058, 0.42134398221969604, -0.17447920143604279, -0.9156032800674438, 0.9795921444892883,...
func ExecCmd(client kubernetes.Interface, config *restclient.Config, podName, namespace string, command string) (string, error) { cmd := []string{ "sh", "-c", command, } req := client.CoreV1().RESTClient().Post().Resource("pods").Name(podName). Namespace(namespace).SubResource("exec") option := &v1.PodExe...
[ -0.1669718474149704, -0.46590837836265564, 1.0339604616165161, -0.23204883933067322, -0.379181832075119, 0.4415813982486725, -0.6386094689369202, -0.7439936995506287, 0.12587304413318634, -0.12197799980640411, 0.34892478585243225, 0.8791941404342651, -0.40932223200798035, 0.700208842754364...
func WaitForPodsRunning(kubeClientSet kubernetes.Interface, expectedReplicas int, namespace string, opts metav1.ListOptions) (*v1.PodList, error) { var pods *v1.PodList err := wait.PollImmediate(1*time.Second, time.Minute*5, func() (bool, error) { pl, err := kubeClientSet.CoreV1().Pods(namespace).List(context.TODO(...
[ -1.028067708015442, -0.267680823802948, 0.333454430103302, -0.36578691005706787, -0.7368983626365662, -0.19633617997169495, -0.7974170446395874, 0.06866491585969925, 0.05037492886185646, 0.08583569526672363, -0.48382630944252014, 0.2131192535161972, -0.8398057818412781, -0.7830676436424255...
func WaitForPodsReady(kubeClientSet kubernetes.Interface, expectedReplicas int, namespace string, opts metav1.ListOptions) error { return wait.PollImmediate(1*time.Second, time.Minute*5, func() (bool, error) { pl, err := kubeClientSet.CoreV1().Pods(namespace).List(context.TODO(), opts) if err != nil { return fa...
[ -0.9057191014289856, -0.051659755408763885, 0.406869113445282, -0.5621179938316345, -0.36095818877220154, -0.6413963437080383, -0.7527851462364197, -0.4103938043117523, 0.05064777284860611, 0.057090796530246735, -0.5443564057350159, 0.27580931782722473, -0.2568362355232239, -0.416968822479...
func podRunningReady(p *v1.Pod) (bool, error) { // Check the phase is running. if p.Status.Phase != v1.PodRunning { return false, fmt.Errorf("want pod '%s' on '%s' to be '%v' but was '%v'", p.ObjectMeta.Name, p.Spec.NodeName, v1.PodRunning, p.Status.Phase) } // Check the ready condition is true. if !isPodRea...
[ -1.3927795886993408, -0.35456013679504395, 0.4926390051841736, -0.41851794719696045, -0.13687734305858612, 0.31763988733291626, -0.04046974703669548, 0.4918408989906311, -0.6091428995132446, 0.9190391898155212, -0.3327219784259796, 0.24322238564491272, 0.008974933065474033, -0.324312150478...
func WaitForURL(url string) error { return wait.PollImmediate(2*time.Second, time.Minute*5, func() (bool, error) { req, err := http.NewRequest(http.MethodGet, url, nil) if err != nil { return false, nil } res, err := http.DefaultClient.Do(req) if err != nil { return false, nil } defer res.Body.Clos...
[ -0.320881724357605, 0.2687565088272095, 0.5896885991096497, -0.5850830078125, -0.24888116121292114, 0.6029689908027649, -0.5198183655738831, -0.31250953674316406, -0.4719003438949585, -0.50458824634552, -0.7945379614830017, -0.6597168445587158, -0.30803921818733215, 0.14375333487987518, ...
func ArchiveArchiverPath() string { return "/archive" }
[ 0.15340866148471832, -0.7510889768600464, 0.368583619594574, -0.17271167039871216, -0.551019549369812, 0.25353574752807617, -0.1308254450559616, 0.6704395413398743, -0.27321067452430725, 0.5097150802612305, -0.3077470660209656, 0.38071706891059875, 0.11462704837322235, 0.6747438907623291, ...
func ReadArchiverPath(id int) string { return fmt.Sprintf("/archive/%v", id) }
[ -0.13411082327365875, -0.643647313117981, 0.303860068321228, -0.36406663060188293, -0.43483445048332214, 0.30564427375793457, -0.3732391893863678, -0.027668343856930733, -0.20109902322292328, 0.28447943925857544, 0.8029125928878784, 0.3995642364025116, -0.25650736689567566, 0.1167451962828...
func ValidateEmail(email string) bool { validEmail := regexp.MustCompile(`^[\w.]+@\w+\.\w{2,4}$`) return validEmail.MatchString(email) }
[ -0.6284427642822266, 0.0020339065231382847, 0.43490225076675415, 0.5263293385505676, -0.7674587368965149, 0.5789859890937805, -0.12711404263973236, 0.1490097939968109, -0.5898886322975159, -0.033360324800014496, -0.1001121774315834, -0.0018787980079650879, -0.6727544665336609, -0.711293816...
func ValidatePizza(pizza *types.PizzaPost) (bool, string) { if utf8.RuneCountInString(pizza.Name) < 3 { return false, "Pizza name is empty or to short" } if pizza.Size < 30 || pizza.Size > 60 { return false, "Incorrect pizza size" } if len(pizza.IngredientsIDs) < 3 { return false, "Pizza ingredients length c...
[ -0.19843535125255585, -0.1715938299894333, 0.6862072348594666, -0.1774582713842392, -0.33549681305885315, 0.6662591099739075, -0.34580811858177185, 0.08470944315195084, -0.0927421897649765, 0.377681702375412, -1.2469873428344727, -0.39406001567840576, -0.5429788827896118, 0.678136467933654...
func EscapeHTMLFromPizza(pizza *types.PizzaPost) { // a value from pointers will be extracted automatically by Go compiler pizza.Name = html.EscapeString(pizza.Name) pizza.Description = html.EscapeString(pizza.Description) }
[ 0.39938363432884216, 0.25445908308029175, 0.19561415910720825, 0.7469903230667114, -0.8151093125343323, 0.3685668110847473, -0.5449249744415283, 0.20173639059066772, -0.8637848496437073, 0.1930220127105713, -0.9677578806877136, -0.328294575214386, -0.6345720887184143, 0.8188397288322449, ...
func Authenticate(authenticator *auth.Authenticator) web.Middleware { // This is the actual middleware function to be executed. f := func(after web.Handler) web.Handler { // Wrap this handler around the next one provided. h := func(ctx context.Context, w http.ResponseWriter, r *http.Request) error { ctx, spa...
[ 0.0767919197678566, 0.32392892241477966, 0.6324465274810791, 0.6679605841636658, -0.7511598467826843, -0.5484212040901184, -0.21634936332702637, -0.5990796685218811, 0.5995252728462219, -0.2183491736650467, 0.44219428300857544, 0.29454517364501953, 0.29029545187950134, 0.1150398701429367, ...
func HasRole(roles ...string) web.Middleware { // This is the actual middleware function to be executed. f := func(after web.Handler) web.Handler { h := func(ctx context.Context, w http.ResponseWriter, r *http.Request) error { ctx, span := trace.StartSpan(ctx, "internal.mid.HasRole") defer span.End() cl...
[ 0.4473397135734558, 0.6978325247764587, 0.6821267008781433, 0.6327444911003113, -0.1809990406036377, 0.11970017105340958, -0.2598949670791626, -0.49930283427238464, 0.2642228901386261, -0.1760808229446411, 1.1102643013000488, -0.29385802149772644, -0.09198813885450363, -0.2850953936576843,...
func newEtcdv3Backend(logger *log.Logger) *etcdv3 { var c *clientv3.Client cfg := clientv3.Config{ Endpoints: []string{"http://127.0.0.1:2379"}, DialTimeout: 5 * time.Second, } retries := 0 timeToWait := minTimeToWait for { if timeToWait > maxTimeToWait { timeToWait = minTimeToWait } cli, err := cl...
[ 0.3639727830886841, 0.046095166355371475, 0.5088877081871033, -0.6831598281860352, -0.1967650204896927, 0.4010523557662964, -1.0525177717208862, -0.3939911425113678, -0.22286202013492584, 0.8224806785583496, 0.3627612590789795, 0.47664427757263184, -0.9415369629859924, -0.608673095703125, ...
func decompactPacket(packet []byte, sourceAddr *Addr) *Packet { var header [12]byte copy(header[:], packet[0:12]) var payload = make([]byte, 524) if len(packet) > 12 { copy(payload, packet[12:]) } return &Packet{ header: decompactHeader(&header), payload: payload[:len(packet)-12], sourceAddr: sou...
[ -0.04778894782066345, 0.6949355006217957, 0.520309567451477, -1.4044430255889893, -0.6131542921066284, -0.7277371287345886, -0.5527375340461731, 0.6312949061393738, 0.5835617184638977, -0.34322261810302734, -0.32299506664276123, 0.08720296621322632, -0.35794445872306824, -0.231545612215995...
func (p *Packet) compact() []byte { var packet [524]byte header := p.header.compact() copy(packet[:], append(header[:], p.payload[:]...)) return packet[:12+len(p.payload)] }
[ 0.6311827898025513, -0.08193205296993256, 0.5772314071655273, -1.3332310914993286, -0.976517379283905, 0.47695192694664, -0.7496747374534607, -1.314349889755249, 0.045654650777578354, -0.3932376503944397, 0.30561208724975586, 0.7342841625213623, -0.390715092420578, -0.16032682359218597, ...
func NewAuthInterceptor( jwtToken string, authMethods map[string]bool, ) (*AuthInterceptor, error) { interceptor := &AuthInterceptor{ authMethods: authMethods, accessToken: jwtToken, } log.Printf("Inside Client AuthIntercept") return interceptor, nil }
[ -0.47926968336105347, -0.38216206431388855, 0.25319424271583557, -0.8503100275993347, -1.604067087173462, -0.15126676857471466, -0.6827257871627808, -0.03621518984436989, 0.06684605032205582, 0.13674284517765045, -0.3508928418159485, 0.10141406953334808, -0.9057900309562683, -0.38913366198...
func (interceptor *AuthInterceptor) Unary() grpc.UnaryClientInterceptor { return func( ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption, ) error { log.Printf("--> unary interceptor: %s", method) if interceptor.authMeth...
[ -0.06964819878339767, 0.020574526861310005, 0.7595099806785583, -0.826071560382843, -0.15763668715953827, -0.5667408108711243, -0.4059371054172516, -0.07027170807123184, 0.8458712697029114, -0.7063172459602356, 0.9968298077583313, 0.735293984413147, -0.19486168026924133, -0.511392176151275...
func NewConfig(stdout, stderr io.Writer) (*Config, error) { var aliases settingAliases if err := envconfig.Process("plugin", &aliases); err != nil { return nil, err } if err := envconfig.Process("", &aliases); err != nil { return nil, err } cfg := Config{ Command: aliases.Command, AddRepos: ...
[ 0.14296689629554749, -0.4883144199848175, 0.7256113290786743, 0.21599480509757996, 0.09562535583972931, -0.6130629777908325, 0.29745420813560486, -0.21851807832717896, -0.6637435555458069, 0.3666217625141144, -0.012434670701622963, 0.5456095337867737, 0.7981411814689636, 1.012226939201355,...
func New() *Provider { return &Provider{ config: &oauth2.Config{ ClientID: os.Getenv("TWITCH_KEY"), ClientSecret: os.Getenv("TWITCH_SECRET"), Endpoint: oauth2.Endpoint{ AuthURL: "https://api.twitch.tv/kraken/oauth2/authorize", TokenURL: "https://api.twitch.tv/kraken/oauth2/token", }, Redi...
[ 0.18491867184638977, -0.5469813346862793, 0.20533104240894318, 0.03651944920420647, -1.0658938884735107, -0.2487187534570694, -1.0685455799102783, 0.024208107963204384, 0.12276089191436768, 0.7046404480934143, 0.045523498207330704, 1.5049959421157837, 0.4038964509963989, 0.2731349170207977...
func (p *Provider) BuildAuthURL(state string) string { return p.config.AuthCodeURL(state, oauth2.AccessTypeOffline) }
[ -1.3081152439117432, -0.9626868367195129, 0.27742305397987366, 0.9597598314285278, -0.2750234305858612, 0.6368148326873779, 0.05242118611931801, 0.9395707249641418, 0.545875072479248, 0.5300545692443848, 0.08282575756311417, 0.7982856035232544, 0.7051410675048828, -0.24983714520931244, 0...
func (p *Provider) GetCodeURL(r *http.Request) string { return r.URL.Query().Get("code") }
[ -0.8391143679618835, 0.6967291831970215, 0.6213074922561646, 0.7480496764183044, 0.8007145524024963, 0.2558441758155823, -0.4814453721046448, 0.19475769996643066, 0.2746826410293579, 0.655393123626709, 0.7038333415985107, 0.3527885675430298, -0.16557776927947998, 0.6326291561126709, -0.6...
func (p *Provider) GetToken(code string) (*oauth2.Token, error) { tok, err := p.config.Exchange(oauth2.NoContext, code) return tok, err }
[ -1.3185566663742065, 1.1128990650177002, 0.32416823506355286, 0.17972438037395477, 0.09070131927728653, -0.5937873721122742, 0.5818940997123718, 0.29604649543762207, 1.1788431406021118, 0.04586971551179886, -0.33502840995788574, 1.4629677534103394, 0.20834000408649445, 0.0385235920548439, ...
func (p *Provider) GetIdentity(tok *oauth2.Token) (*id.User, error) { client := p.config.Client(oauth2.NoContext, tok) // Twitch doesn't follow the Oauth2 spec correctly. The // spec states that the access token should be passed // as a `Bearer` token, but Twitch wants an `Oauth` // token, so we must include this...
[ -0.48925402760505676, 0.09117074310779572, 0.767719566822052, 0.40412914752960205, 0.6398026347160339, -0.019425833597779274, -0.47971227765083313, -0.5314757227897644, 0.9319371581077576, 0.1196676567196846, -0.24259434640407562, 1.4132617712020874, -0.5937729477882385, -0.165009006857872...
func readBody(r io.Reader) *id.User { user := struct { ID string `json:"id"` Email string `json:"email"` Name string `json:"name"` }{} err := json.NewDecoder(r).Decode(&user) if err != nil { panic(err) } return &id.User{ Name: user.Name, Email: user.Email, ID: user.ID, } }
[ -0.9672201871871948, -0.6595968008041382, 0.6413998007774353, -0.1981595754623413, -0.6519875526428223, 0.15203820168972015, -0.93084716796875, -1.2539507150650024, 0.4521690905094147, -0.06222199648618698, -0.9624871611595154, -0.1598658263683319, -0.49796655774116516, -0.4412987232208252...
func isExcludedDisruptionBackend(name string) bool { excludedNames := []string{ "ci-cluster-network-liveness", "kube-api-http1-external-lb", "kube-api-http2-external-lb", "openshift-api-http2-external-lb", "host-to-service", "host-to-host", "host-to-pod", "pod-to-host", "pod-to-pod", "pod-to-servic...
[ 0.3153000771999359, 0.27557373046875, 0.4282165467739105, 0.47255632281303406, -0.8114094734191895, 0.7045901417732239, -0.3704068958759308, -0.31602466106414795, 0.17681051790714264, 0.4696268141269684, -0.7353386878967285, -0.3820579946041107, -1.2665934562683105, 0.7795336246490479, 0...
func getDisruptionByJobRunID(ctx context.Context, finishedJobsToAggregate []jobrunaggregatorapi.JobRunInfo) (map[string]map[string]jobrunaggregatorlib.AvailabilityResult, error) { jobRunIDToBackendNameToAvailabilityResult := map[string]map[string]jobrunaggregatorlib.AvailabilityResult{} errs := []error{} for i := r...
[ -0.5576103925704956, -0.7736659646034241, 0.6955441236495972, -0.6313629150390625, 0.12012592703104019, -0.14714516699314117, 0.2439955174922943, -0.243338480591774, -0.523356020450592, 0.3869185447692871, -0.08619512617588043, 0.09274131804704666, -0.6850543022155762, 1.0579272508621216, ...
func getDisruptionForBackend(jobRunIDToBackendNameToAvailabilityResult map[string]map[string]jobrunaggregatorlib.AvailabilityResult, backend string) map[string]jobrunaggregatorlib.AvailabilityResult { jobRunIDToAvailabilityResultForBackend := map[string]jobrunaggregatorlib.AvailabilityResult{} for jobRunID := range j...
[ -0.08964931219816208, -0.8396727442741394, 0.5135225653648376, -0.6493401527404785, -0.13175465166568756, -0.32707661390304565, -0.14008480310440063, 0.5663560628890991, -0.6801034808158875, 0.6305582523345947, -0.25019940733909607, 0.12778286635875702, -0.47013047337532043, 0.641436398029...
func (s *UserService) ResetPasswordInit(req *requests.ResetPasswordInit) *response.Base { //validate user input if err := req.Validate(); err != nil { return &response.Base{ Code: http.StatusBadRequest, Error: err, Message: "", } } //check if user exists user, err := s.dao.Find(req.Identifier) i...
[ -0.6678056120872498, -0.17430531978607178, 0.9990448355674744, -0.03531965985894203, -0.1353997439146042, -0.15352781116962433, 0.34933650493621826, -0.2390594631433487, 0.011252295225858688, 0.6618877649307251, -0.5705697536468506, 0.7728128433227539, -0.4400548040866852, 0.15038262307643...
func MapAmount(amount int64, sourceDecimals, destinationDecimals int64) *big.Int { bigIntAmount := big.NewInt(amount) wavesDecimals := big.NewInt(10) wavesDecimals.Exp(wavesDecimals, big.NewInt(sourceDecimals), nil) ethDecimals := big.NewInt(10) ethDecimals.Exp(ethDecimals, big.NewInt(destinationDecimals), nil) ...
[ 0.008700143545866013, 0.2839677035808563, 0.7866327166557312, -1.0881816148757935, -1.040117621421814, 0.3176601827144623, 0.37501686811447144, 0.07317403703927994, 0.7253928780555725, 0.29438817501068115, -0.19622167944908142, 0.003684862982481718, 0.729812502861023, -0.2025490254163742, ...
func (provider *WavesToEthereumExtractionBridge) ExtractDirectTransferRequest(ctx context.Context) (*extractors.Data, error) { states, _, err := provider.wavesHelper.StateByAddress(provider.config.LUPortAddress, ctx) if err != nil { return nil, err } luState := ParseState(states) rq, rqInt, _ := provider.pickR...
[ -0.535824179649353, -0.36711838841438293, 0.8345876336097717, -1.0052181482315063, -0.5964677929878235, 0.031768690794706345, 0.07716778665781021, -0.5785417556762695, 0.45522135496139526, 0.2796986699104309, -0.1487022489309311, -0.06997384876012802, 0.004993845243006945, 0.80218726396560...
func GetCPUUsage(pid int) int { up, err := ioutil.ReadFile("/proc/uptime") if err != nil { log.Fatal("Unable to read /proc/uptime: ", err) return -1 } stat, err := ioutil.ReadFile(fmt.Sprintf("/proc/%v/stat", pid)) if err != nil { log.Fatal("Unable to read /proc: ", err) return -1 } parts := strings.Spli...
[ -0.4555681347846985, 0.04264533892273903, 0.8379558324813843, -0.7078116536140442, -0.20496267080307007, -0.9603316187858582, 0.5225797891616821, 0.18625833094120026, -0.8140108585357666, 0.5503813624382019, 0.19963538646697998, 0.39884650707244873, -0.8382031321525574, 0.995318591594696, ...
func GetMemoryUsage(pid int) int { stat, err := ioutil.ReadFile(fmt.Sprintf("/proc/%v/status", pid)) if err != nil { log.Fatal("Unable to read /proc: ", err) return -1 } var res int for _, s := range strings.Split(string(stat), "\n") { if s == "" { continue } i := strings.Index(s, "VmRSS") if i > -1...
[ 0.40507614612579346, -0.5582714080810547, 1.0008032321929932, -1.1761435270309448, -0.0731237605214119, -1.2385555505752563, 0.09644841402769089, 0.275953471660614, -0.11735469847917557, 0.514992892742157, 0.33001115918159485, 0.5981719493865967, -0.9348680973052979, 1.3999223709106445, ...
func GetContainerMetric(pid int, containerID string) (ContainerMetric, error) { var metric ContainerMetric // hack: split on -n and -f to get container id //c := exec.Command("lxc-ps", "-n", containerID, "--", "o", "pid") c := exec.Command("ps", "-eo", "ppid,pid", "--no-headers") var cOut bytes.Buffer c.Stdout = ...
[ 0.557827889919281, 0.03139103576540947, 0.7782500386238098, -0.44153425097465515, -0.23743374645709991, 0.06392104178667068, -0.21358750760555267, -0.5365983843803406, -0.8844577670097351, 0.18517321348190308, 0.5410512685775757, 0.11723820120096207, -0.20075777173042297, 0.803401410579681...
func remotePortForward(expose string, kubeconfig string, namespace string, target string, remoteIP string, debug bool) (err error) { log.Info().Msgf("remote %s forward to local %s", remoteIP, expose) localSSHPort, err := strconv.Atoi(util.GetRandomSSHPort(remoteIP)) if err != nil { return } portforward := kubect...
[ 0.5418055057525635, -0.106721892952919, 0.7437977194786072, -0.7334709763526917, -0.10628996789455414, 0.7835032939910889, -0.44826704263687134, 0.05616682022809982, -0.18082550168037415, -0.028112215921282768, 0.016868866980075836, 1.0392698049545288, -0.14737018942832947, -0.280983507633...
func TestFileWriterMultiGoroutine(t *testing.T) { err := NewFileWriter("/tmp", false) defer func() { Close() // clean logs _, err = exec.Command("/bin/sh", "-c", "/bin/rm /tmp/*.log*").Output() if nil != err { t.Errorf("clean files failed. err: %s", err.Error()) } }() temp := T{123, "test"} if nil !...
[ -0.1377028375864029, -0.05403166636824608, 0.885903537273407, -0.14287346601486206, 0.4371749758720398, -0.009531785733997822, 0.9415405988693237, -0.03619060292840004, -0.8454089760780334, 0.104197196662426, 0.007791888900101185, -0.19621415436267853, 0.620418131351471, 1.2280255556106567...
func TestFileWriterTimeBaseLogrotate(t *testing.T) { err := NewFileWriter("/tmp", true) defer func() { Close() // clean logs _, err = exec.Command("/bin/sh", "-c", "/bin/rm /tmp/*.log*").Output() if nil != err { t.Errorf("clean files failed. err: %s", err.Error()) } }() SetRetentions(1) // check if...
[ 0.43136635422706604, -0.2918145954608917, 0.9891507625579834, 0.07925068587064743, 0.7863516807556152, 0.37173786759376526, 0.2804863452911377, -0.6333521008491516, -0.45812276005744934, 0.3816007673740387, -0.3196917176246643, -0.7805987596511841, -0.17771853506565094, 0.1136547401547432,...
func NewGCloudDNS(cfg GCloudDNSConfig) *GCloudDNS { ctx := context.Background() svc, err := gdns.NewService(ctx) if err != nil { klog.Fatalf("failed to create gcloud DNS client") } return &GCloudDNS{ GCloudDNSConfig: cfg, svc: svc, } }
[ 0.3560149669647217, 0.842849850654602, 0.19739727675914764, -0.2785203754901886, 0.07042578607797623, 0.5899849534034729, -0.4077106714248657, -1.5962722301483154, 0.24578922986984253, -0.14126628637313843, -0.8583315014839172, 1.0171067714691162, -0.3574998378753662, 0.16238410770893097, ...
func (r *GCloudDNS) GroupFlags() []string { return []string{""} }
[ 0.08361025154590607, 1.042595624923706, 0.3426937162876129, -0.26130545139312744, 1.1647475957870483, 0.6677544713020325, -0.21748508512973785, -0.703594446182251, -0.2495010644197464, -0.8347399830818176, -1.0515191555023193, 0.5560960173606873, -1.0022588968276978, 0.9922211170196533, ...
func (r *GCloudDNS) RemoteZone() (Zone, error) { return zoneFromGCloudDNS(r.svc, r.Project, r.ZoneID) }
[ 0.7038351893424988, 0.06209997832775116, 0.07524517178535461, -0.041135024279356, 0.02120588719844818, 0.5529941320419312, 0.09001036733388901, -0.6086997985839844, 1.0519626140594482, -0.14364491403102875, -0.8904374837875366, 1.051010012626648, -0.8709086179733276, -0.37152811884880066, ...
func (r *GCloudDNS) UpdateZone(wanted, unwanted, desired, remote Zone) error { var err error change := gdns.Change{} // FIX(tcm): This relies on the SOA being the last entry in the wanted and unwanted // zones. for key, recs := range (Zone{unwanted[len(unwanted)-1]}).Group([]string{}) { rs, err := recordToGDNS...
[ -0.4158468544483185, 0.2540614902973175, 0.883807897567749, -0.527606725692749, 0.43740344047546387, -0.1538476198911667, 0.3522867262363434, 0.14932052791118622, -0.04563911631703377, 0.8819584250450134, -0.004695375449955463, 0.7561529278755188, -0.29567137360572815, 0.42688003182411194,...
func Execute(args []string) { args = args[1:] if len(args) == 0 { showHelp() os.Exit(0) } master := args[0] switch master { case "-h": showHelp() os.Exit(0) case "help": if len(args) == 1 { showHelp() os.Exit(0) } cmdName := args[1] cmd := getCmd(cmdName) cmd.ShowHelp() os.Exit(0) ...
[ -0.089148610830307, 0.03527490049600601, 1.211459755897522, 0.7580431699752808, 0.5874820351600647, 0.7924377918243408, -0.3861909508705139, 0.2955881655216217, -1.2563223838806152, 0.6835125684738159, -0.0499461330473423, 0.28380832076072693, -0.5755864977836609, 0.5879915952682495, 0.2...
func init() { viper.SetDefault("attestation-type", constants.DefaultAttestationType) viper.SetDefault("poll-interval-minutes", constants.PollingIntervalMinutes) //Set default values for TLS viper.SetDefault("tls-cert-file", constants.DefaultTLSCertFile) viper.SetDefault("tls-key-file", constants.DefaultTLSKeyFile...
[ 0.43022146821022034, -0.0752541571855545, 0.5336138010025024, -0.08835671842098236, 1.203528642654419, 0.4211612045764923, -0.5392610430717468, 0.031579144299030304, -0.3699033558368683, 0.85855633020401, -0.8082465529441833, 0.23877552151679993, -0.20618444681167603, 0.45730069279670715, ...
func (p *Note) Close() {}
[ -0.27405670285224915, -0.5049639940261841, 0.3911190927028656, -0.19582462310791016, -0.33652791380882263, 1.8270256519317627, 0.7185906171798706, -0.44753390550613403, -0.6263458728790283, -0.7589146494865417, 0.49065905809402466, 0.45792293548583984, -1.4343700408935547, 0.68967664241790...
func (p *Note) Announcement(mt, msg, buid string, out interface{}) error { ctx, cancel := context.WithTimeout(context.Background(), p.Timeout) defer cancel() return p.client.Do(p.announce(ctx, mt, msg, buid, 1), out) }
[ -0.35187679529190063, 0.19529514014720917, 0.4448753595352173, 0.418734610080719, -0.24878545105457306, 0.230596125125885, 0.4350700080394745, 0.2705734074115753, -0.5672398209571838, 0.1613905429840088, 0.6464950442314148, 0.6889281868934631, -0.9265479445457458, 0.6917609572410583, 0.0...
func (p *Note) Notification(mt, msg, buid string, out interface{}) error { ctx, cancel := context.WithTimeout(context.Background(), p.Timeout) defer cancel() return p.client.Do(p.note(ctx, mt, msg, buid), out) }
[ -0.19264431297779083, 0.16718927025794983, 0.1650359332561493, 0.7794064879417419, -0.0006575433653779328, 0.1501310020685196, 0.3335898220539093, -0.0417170487344265, -0.18623033165931702, 0.7467814087867737, 0.02766423672437668, 0.023034706711769104, -0.45603471994400024, -0.130371734499...
func NewHandler(k keeper.Keeper) sdk.Handler { msgServer := keeper.NewMsgServerImpl(k) return func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { ctx = ctx.WithEventManager(sdk.NewEventManager()) switch msg := msg.(type) { case *types.MsgCreateRelationship: res, err := msgServer.CreateRelationship(sd...
[ -0.3053412139415741, 0.20260471105575562, 0.8403148651123047, 0.41832947731018066, -0.32231783866882324, 0.16747082769870758, 0.6085068583488464, -1.0086747407913208, 0.5548463463783264, -0.31695181131362915, 0.9235813617706299, -0.10717988759279251, -0.3112353980541229, 0.3830539882183075...
func (s *StaticDataElement) Time() time.Time { return time.Unix(s.UnixTime, 0) }
[ -0.27983972430229187, 0.4635569155216217, 0.2604087293148041, 0.388728529214859, 0.6058288812637329, 0.6577273011207581, -0.5501863956451416, 0.047240275889635086, 0.3199773132801056, -0.60640949010849, -0.7428175210952759, 0.0549316443502903, 0.6919263601303101, 0.6736761331558228, -0.2...
func (s *StaticDataElement) ServeHTTP(w http.ResponseWriter, r *http.Request) { switch r.Method { case "GET": fallthrough case "HEAD": w.Header().Set("Last-Modified", s.Time().UTC().Format(http.TimeFormat)) if ims := r.Header.Get("If-Modified-Since"); ims != "" { if t, e := time.Parse(http.TimeFormat, ims);...
[ -0.4584489166736603, 0.16933199763298035, 0.5783736705780029, 0.2657245397567749, -0.24630899727344513, 0.29728084802627563, 0.02832120843231678, -0.6230606436729431, -0.2976248264312744, 0.38673684000968933, 0.5481950044631958, 0.2871513068675995, 0.31927043199539185, 0.8001760244369507, ...
func (t *Terminal) AddUserSession(username, session string, server *Server) { t.Lock() defer t.Unlock() // check if it's exists, if not go and lazy initialize a new user instance var user *User var ok bool user, ok = t.Users[username] if !ok { user = NewUser(username) } user.AddSession(session, server) t....
[ -0.9086344838142395, -0.5899749398231506, 0.5261686444282532, 0.13135407865047455, -0.6836133599281311, 0.16035810112953186, 0.14766745269298553, -0.6525415182113647, 0.8700156211853027, -0.11655142903327942, -1.0808796882629395, 0.15637508034706116, -0.31517213582992554, -0.14247092604637...
func (t *Terminal) DeleteUserSession(username, session string) { t.Lock() defer t.Unlock() user, ok := t.Users[username] if !ok { return // nothing to do } user.DeleteSession(session) if len(user.Sessions) == 0 { delete(t.Users, username) } }
[ -0.20712104439735413, -0.7249925136566162, 0.2468603551387787, 0.43669620156288147, -1.0006484985351562, -0.2491062879562378, 0.5393620729446411, -0.6816400289535522, 1.1319706439971924, -0.10065043717622757, -0.6745415925979614, 0.08490730077028275, -0.1093563511967659, 0.0042191380634903...
func (t *Terminal) RenameUserSession(username, oldName, newName string) error { t.Lock() defer t.Unlock() user, ok := t.Users[username] if !ok { return errors.New("username not available") } user.RenameSession(oldName, newName) t.Users[username] = user return nil }
[ -0.5671035051345825, -1.2374835014343262, 0.23397308588027954, 0.5066035389900208, -1.4601986408233643, 0.04833357781171799, 0.3773892819881439, -0.5705806612968445, 0.4734523594379425, 1.069610834121704, -0.8786737322807312, 0.9662147164344788, 0.6037850975990295, -0.2951207160949707, -...
func (t *Terminal) KillSession(r *kite.Request) (interface{}, error) { var params struct { Session string } if r.Args.One().Unmarshal(&params) != nil { return nil, errors.New("{ session: [string] }") } if params.Session == "" { return nil, errors.New("session is empty") } if err := killSession(params.Se...
[ -1.228792428970337, -0.8047831654548645, 0.7127204537391663, 0.6726438999176025, 0.05935481935739517, 0.13815537095069885, 0.3869677484035492, -0.8611667156219482, 0.6902999877929688, 0.7978552579879761, -0.06564953923225403, -0.15348921716213226, 0.006839395966380835, 0.09223943203687668,...
func (t *Terminal) KillSessions(r *kite.Request) (interface{}, error) { user, err := user.Current() if err != nil { return nil, fmt.Errorf("Could not get user: %s", err) } if err := killSessions(user.Username); err != nil { return nil, err } return true, nil }
[ -1.0065535306930542, -0.39245370030403137, 0.5802821516990662, 0.6849620342254639, -0.1450374275445938, 0.1906619817018509, 0.6717163920402527, -1.4261115789413452, 0.3250633180141449, 0.8156852722167969, 0.051972895860672, -0.7848299741744995, -0.538580596446991, -0.07293727248907089, 0...
func (t *Terminal) RenameSession(r *kite.Request) (interface{}, error) { var params struct { OldName string `json:"oldName"` NewName string `json:"newName"` } if r.Args.One().Unmarshal(&params) != nil { return nil, errors.New("{ oldName: [string] newName: [string] }") } if params.OldName == "" { return n...
[ -1.1377907991409302, -1.0929079055786133, 0.8390064835548401, 0.19206658005714417, -0.46014949679374695, -0.43742477893829346, -0.0002842635731212795, -1.3296597003936768, 0.6228654384613037, 1.1943491697311401, -0.2673957347869873, 0.6467745900154114, 0.07322778552770615, 0.17283380031585...
func (t *Terminal) GetSessions(r *kite.Request) (interface{}, error) { user, err := user.Current() if err != nil { return nil, fmt.Errorf("Could not get user: %s", err) } sessions := screenSessions(user.Username) if len(sessions) == 0 { return nil, errors.New("no sessions available") } return sessions, nil...
[ -1.1573212146759033, 0.06623882800340652, 0.5947496891021729, 0.9350179433822632, 0.13865771889686584, -0.5432148575782776, 0.00034914069692604244, -2.1746253967285156, 0.5975140929222107, 0.17533625662326813, 0.41390272974967957, 0.150261789560318, -0.6939171552658081, 1.0679763555526733,...
func (t *Terminal) Connect(r *kite.Request) (interface{}, error) { var params struct { Remote Remote Session string SizeX, SizeY int Mode string } if err := r.Args.One().Unmarshal(&params); err != nil { return nil, fmt.Errorf("{ remote: [object], session: %s, noScreen: [bool] }, err: %s...
[ -0.617202877998352, -0.6225293874740601, 1.0324757099151611, -0.009327382780611515, -0.19570909440517426, 0.2498379647731781, -0.2582694888114929, -1.4985089302062988, -0.2552107870578766, 0.7587828636169434, 0.03503557667136192, 0.44876766204833984, 0.30974480509757996, 0.5850715041160583...
func (t *Terminal) CloseSessions(username string) { t.Log.Info("Closing terminal sessions of user '%s'", username) t.Lock() user, ok := t.Users[username] t.Unlock() if !ok { return } user.CloseSessions() t.Lock() delete(t.Users, username) t.Unlock() }
[ -0.6778064966201782, -0.8551003932952881, 0.17165030539035797, -0.03780310973525047, -1.117990493774414, 0.2788811922073364, 1.2158622741699219, -1.3083747625350952, 0.672275722026825, 0.1432361751794815, -0.0511416420340538, -0.12255465239286423, -0.7774983048439026, -0.04392435774207115,...
func (a *FileStorage) Exists() bool { return a._exists }
[ -0.9028817415237427, -1.021558165550232, 0.10310216248035431, -0.6177250146865845, 0.8852701783180237, -0.3996260464191437, -0.3890397250652313, 0.03769885003566742, -0.16797997057437897, -0.7001816630363464, 0.11864375323057175, -0.44326311349868774, 0.5871663689613342, 0.3431350588798523...
func (u *__FileStorage_Selector) OrderBy_Extension_Desc() *__FileStorage_Selector { u.orderBy = append(u.orderBy, " extension DESC") return u }
[ 1.0469156503677368, -0.14749278128147125, 0.6430544257164001, 0.8741336464881897, 0.20996145904064178, 0.06869655102491379, -0.03071356564760208, -0.1288946121931076, -0.1490241438150406, -0.3736577332019806, 0.1383378803730011, 0.05324447154998779, 0.6268309950828552, -0.03898445144295692...
func (u *__FileStorage_Selector) OrderBy_FirstFileRefId_Desc() *__FileStorage_Selector { u.orderBy = append(u.orderBy, " first_file_ref_id DESC") return u }
[ 1.0346859693527222, -0.7453658580780029, 0.39408811926841736, -0.33562707901000977, 1.2975512742996216, -0.2521043121814728, -0.047214388847351074, -0.24130110442638397, -0.5940088033676147, -0.6768147945404053, 0.7669951319694519, -0.06071479991078377, 0.3196319341659546, 1.34962248802185...
func (u *__FileStorage_Selector) OrderBy_Height_Desc() *__FileStorage_Selector { u.orderBy = append(u.orderBy, " height DESC") return u }
[ 1.2101126909255981, -0.05338619276881218, 0.8452642560005188, 1.1078310012817383, 0.8172552585601807, 0.445182740688324, 0.4549057185649872, -0.3370702564716339, -1.0786705017089844, -0.4658876955509186, -0.08840526640415192, 0.05417921021580696, 0.565711259841919, 0.33687520027160645, -...
func (u *__FileStorage_Selector) OrderBy_Length_Desc() *__FileStorage_Selector { u.orderBy = append(u.orderBy, " length DESC") return u }
[ 1.2382675409317017, 0.06867019087076187, 0.6717175245285034, -0.28251537680625916, 0.4779709577560425, 0.509178102016449, 0.1293555647134781, 0.05085919052362442, -0.2933984398841858, -0.3755623996257782, -0.30699869990348816, -0.14798204600811005, 0.6375148296356201, 0.3861161768436432, ...
func (u *__FileStorage_Selector) OrderBy_Md5Key_Desc() *__FileStorage_Selector { u.orderBy = append(u.orderBy, " md5_key DESC") return u }
[ 0.2448486089706421, 0.007670279126614332, 0.35999685525894165, 0.4740504026412964, -0.43350645899772644, -0.4156478941440582, 0.21825113892555237, -0.3019930124282837, -0.8599011898040771, 0.7024415135383606, 0.21278877556324005, -0.20009471476078033, -0.0020471359603106976, 0.229617178440...
func (u *__FileStorage_Selector) OrderBy_MimeType_Desc() *__FileStorage_Selector { u.orderBy = append(u.orderBy, " mime_type DESC") return u }
[ 0.7698376178741455, -0.4046306908130646, 0.6187950372695923, 0.10471734404563904, 0.2795085310935974, 0.29786333441734314, 0.038888294249773026, 0.318767786026001, -0.4233047068119049, 0.2845887243747711, -0.24325354397296906, 0.14388129115104675, -0.4986909329891205, -0.185074120759964, ...
func (u *__FileStorage_Selector) OrderBy_UserId_Desc() *__FileStorage_Selector { u.orderBy = append(u.orderBy, " user_id DESC") return u }
[ 0.6350057721138, -0.5994109511375427, 0.4749218225479126, 0.9526705741882324, 0.5314819812774658, 0.36187493801116943, 0.12838952243328094, -0.18465380370616913, -0.6660735607147217, -0.29969877004623413, 0.3166835904121399, 0.25588396191596985, 0.44360318779945374, 0.4306957721710205, -...
func (u *__FileStorage_Selector) OrderBy_Width_Desc() *__FileStorage_Selector { u.orderBy = append(u.orderBy, " width DESC") return u }
[ 0.6949621438980103, -0.1850816309452057, 0.6692370176315308, 0.20988434553146362, 0.3588549792766571, 0.10221954435110092, 0.42171168327331543, -0.4978782534599304, 0.08230970799922943, -0.4545738101005554, 0.4850797951221466, -0.5437010526657104, 0.37691372632980347, 0.9005656838417053, ...
func (u *__FileStorage_Selector) OrderBy_Zdata_Desc() *__FileStorage_Selector { u.orderBy = append(u.orderBy, " zdata DESC") return u }
[ 0.23723933100700378, -0.12220509350299835, 0.47610795497894287, -0.014265156351029873, 0.3273647427558899, 0.37192681431770325, 0.44876012206077576, -0.06133418530225754, -0.4830741584300995, -0.6961312890052795, 0.053122736513614655, 0.4223170876502991, 0.554159939289093, 0.13732653856277...
func (u *__FileStorage_Selector) OrderBy_ZdataThumb_Desc() *__FileStorage_Selector { u.orderBy = append(u.orderBy, " zdata_thumb DESC") return u }
[ -0.16088645160198212, -0.26024943590164185, 0.3969120979309082, 0.05119825899600983, 1.0303550958633423, 0.11974368244409561, 0.7619513273239136, 0.14349642395973206, -0.48698553442955017, -0.7775205373764038, -0.23412998020648956, 0.09662363678216934, 0.9992027282714844, 0.166190251708030...
func (u *__FileStorage_Deleter) Delete_Extension() *__FileStorage_Deleter { u.deleteCol = append(u.deleteCol, "extension") return u }
[ 0.7934963703155518, 0.9560723304748535, 0.5647037625312805, 0.9886387586593628, 0.13228702545166016, -0.6475285887718201, 0.25727757811546326, 0.594681978225708, 0.9618649482727051, 0.19148489832878113, -0.4331350028514862, 0.2638644278049469, 0.3730286657810211, -0.12186308205127716, 0....
func (u *__FileStorage_Updater) Extension(newVal string) *__FileStorage_Updater { u.updates["extension = ? "] = newVal return u }
[ -0.1740434318780899, -0.2439827173948288, 0.23644991219043732, 0.653976321220398, -0.7162114381790161, -0.1232200488448143, -0.2425619661808014, 0.5633720755577087, 0.9957086443901062, 0.6301481127738953, -1.130750298500061, -0.021472465246915817, -0.07874584197998047, 0.08248938620090485,...
func (d *__FileStorage_Deleter) Extension_In_FILTERING(val ...string) *__FileStorage_Deleter { w := whereClause{} var insWhere []interface{} for _, v := range val { insWhere = append(insWhere, v) } w.args = insWhere w.condition = " extension IN (" + helper.DbQuestionForSqlIn(len(val)) + ") " d.wheres = append(...
[ 0.09589631110429764, 0.3435470759868622, 0.7689948678016663, -0.10616414994001389, -1.1450749635696411, 0.024939613416790962, -0.11950762569904327, 0.679378092288971, 0.07005152851343155, 0.6308184862136841, 0.3283386826515198, 0.40469712018966675, -0.29681575298309326, 0.13365182280540466...
func (u *__FileStorage_Selector) _toSql() (string, []interface{}) { sqlWheres, whereArgs := whereClusesToSql(u.wheres, "") selectCols := "*" if len(u.selectCol) > 0 { selectCols = strings.Join(u.selectCol, ", ") } sqlstr := "SELECT " + selectCols + " FROM sunc_file.file_storage" if len(strings.Trim(sqlWheres,...
[ -0.6608445644378662, -0.7464808821678162, 0.5959534049034119, -0.38529103994369507, -0.2628978192806244, -0.9925991296768188, -0.22176185250282288, -0.2745864987373352, 0.03845333680510521, 0.9041430354118347, 0.3606489300727844, -0.422452837228775, 1.037601113319397, -0.11834686249494553,...
func (s StartImagePipelineExecutionInput) String() string { return awsutil.Prettify(s) }
[ 0.6137827038764954, -0.4963712692260742, 0.09929753839969635, -0.14275386929512024, -0.4030729830265045, 0.31054845452308655, 1.094814658164978, -0.4303036332130432, -0.5501649975776672, 0.19921725988388062, 0.7914632558822632, 0.5872964262962341, 0.4713084101676941, -0.26153552532196045, ...
func (s *StartImagePipelineExecutionInput) Validate() error { invalidParams := aws.ErrInvalidParams{Context: "StartImagePipelineExecutionInput"} if s.ClientToken == nil { invalidParams.Add(aws.NewErrParamRequired("ClientToken")) } if s.ClientToken != nil && len(*s.ClientToken) < 1 { invalidParams.Add(aws.NewEr...
[ 0.01378990150988102, -0.32379937171936035, 0.2426992654800415, -0.27484196424484253, -0.012350544333457947, -0.21911035478115082, 0.3465934991836548, -0.03834056854248047, -0.8534809350967407, -0.08834708482027054, 0.5959945321083069, 0.693503201007843, 0.12180479615926743, 0.5655331611633...
func (s StartImagePipelineExecutionInput) MarshalFields(e protocol.FieldEncoder) error { e.SetValue(protocol.HeaderTarget, "Content-Type", protocol.StringValue("application/json"), protocol.Metadata{}) var ClientToken string if s.ClientToken != nil { ClientToken = *s.ClientToken } else { ClientToken = protocol...
[ 0.25386670231819153, -0.08512771874666214, 0.25614622235298157, -0.9550923705101013, 0.27567172050476074, -0.04028354212641716, 0.3584040701389313, 0.16173155605793, -0.6986338496208191, 0.18991297483444214, -0.04020712152123451, 0.6033908128738403, -0.48303741216659546, 0.2032098621129989...
func (s StartImagePipelineExecutionOutput) String() string { return awsutil.Prettify(s) }
[ 1.021206259727478, -0.7953000664710999, 0.12962214648723602, -0.15955762565135956, -0.591955304145813, -0.3912680745124817, 1.0445305109024048, -0.509109616279602, -0.8918606638908386, 0.13919314742088318, 0.9712980389595032, 0.3754846155643463, 0.6394521594047546, -0.37366244196891785, ...
func (s StartImagePipelineExecutionOutput) MarshalFields(e protocol.FieldEncoder) error { if s.ClientToken != nil { v := *s.ClientToken metadata := protocol.Metadata{} e.SetValue(protocol.BodyTarget, "clientToken", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata) } if s.ImageBuildVersi...
[ 0.3560728430747986, -0.21154582500457764, 0.12187357246875763, -0.7421432137489319, 0.29524120688438416, -0.0032634546514600515, 0.2880445420742035, 0.16229674220085144, -0.697087287902832, 0.1367349624633789, -0.04257384315133095, 0.5008041858673096, -0.31322142481803894, 0.34099423885345...
func (r StartImagePipelineExecutionRequest) Send(ctx context.Context) (*StartImagePipelineExecutionResponse, error) { r.Request.SetContext(ctx) err := r.Request.Send() if err != nil { return nil, err } resp := &StartImagePipelineExecutionResponse{ StartImagePipelineExecutionOutput: r.Request.Data.(*StartImage...
[ -0.6576350331306458, -0.4648720622062683, 0.11327795684337616, 0.09109648317098618, 0.3357524573802948, -0.48014089465141296, 0.6411609053611755, -0.5264418721199036, -0.6102743744850159, 0.45736634731292725, 0.27110594511032104, 0.5528298616409302, 0.25498998165130615, 0.1983906328678131,...
func (r *StartImagePipelineExecutionResponse) SDKResponseMetdata() *aws.Response { return r.response }
[ 0.411822110414505, -0.4539549648761749, 0.18705865740776062, -0.10931617766618729, 0.1694396585226059, -0.29360172152519226, 0.04919149726629257, 0.07147546857595444, -0.22924478352069855, 0.2520458698272705, 0.2010447084903717, 0.07694888114929199, 0.6298997402191162, -0.5950597524642944,...
func (c *Client) GetAssetPropertyValueHistory(ctx context.Context, params *GetAssetPropertyValueHistoryInput, optFns ...func(*Options)) (*GetAssetPropertyValueHistoryOutput, error) { if params == nil { params = &GetAssetPropertyValueHistoryInput{} } result, metadata, err := c.invokeOperation(ctx, "GetAssetPropert...
[ -0.22319085896015167, 0.29137229919433594, 0.9103056788444519, 0.3377915620803833, 0.3103339672088623, -0.43749240040779114, 0.06852316856384277, -0.9893499612808228, 0.17356306314468384, -0.3314102292060852, 0.32508915662765503, 1.3649368286132812, 0.1689213663339615, -1.0021291971206665,...
func NewGetAssetPropertyValueHistoryPaginator(client GetAssetPropertyValueHistoryAPIClient, params *GetAssetPropertyValueHistoryInput, optFns ...func(*GetAssetPropertyValueHistoryPaginatorOptions)) *GetAssetPropertyValueHistoryPaginator { if params == nil { params = &GetAssetPropertyValueHistoryInput{} } options ...
[ -0.6482332944869995, -0.4584521949291229, 0.6160390377044678, -0.0933673232793808, -0.25114765763282776, -0.4146674573421478, -0.37460091710090637, 0.24284228682518005, -0.07602687925100327, -0.6379747986793518, 0.9127587676048279, 0.34019163250923157, -0.06170954555273056, 0.4063615798950...
func (p *GetAssetPropertyValueHistoryPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) }
[ -0.012266912497580051, -0.11903303861618042, 0.3091510236263275, -0.5490368604660034, 0.7028673887252808, -0.8360949158668518, -1.2906633615493774, -0.24014566838741302, 0.4042377471923828, -0.7054075598716736, -0.015994513407349586, -0.28899890184402466, 0.11927759647369385, 1.14751458168...
func (p *GetAssetPropertyValueHistoryPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetAssetPropertyValueHistoryOutput, error) { if !p.HasMorePages() { return nil, fmt.Errorf("no more pages available") } params := *p.params params.NextToken = p.nextToken var limit *int32 if p.options.Lim...
[ -0.14540378749370575, 0.38647571206092834, 0.8041330575942993, 0.1271466761827469, 0.14705544710159302, -0.34864285588264465, 0.21055050194263458, -0.7427504658699036, 0.019160373136401176, -0.30332711338996887, 1.1704461574554443, 0.5196073055267334, -0.1345411241054535, -0.06852576136589...
func OK(response interface{}) *Responder { return &Responder{ http.StatusOK, response, make(http.Header), } }
[ 0.37895384430885315, -0.9518951177597046, 0.27567365765571594, 0.278608500957489, -0.8861538171768188, 0.20248235762119293, -0.12093893438577652, -0.34647879004478455, 1.2176884412765503, -0.47839805483818054, -0.5339326858520508, -0.33005332946777344, 0.2495865821838379, -0.38073512911796...
func File(response interface{}) *Responder { return &Responder{ http.StatusOK, response, make(http.Header), } }
[ 0.18548570573329926, -1.129138469696045, 0.34607619047164917, 0.15199998021125793, -0.6293147802352905, 0.20157930254936218, -0.19262714684009552, -0.18258458375930786, 0.4849983751773834, -1.412961721420288, -0.635359525680542, -1.4773595333099365, 0.5517972707748413, -0.13175131380558014...
func SimpleOK() *Responder { return &Responder{ http.StatusOK, &models.StatusResponse{Status: true}, make(http.Header), } }
[ 0.5589386820793152, -1.3339025974273682, 0.5799241662025452, 0.03606512397527695, -0.6614135503768921, 1.0274746417999268, -0.32449936866760254, 0.9119476079940796, 0.8553192615509033, -0.5707534551620483, -1.2487132549285889, -1.2912428379058838, 0.4391648471355438, -0.49034419655799866, ...
func NoContent() *Responder { return &Responder{ http.StatusNoContent, nil, make(http.Header), } }
[ 0.4040205776691437, -0.4842226207256317, 0.19083181023597717, -0.5814504027366638, -0.3370669186115265, -0.0537809282541275, 0.5103618502616882, -0.7064259648323059, -0.4189606010913849, -0.9649885296821594, -0.1276002824306488, -1.0850540399551392, -0.49332356452941895, -0.719399034976959...
func NotOK(message string) *Responder { return &Responder{ http.StatusOK, &models.StatusResponse{Status: false, Message: models.StatusMessage(message)}, make(http.Header), } }
[ 0.2944710850715637, -0.5970126986503601, 0.41999757289886475, 0.04346461966633797, -0.680189311504364, 0.4954061806201935, 0.3314794600009918, -0.1649593710899353, -0.11117295175790787, 0.07661249488592148, 0.16132186353206635, -0.4105038046836853, -0.876829206943512, 0.3618856370449066, ...
func (r *Responder) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { for k, v := range r.headers { for _, val := range v { rw.Header().Add(k, val) } } rw.WriteHeader(r.code) if r.response != nil { if err := producer.Produce(rw, r.response); err != nil { panic(err) } } }
[ -0.6679250001907349, -0.7510634660720825, 0.4396767318248749, 0.4959980845451355, 0.9002528190612793, -0.604865312576294, 0.05766849219799042, -0.6875012516975403, 0.4193169176578522, 0.029679542407393456, -0.0718836635351181, -0.7726345062255859, -0.47342976927757263, 0.1004195436835289, ...
func (m *PageManager) RunPage(ctx context.Context, buf *bytes.Buffer) (headers map[string]string, httpErrCode int) { defer func() { if r := recover(); r != nil { switch v := r.(type) { case error: err := newRunError(ctx, v) m.makeErrorResponse(ctx, err, "", buf) case string: err := newRunError(c...
[ -0.7203763127326965, -0.701320230960846, 1.0280779600143433, -0.4344298243522644, -0.2855992615222931, -0.27214759588241577, -0.05978640168905258, 0.01550939492881298, 0.9223617911338806, -0.20182012021541595, 0.34297600388526917, -0.30323776602745056, -0.9048351049423218, 0.30672326683998...
func Redirect(url string) { e := HttpError{} e.SetResponseHeader("Location", url) e.Send(307) }
[ -0.46257737278938293, 0.40047818422317505, 0.5331518054008484, -0.21704261004924774, 0.4873179495334625, 1.0044527053833008, 0.4249305725097656, 0.13487829267978668, 0.6541283130645752, -0.49600210785865784, 0.15523749589920044, 0.4715178906917572, 0.39586159586906433, -0.8232120275497437,...
func MigrateTenantTables(connection *gorm.DB) error { fmt.Println("Attempting to migrate tables to new database.") if err := connection.AutoMigrate(&models.User{}).Error; err != nil { return err } return nil }
[ -0.9362121820449829, 0.6467669010162354, 0.4638270139694214, 1.2990493774414062, -0.14469222724437714, 0.8980445265769958, 0.45577627420425415, -0.874422550201416, -1.1430068016052246, 0.6512485146522522, -0.7270886301994324, -0.07272560149431229, -0.8582201600074768, 0.2738095819950104, ...
func (h *Handler) SessionSyncHandler(w http.ResponseWriter, req *http.Request, _ *sessions.Session, prefObj *models.Preference, user *models.User, provider models.Provider) { if req.Method != http.MethodGet { w.WriteHeader(http.StatusNotFound) return } err := h.checkIfK8SConfigExistsOrElseLoadFromDiskOrK8S(req,...
[ -0.9234698414802551, -0.34083473682403564, 0.6847449541091919, 0.7453151941299438, -0.018026651814579964, -0.48456621170043945, 0.6219857931137085, -0.8710117936134338, 0.9417079091072083, 1.006037712097168, -0.6396182179450989, 0.4545246958732605, 0.3157086670398712, 0.43756064772605896, ...
func (rectNode) HitTest(p hit.Point) bool { return true }
[ 0.36264559626579285, 0.014071708545088768, 0.3681880831718445, -0.04920570179820061, 0.560509204864502, 1.0721189975738525, 0.3505357801914215, -0.25887709856033325, 0.3064943552017212, -0.0515466071665287, -0.2507253885269165, -0.8469464182853699, -0.792350709438324, -0.923740565776825, ...
func (p circPad) HitTest(tp hit.Point) bool { centerX, centerY := p.Pos() distSq := math.Pow(tp.X-centerX, 2) + math.Pow(tp.Y-centerY, 2) dia, _ := p.Pad().Size() return distSq < math.Pow(dia/2, 2) }
[ 0.390840619802475, -0.15762785077095032, 0.37025660276412964, -0.30931422114372253, -0.3435612618923187, 1.0280628204345703, 0.37543123960494995, -0.25397196412086487, 0.7479915618896484, 0.6106072664260864, -0.020524216815829277, -0.5764973163604736, -0.4925427734851837, -0.55617249011993...