text
stringlengths
3.08k
10.4k
package display import ( "github.com/pkg/errors" "github.com/pulumi/pulumi/pkg/apitype" "github.com/pulumi/pulumi/pkg/engine" "github.com/pulumi/pulumi/pkg/resource/config" "github.com/pulumi/pulumi/pkg/resource/plugin" "github.com/pulumi/pulumi/pkg/resource/stack" "github.com/pulumi/pulumi/pkg/util/contract" )...
package main import ( "fmt" "io" "log" "os" "strconv" "strings" "github.com/aerth/ssh" gossh "golang.org/x/crypto/ssh" "golang.org/x/crypto/ssh/terminal" ) var sshUsage = "Commands: 'new', 'exit', 'status', 'help'\n" func init() { log.SetPrefix("") log.SetFlags(log.Ltime) } func handleEntrypoint(s ssh.S...
package storage import ( "context" "sync" "github.com/ipfs/go-cid" "github.com/ipfs/go-datastore" logging "github.com/ipfs/go-log" "github.com/libp2p/go-libp2p-core/host" "github.com/pkg/errors" "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/build" "github.com/filecoin-project/l...
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** package s3 import ( "github.com/pkg/errors" "github.com/pulumi/pulumi/sdk/go/pulumi" ) // Provides a S3 bucket [inventory configuration](https:/...
package spread import ( "context" "errors" "math/big" "time" "github.com/soulgarden/kickex-bot/broker" "github.com/soulgarden/kickex-bot/conf" "github.com/rs/zerolog" "github.com/soulgarden/kickex-bot/dictionary" "github.com/soulgarden/kickex-bot/storage" storageSpread "github.com/soulgarden/kickex-bot/st...
// Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 // Package store provides a simple implementation of the bundle.Cache interface package store //go:generate mockgen -destination=mock_extractor.go -package=store github.com/aws-robotics/aws-robomaker-bund...
/* * Copyright 2016,2017 falcon Author. All rights reserved. * Use of this source code is governed by a BSD-style * license that can be found in the LICENSE file. */ package expr import ( "bytes" "errors" "fmt" "regexp" "strconv" "github.com/golang/glog" ) const ( eof = 0 MAX_CTX_LEVEL = 16 MO...
package rules import ( "errors" "fmt" "log" "github.com/oktal/infix/filter" "github.com/oktal/infix/logging" "github.com/influxdata/influxdb/models" "github.com/influxdata/influxdb/tsdb/engine/tsm1" "github.com/oktal/infix/storage" ) // ErrMissingFromFilter is raised when a config is missing from filter va...
/** * sdkhooks.go * * Copyright 2020 Nirari Technologies, Alliedmodders LLC. * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights ...
// Package pinboard provides a wrapper for accessing the Pinboard API. // // https://pinboard.in/api/ // // All Pinboard API methods are fully supported. // // Function names mirror the API endpoints. For example: // // PostsAdd() calls the /posts/add method // TagsDelete() calls the /tags/delete method // // I...
package sqlite_test import ( "github.com/google/uuid" n "github.com/perfectyorg/perfecty-push/internal/domain/notification" "github.com/perfectyorg/perfecty-push/internal/repository/sqlite" "github.com/stretchr/testify/assert" "testing" "time" ) const ( batchSize = 30 ) func TestGetNotifications(t *testing.T)...
package graphviz import ( "strings" model "github.com/AOEpeople/vistecture/v2/model/core" ) // EXTEND PROJECT type ProjectDrawer struct { //inherit originalProject *model.Project iconPath string } // Decorate Draw function func (projectDrawer *ProjectDrawer) DrawComplete(hidePlanned bool) string { var...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package rds import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" ) // Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBParameterGroupMessage type ModifyDBParameterGr...
package scheduler import ( "encoding/json" "errors" "fmt" "strings" pb "github.com/nre-learning/syringe/api/exp/generated" log "github.com/sirupsen/logrus" // Kubernetes Types corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // cre...
package main import ( "bytes" "context" "flag" "fmt" "io/ioutil" "os" "os/exec" "path/filepath" "time" "gopkg.in/yaml.v2" "k8s.io/klog/v2" ) var targetFlag = flag.String("target", "minikube", "What kind of cluster to target: kind, minikube, k3d, remote") var sceneFlag = flag.String("scene", "", "configura...
package transmissionrpc import ( "bytes" "context" "encoding/base64" "encoding/json" "errors" "fmt" "io" "os" "reflect" ) /* Adding a Torrent https://github.com/transmission/transmission/blob/3.00/extras/rpc-spec.txt#L392 */ // TorrentAddFileDownloadDir is wrapper to directly add a torrent file (it handle...
package pgs // FieldType describes the type of a Field. type FieldType interface { // Field returns the parent Field of this type. While two FieldTypes might be // equivalent, each instance of a FieldType is tied to its Field. Field() Field // Name returns the TypeName for this Field, which represents the type of...
package handlers import ( "testing" "github.com/codingpot/pr12er/server/internal/data" "github.com/codingpot/pr12er/server/internal/mock_gh" "github.com/codingpot/pr12er/server/pkg/handlers/gh" "github.com/codingpot/pr12er/server/pkg/pr12er" "github.com/golang/mock/gomock" "github.com/google/go-cmp/cmp" "gith...
// Copyright 2020 Antrea Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to ...
/* * Copyright (c) 2012 The Goon Authors * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCL...
package giu import ( "image" "image/color" "github.com/ImmortalHax/giu/imgui" ) type Canvas struct { drawlist imgui.DrawList } func GetCanvas() *Canvas { return &Canvas{ drawlist: imgui.GetWindowDrawList(), } } func (c *Canvas) AddLine(p1, p2 image.Point, color color.RGBA, thickness float32) { c.drawlist....
// The schema-generate binary reads the JSON schema files passed as arguments // and outputs the corresponding Go structs. package main import ( "encoding/json" "flag" "fmt" "io" "io/ioutil" "os" "sort" "strings" "github.com/a-h/generate" "github.com/a-h/generate/jsonschema" ) var ( o = flag.String("o", "...
package flagx import ( "flag" "fmt" "reflect" "strconv" "strings" ) const ( KEY_USAGE = "usage" KEY_DEF = "def" KEY_MAX = "max" KEY_MIN = "min" ) var ( ErrOptMissHandler = Error("opt(%v) in field(%v) missing handler") ErrOptInvalid = Error("optString(%v) in field(%v) is invalid") ErrTypeSupport...
// Copyright 2020 the Exposure Notifications Verification Server authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless...
// Copyright 2019 eBay Inc. // Primary authors: <NAME>, <NAME>, // <NAME>, and <NAME>. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // https://www.apache.org/licenses/...
package http import ( "context" "encoding/json" "fmt" "net/http" "strconv" "time" "github.com/hashicorp/vault/sdk/helper/consts" "github.com/hashicorp/vault/sdk/version" "github.com/hashicorp/vault/vault" ) func handleSysHealth(core *vault.Core) http.Handler { return http.HandlerFunc(func(w http.ResponseWr...
package forwarderpubsub import ( "cloud.google.com/go/pubsub" "context" "encoding/json" "fmt" "sync" "time" ) type PubSubElement struct { CompanyID int ESP string ESPJsonString string Ts int64 SafeHash string Sign string // Sign hash where applicable Rid ...
package lightswarm import ( "encoding/binary" "io" ) // Byte constants const ( END byte = 0xC0 // End byte ESC byte = 0xDB // Escape byte ) // Escape Sequences var ( ENDSEQ = []byte{ESC, 0xDC} // END byte escape sequence ESCSEQ = []byte{ESC, 0xDD} // ESC byte escape sequence ) // Command constants const ( ON...
package store import ( "bytes" "encoding/gob" ) type Application struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Version *Version `json:"version,omitempty"` ProposedVersion *Version `json:"proposedVersion,omitempty"` ClusterID...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: mesh/v1alpha1/selector.proto package v1alpha1 import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // ...
package mutualexclusion import ( "fmt" "sync" "github.com/aQuaYi/observer" ) // OTHERS 表示信息接收方为其他所有 process const OTHERS = -1 // Process 是进程的接口 type Process interface { // Request 会申请占用资源 // 如果上次 Request 后,还没有占用并释放资源,会发生阻塞 // 非线程安全 Request() } type process struct { me int // process 的 ID wg syn...
package lachesis import ( "crypto/ecdsa" "fmt" "github.com/andrecronje/lachesis/src/crypto" "github.com/andrecronje/lachesis/src/log" "github.com/andrecronje/lachesis/src/net" "github.com/andrecronje/lachesis/src/node" "github.com/andrecronje/lachesis/src/peers" "github.com/andrecronje/lachesis/src/poset" "g...
package xeth import ( "bytes" "fmt" "strings" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/p2p" "github.com/e...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: service.proto /* Package main is a generated protocol buffer package. It is generated from these files: service.proto It has these top-level messages: Request Response */ package main import proto "github.com/golang/protobuf/proto" import fmt "fmt" impo...
package cmd import ( "fmt" "github.com/c-bata/go-prompt" "github.com/spf13/cobra" "os" "strings" ) var cfgFile string // ShellCmd represents the base command when called without any subcommands var ShellCmd = &cobra.Command{ Use: "bit", Short: "Bit is a Git CLI that predicts what you want to do", Long: `v...
package swift import ( "context" "fmt" "os" "sort" "strconv" "strings" "time" log "github.com/hashicorp/go-hclog" metrics "github.com/armon/go-metrics" "github.com/hashicorp/errwrap" cleanhttp "github.com/hashicorp/go-cleanhttp" "github.com/hashicorp/vault/sdk/helper/strutil" "github.com/hashicorp/vault...
// Copyright 2014, Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package testlib import ( "fmt" "sync/atomic" "testing" "time" mproto "github.com/youtube/vitess/go/mysql/proto" "github.com/youtube/vitess/go/vt/dbconnpool...
// Copyright 2016-2017 VMware, Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by appli...
package opentick import ( "fmt" "github.com/apple/foundationdb/bindings/go/src/fdb" "github.com/apple/foundationdb/bindings/go/src/fdb/directory" "github.com/apple/foundationdb/bindings/go/src/fdb/subspace" "github.com/apple/foundationdb/bindings/go/src/fdb/tuple" "github.com/stretchr/testify/assert" "testing" ...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
/* Copyright 2021 The Knative Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, soft...
package proto2gql import ( "reflect" "github.com/pkg/errors" "github.com/EGT-Ukraine/go2gql/generator/plugins/graphql" "github.com/EGT-Ukraine/go2gql/generator/plugins/proto2gql/parser" ) func (g *Proto2GraphQL) inputMessageResolverName(msgFile *parsedFile, message *parser.Message) string { return "Resolve" + ...
// Copyright 2017 Prospect One https://prospectone.io/. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // // Unless req...
// Copyright © 2021 The Things Network Foundation, The Things Industries B.V. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Un...
package server import ( "context" "net" grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware" grpc_logrus "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" "github.com/pkg/errors" "github.com/sirupsen/logrus" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc...
// Package postgres contains generated code for schema 'public'. package postgres // Code generated by xo. DO NOT EDIT. import ( "context" "database/sql" "database/sql/driver" "encoding/csv" "fmt" "io" "regexp" "strings" ) var ( // logf is used by generated code to log SQL queries. logf = func(string, ...i...
package pluginhttp import ( "bytes" "encoding/xml" "errors" "fmt" "io/ioutil" "net/http" "net/url" "strconv" "strings" "time" "github.com/ovh/utask" "github.com/ovh/utask/pkg/plugins/builtin/httputil" "github.com/ovh/utask/pkg/plugins/taskplugin" "github.com/ovh/utask/pkg/utils" ) // the HTTP plugin pe...
/* Copyright © 2020 sequix <<EMAIL>> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, ...
package webtunnelserver import ( "encoding/binary" "fmt" "math" "net" "sync" "time" "github.com/golang/glog" ) const ( ipStatusRequested = 1 // IP requested. ipStatusInUse = 2 // IP in use. ) // UserInfo represents the user information associated with an IP type UserInfo struct { username, hostname st...
package keystore import ( "fmt" "strings" "testing" "encoding/hex" "math" "math/big" "sync" "github.com/massnetorg/mass-core/massutil/base58" ) func TestBase58(t *testing.T) { testBytes := []byte("abcd") base58String := base58.Encode(testBytes) testString := string(testBytes) if strings.Compare(base58St...
package v038 // DONTCOVER // nolint import ( "bytes" "errors" "fmt" "sort" "strings" "github.com/tendermint/tendermint/crypto" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" v034auth "github.com/cosmos/cosmos-sdk/x/auth/legacy/v0_34" ) const ( ModuleName = "auth" ) type ( ...
/* Package gdi implements parsing of Sega Dreamcast GDI files. Basic checks are performed pre-marshalling or post-unmarshalling to ensure it is valid. */ package gdi import ( "bufio" "bytes" "errors" "fmt" "strconv" "strings" "unicode" ) const ( // Extension is the conventional file extension used Extension ...
package utils import ( "errors" "fmt" "sync" "time" "github.com/getsentry/sentry-go" ) const ( twepoch = int64(1525705533) // 默认起始的时间戳 1449473700000 。计算时,减去这个值 NodeIdBits = uint(2) //节点 所占位置00 01 10 11,对应0, 1, 2, 3 sequenceBits = uint(11) //自增ID 所占用位置 /* * 1 符号位 | 38 时间戳 ...
package dicom_test import ( "log" "os" "testing" "github.com/ematvey/go-dicom" "github.com/ematvey/go-dicom/dicomtag" "github.com/ematvey/go-dicom/dicomuid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func mustReadFile(path string, options dicom.ReadOptions) *dicom.DataSet { ...
// Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package postgres import ( "context" "database/sql" "fmt" "github.com/Masterminds/squirrel" "golang.org/x/pkgsite/internal" "golang.org/x/pkgsite/interna...
/* Copyright 2022 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
package command import ( "context" "encoding/base64" "net" "net/http" "strings" "testing" "time" "github.com/hashicorp/vault/api" "github.com/hashicorp/vault/audit" "github.com/hashicorp/vault/builtin/logical/pki" "github.com/hashicorp/vault/builtin/logical/ssh" "github.com/hashicorp/vault/builtin/logical...
// Copyright (c) 2019-2020 ubirch GmbH // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agre...
package gocache import ( "context" "errors" "fmt" "sync" "time" ) const ( // 定期扫描 key 的数量 keyCount int = 1000 ) var cache *Cache var once sync.Once type deleteElementKeys struct { dbIndex uint32 keys []string } // Cache type Cache struct { mu sync.Mutex // db index dbindex uint32 // bucket 数量 dbc...
package awstest /** * Panther is a scalable, powerful, cloud-native SIEM written in Golang/React. * Copyright (C) 2020 Panther Labs Inc * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Founda...
package mem_test import ( "bytes" "encoding/json" "fmt" "github.com/ionous/sashimi/_examples/stories" "github.com/ionous/sashimi/net" "github.com/ionous/sashimi/net/app" "github.com/ionous/sashimi/net/ess" "github.com/ionous/sashimi/net/mem" "github.com/ionous/sashimi/net/resource" "github.com/stretchr/testi...
// Code generated by protoc-gen-go. // source: pb/startsync.proto // DO NOT EDIT! /* Package pb is a generated protocol buffer package. It is generated from these files: pb/startsync.proto It has these top-level messages: WaitReq WaitResp */ package pb import proto "github.com/golang/protobuf/proto" import fmt "...
package gaia import ( "os" "time" hclog "github.com/hashicorp/go-hclog" "github.com/robfig/cron" ) // PipelineType represents supported plugin types type PipelineType string // CreatePipelineType represents the different status types // a create pipeline can have. type CreatePipelineType string // PipelineRunS...
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package ssh // Copy only of used functions from message.go, common.go import ( "encoding/binary" "math/big" ) const ( kexAlgoDH1SHA1 = "diffie-hellman-gr...
package kubernetes import ( "context" "fmt" "net" //"path/filepath" //"strings" "bytes" "github.com/tg123/sshpiper/sshpiperd/upstream" "golang.org/x/crypto/ssh" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/rest" //"k8s.io/client-go/util/homedir" //"k8s.io/client-go/tools/clientcmd" ssh...
package rds // http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.html type RdsOsSnapshot struct { Engine string `json:"engine"` // The database engine for the DB instance. InstanceID string `json:"instanceID"` // The DB instance identifier. InstanceResou...
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package ec2 import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" "github.com/aws/aws-sdk-go-v2/private/protocol" "github.com/aws/aws-sdk-go-v2/private/protocol/ec2query" ) type AuthorizeSecurit...
// Code generated by go-swagger; DO NOT EDIT. package models // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "strconv" strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/errors" "github.com/go-openapi/swag" ...
/** * Copyright 2016 Comcast Cable Communications Management, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requir...
package cli import ( "errors" "fmt" "os" "path" "path/filepath" "strings" "github.com/sisizanohito/martian/resource" "github.com/spf13/cobra" "github.com/spf13/viper" ) var genCmd = &cobra.Command{ Use: "generate", Aliases: []string{ "gen", "g", }, Short: "Generate po files", RunE: func(cmd *cobra.Co...
package str import ( "errors" "fmt" "go-tester/utils/math" "regexp" "strconv" "strings" "time" ) var ( ErrConvertFail = errors.New("convert data type is failure") ErrInvalidParam = errors.New("invalid input parameter") // some regex for convert string. toSnakeReg = regexp.MustCompile("[A-Z][a-z]") toC...
// Copyright (c) 2021 Terminus, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agree...
package smartag //Licensed under the Apache License, Version 2.0 (the "License"); //you may not use this file except in compliance with the License. //You may obtain a copy of the License at // //http://www.apache.org/licenses/LICENSE-2.0 // //Unless required by applicable law or agreed to in writing, software //distr...
// Copyright 2018 The Goma Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 // protoc v3.19.0 // source: settings/settings_service.proto ...
package cli import ( "fmt" "os" "strings" "github.com/evanw/esbuild/pkg/api" "github.com/evanw/esbuild/pkg/cli" "github.com/cleiner/svecl/internal/importmap" "github.com/cleiner/svecl/internal/svelte" ) type colors struct { Bold string Default string Dim string Underline string } func helpT...
package wallet import ( "errors" "runtime" "sync" "gitlab.com/SiaPrime/SiaPrime/crypto" "gitlab.com/SiaPrime/SiaPrime/types" "github.com/JayRama/us/internal/ed25519" ) const ( // lookaheadLimit is the number of addresses monitored "in advance" to // prevent missing occurrences of owned addresses in the block...
package socks import ( "bufio" "errors" "fmt" "io" "net" "strconv" ) const ( socks4Version = 4 socks4Connect = 1 socks4Granted = 90 socks4Rejected = 91 socks4ConnectFailed = 92 socks4UserIDInvalid = 93 ) var socks4Errors = []string{ "", "request rejected or failed", "request rej...
package forward import ( "context" "flag" "fmt" "net/http" "net/url" "os" "os/signal" "path/filepath" "strings" "sync" "syscall" "github.com/jedib0t/go-pretty/table" "github.com/jedib0t/go-pretty/text" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labe...
/* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softw...
// Copyright 2015 <NAME>. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package xferspdy import ( "crypto/sha256" "io" "os" "github.com/golang/glog" ) // NewDiff computes a diff between a given file and Fingerprint created from some ...
package parse_test import ( "fmt" "io/ioutil" "log" "strings" "testing" "github.com/olegch/genny/parse" "github.com/stretchr/testify/assert" ) var tests = []struct { // input filename string pkgName string in string tag string imports []string types []map[string]string // expectations...
package main import ( "context" "fmt" "io" "math" "sync" "time" "golang.org/x/sync/errgroup" ) type clientStats struct { Concurrency int // Divide total time by concurrency to get rps mu sync.Mutex numTotal int // Number of requests numErrors int // Number of errors timeErrors time.Duration // ...
package main import ( _ "github.com/anacrolix/envpprof" "io/ioutil" "net/http" "os" "os/signal" "path/filepath" "runtime" "strconv" "syscall" "time" "github.com/anacrolix/sync" "github.com/anacrolix/tagflag" "github.com/op/go-logging" "github.com/projectx13/projectx/api" "github.com/projectx13/projec...
/* ** Zabbix ** Copyright (C) 2001-2021 Zabbix SIA ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 2 of the License, or ** (at your option) any later version. ** **...
package bot import ( "context" "errors" "fmt" "io" "log" "regexp" "sort" "strings" "time" ) const ( defaultConnectBackoffTime = 5 // seconds maxConnectRetryCount = 10 ) var ( ErrFailedConnect = errors.New("failed connect") ) type OnError func(*Event) type Bot struct { Connector Connector Name ...
// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
package schema import ( "encoding/json" "fmt" ) // AddNotificationRocketChatInput is based on the Lagoon API type. type AddNotificationRocketChatInput struct { Name string `json:"name"` Webhook string `json:"webhook"` Channel string `json:"channel"` } // NotificationRocketChat is based on the Lagoon API type...
// Copyright 2018 Cisco Systems, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agree...
package launchpad import ( "fmt" "io" "log" "sort" "strings" ) const ( folderNameMin = 3 folderNameMax = 30 ) // folderSpecYAML defines GCP Folder's spec. type folderSpecYAML struct { // Inner mappings Id string `yaml:"id"` DisplayName string `yaml:"displayName...
package statics3websitebackend import ( "archive/tar" "bytes" "compress/gzip" "context" "encoding/json" "fmt" "io" "io/ioutil" "log" "path" "path/filepath" "sync" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/s3" "github.com/function61/edgerouter/pkg/erconfig" "github.com/...
package controller import ( "context" "fmt" "strings" "github.com/go-logr/logr" "github.com/operator-framework/combo/api/v1alpha1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/cont...
package main // This program generates 'code.go' with the Ansible code located in `templates/` // and `templates/roles`. It is invoked by running: go generate import ( "flag" "fmt" "io/ioutil" "log" "os" "os/exec" "path/filepath" "regexp" "strings" "text/template" "github.com/iancoleman/strcase" ) // Dat...
package quicklog import ( "bytes" "encoding/binary" "encoding/hex" "encoding/json" "fmt" "io/ioutil" "math/rand" "net/http" "time" ) type Config struct { ProjectID int Source string ApiKey string ApiURL string Client *http.Client } type Ctx struct { ActorID string TraceID string...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: ProtobufRpcEngine.proto package hadoop_common import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.I...
package sectigo import ( "fmt" "strings" ) // Batch Status Constants const ( BatchStatusFailed = "FAILED" BatchStatusRejected = "REJECTED" BatchStatusProcessing = "PROCESSING" BatchStatusNotAcceptable = "NOT_ACCEPTABLE" BatchStatusReadyForDownload = "READY_FOR_DOWNLOAD" ) // Authent...
// cloudhealthtestserver // // This application is a fake cloudhealth endpoint. It accepts requests // for the *real* cloud health endpoint and writes the data to lmm. Finally, // it forwards requests onto the *real* cloud health endpoint. // // cloudhealthtestserver accepts incoming cloudhealth requests at // http://l...
package connector import ( "bytes" "database/sql" "encoding/json" "fmt" "net/http" "strconv" "strings" "time" ) const dateformat = "2006-01-02 15:04:05" //prepared database queries var selectAll, selectFilter, update, _delete, insert *sql.Stmt var db *sql.DB //database connection func Open(driverName, dataS...
package cbclient const aServer string = `{ "_links": { "self": { "href": "/api/v3/cmp/servers/SVR-yrk09wht/", "title": "myawsinstance1" } }, "id": "SVR-yrk09wht", "hostname": "myawsinstance1", "ipAddress": "192.168.127.12", "status": "ACTIVE", "mac": ...
package main import ( _ "embed" "errors" "fmt" "gopkg.in/yaml.v2" "os" "path" "reflect" "strconv" "strings" "time" ) //go:embed resources/example_config.yml var defaultConfigFile string // S3Config is the directly related part of the global config type S3Config struct { EndPoint string `yaml:"endPoint...
package apis import ( "encoding/xml" "errors" "fmt" ) type AccessType int // enumerate values for AccessType const ( UnknownAccessType AccessType = iota ReadAccessType WriteAccessType ) var accessTypeValues = []string{"Unknown", "READ", "WRITE"} type AccessLevel int // enumerate values for AccessLevel const...