query_docstring
stringlengths
24
20.8k
positive_code
stringlengths
17
325k
hard_negative_code
stringlengths
17
325k
similarity_score
float64
0.3
1
query_repo
stringclasses
407 values
query_path
stringlengths
5
170
hn_repo
stringclasses
400 values
hn_path
stringlengths
5
170
hn_license
stringclasses
4 values
language
stringclasses
1 value
ListObjectsPages iterates over the pages of a ListObjects operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function. See ListObjects method for more information on how to use this operation. Note: This operation can generate multiple requests to a service. // Example iterating over at most 3 pages of a ListObjects operation. pageNum := 0 err := client.ListObjectsPages(params, func(page *s3.ListObjectsOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })
func (c *S3) ListObjectsPages(input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool) error { return c.ListObjectsPagesWithContext(aws.BackgroundContext(), input, fn) }
func (c *S3) ListObjectsV2Pages(input *ListObjectsV2Input, fn func(*ListObjectsV2Output, bool) bool) error { return c.ListObjectsV2PagesWithContext(aws.BackgroundContext(), input, fn) }
0.871348
armory/spinnaker-operator
vendor/github.com/aws/aws-sdk-go/service/s3/api.go
armory/spinnaker-operator
vendor/github.com/aws/aws-sdk-go/service/s3/api.go
Apache-2.0
go
ListObjectsPages iterates over the pages of a ListObjects operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function. See ListObjects method for more information on how to use this operation. Note: This operation can generate multiple requests to a service. // Example iterating over at most 3 pages of a ListObjects operation. pageNum := 0 err := client.ListObjectsPages(params, func(page *s3.ListObjectsOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })
func (c *S3) ListObjectsPages(input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool) error { return c.ListObjectsPagesWithContext(aws.BackgroundContext(), input, fn) }
func (c *DataPipeline) DescribeObjectsPages(input *DescribeObjectsInput, fn func(*DescribeObjectsOutput, bool) bool) error { return c.DescribeObjectsPagesWithContext(aws.BackgroundContext(), input, fn) }
0.816644
armory/spinnaker-operator
vendor/github.com/aws/aws-sdk-go/service/s3/api.go
aws/aws-sdk-go
service/datapipeline/api.go
Apache-2.0
go
ListObjectsPages iterates over the pages of a ListObjects operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function. See ListObjects method for more information on how to use this operation. Note: This operation can generate multiple requests to a service. // Example iterating over at most 3 pages of a ListObjects operation. pageNum := 0 err := client.ListObjectsPages(params, func(page *s3.ListObjectsOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })
func (c *S3) ListObjectsPages(input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool) error { return c.ListObjectsPagesWithContext(aws.BackgroundContext(), input, fn) }
func (c *LakeFormation) GetTableObjectsPages(input *GetTableObjectsInput, fn func(*GetTableObjectsOutput, bool) bool) error { return c.GetTableObjectsPagesWithContext(aws.BackgroundContext(), input, fn) }
0.751334
armory/spinnaker-operator
vendor/github.com/aws/aws-sdk-go/service/s3/api.go
aws/aws-sdk-go
service/lakeformation/api.go
Apache-2.0
go
ListObjectsPages iterates over the pages of a ListObjects operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function. See ListObjects method for more information on how to use this operation. Note: This operation can generate multiple requests to a service. // Example iterating over at most 3 pages of a ListObjects operation. pageNum := 0 err := client.ListObjectsPages(params, func(page *s3.ListObjectsOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })
func (c *S3) ListObjectsPages(input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool) error { return c.ListObjectsPagesWithContext(aws.BackgroundContext(), input, fn) }
func (c *SSM) ListDocumentsPages(input *ListDocumentsInput, fn func(*ListDocumentsOutput, bool) bool) error { return c.ListDocumentsPagesWithContext(aws.BackgroundContext(), input, fn) }
0.749273
armory/spinnaker-operator
vendor/github.com/aws/aws-sdk-go/service/s3/api.go
aws/aws-sdk-go
service/ssm/api.go
Apache-2.0
go
ListObjectsPages iterates over the pages of a ListObjects operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function. See ListObjects method for more information on how to use this operation. Note: This operation can generate multiple requests to a service. // Example iterating over at most 3 pages of a ListObjects operation. pageNum := 0 err := client.ListObjectsPages(params, func(page *s3.ListObjectsOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })
func (c *S3) ListObjectsPages(input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool) error { return c.ListObjectsPagesWithContext(aws.BackgroundContext(), input, fn) }
func (c *DataPipeline) QueryObjectsPages(input *QueryObjectsInput, fn func(*QueryObjectsOutput, bool) bool) error { return c.QueryObjectsPagesWithContext(aws.BackgroundContext(), input, fn) }
0.741576
armory/spinnaker-operator
vendor/github.com/aws/aws-sdk-go/service/s3/api.go
aws/aws-sdk-go
service/datapipeline/api.go
Apache-2.0
go
ValidateAll checks the field values on GenericSecret with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GenericSecretMultiError, or nil if none found.
func (m *GenericSecret) ValidateAll() error { return m.validate(true) }
func (m *GenericSecret) Validate() error { return m.validate(false) }
0.869853
tektoncd/cli
vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/secret.pb.validate.go
tektoncd/cli
vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/secret.pb.validate.go
Apache-2.0
go
ValidateAll checks the field values on GenericSecret with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GenericSecretMultiError, or nil if none found.
func (m *GenericSecret) ValidateAll() error { return m.validate(true) }
func (m *Bootstrap) ValidateAll() error { return m.validate(true) }
0.822763
tektoncd/cli
vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/secret.pb.validate.go
tektoncd/cli
vendor/github.com/envoyproxy/go-control-plane/envoy/config/bootstrap/v3/bootstrap.pb.validate.go
Apache-2.0
go
ValidateAll checks the field values on GenericSecret with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GenericSecretMultiError, or nil if none found.
func (m *GenericSecret) ValidateAll() error { return m.validate(true) }
func (m *RingHash) ValidateAll() error { return m.validate(true) }
0.8197
tektoncd/cli
vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/secret.pb.validate.go
tektoncd/cli
vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.pb.validate.go
Apache-2.0
go
ValidateAll checks the field values on GenericSecret with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GenericSecretMultiError, or nil if none found.
func (m *GenericSecret) ValidateAll() error { return m.validate(true) }
func (m *HashPolicy) ValidateAll() error { return m.validate(true) }
0.81875
tektoncd/cli
vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/secret.pb.validate.go
tektoncd/cli
vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/hash_policy.pb.validate.go
Apache-2.0
go
ValidateAll checks the field values on GenericSecret with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GenericSecretMultiError, or nil if none found.
func (m *GenericSecret) ValidateAll() error { return m.validate(true) }
func (m *Authority) ValidateAll() error { return m.validate(true) }
0.817736
tektoncd/cli
vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/secret.pb.validate.go
tektoncd/cli
vendor/github.com/cncf/xds/go/xds/core/v3/authority.pb.validate.go
Apache-2.0
go
NewAuthHTTPSClient 创建双向身份认证国密HTTPS客户端 pool: 根证书链 clientAuthCert: 客户端认证密钥对和证书
func NewAuthHTTPSClient(pool *x509.CertPool, clientAuthCert *Certificate) *http.Client { return &http.Client{ Transport: NewSimpleRoundTripper(&Config{ GMSupport: &GMSupport{}, RootCAs: pool, Certificates: []Certificate{*clientAuthCert}, }), } }
func main() { var clientCertFile, clientKeyFile, caFile string flag.StringVar(&clientCertFile, "cert", "cert.pem", "The `certificate file` to load.") flag.StringVar(&clientKeyFile, "key", "key.pem", "The `key file` to load.") flag.StringVar(&caFile, "ca", "ca.pem", "The `root CA` to load.") flag.Parse() if len(clientCertFile) == 0 || len(clientKeyFile) == 0 { flag.PrintDefaults() log.Fatalf("client certificate and key required") } tlsCfg, err := tlsConfigWithClientCert(clientCertFile, clientKeyFile, caFile) if err != nil { log.Fatalf("failed to load client cert, %v", err) } // Copy of net/http.DefaultTransport with TLS config loaded tr := defaultHTTPTransport() tr.TLSClientConfig = tlsCfg // Configure the SDK's session with the HTTP client with TLS client // certificate support enabled. This session will be used to create all // SDK's API clients. sess, err := session.NewSession(&aws.Config{ HTTPClient: &http.Client{ Transport: tr, }, }) // Create each API client will the session configured with the client TLS // certificate. svc := s3.New(sess) resp, err := svc.ListBuckets(&s3.ListBucketsInput{}) if err != nil { log.Fatalf("failed to list buckets, %v", err) } fmt.Println("Buckets") fmt.Println(resp) }
0.558862
tjfoc/gmsm
gmtls/http_client.go
aws/aws-sdk-go
example/aws/proxyWithTLSClientCert/main.go
Apache-2.0
go
NewAuthHTTPSClient 创建双向身份认证国密HTTPS客户端 pool: 根证书链 clientAuthCert: 客户端认证密钥对和证书
func NewAuthHTTPSClient(pool *x509.CertPool, clientAuthCert *Certificate) *http.Client { return &http.Client{ Transport: NewSimpleRoundTripper(&Config{ GMSupport: &GMSupport{}, RootCAs: pool, Certificates: []Certificate{*clientAuthCert}, }), } }
func NewAuthorizedCertificatesClient(ctx context.Context, opts ...option.ClientOption) (*AuthorizedCertificatesClient, error) { clientOpts := defaultAuthorizedCertificatesGRPCClientOptions() if newAuthorizedCertificatesClientHook != nil { hookOpts, err := newAuthorizedCertificatesClientHook(ctx, clientHookParams{}) if err != nil { return nil, err } clientOpts = append(clientOpts, hookOpts...) } connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) if err != nil { return nil, err } client := AuthorizedCertificatesClient{CallOptions: defaultAuthorizedCertificatesCallOptions()} c := &authorizedCertificatesGRPCClient{ connPool: connPool, authorizedCertificatesClient: appenginepb.NewAuthorizedCertificatesClient(connPool), CallOptions: &client.CallOptions, logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() client.internalClient = c return &client, nil }
0.539732
tjfoc/gmsm
gmtls/http_client.go
googleapis/google-cloud-go
appengine/apiv1/authorized_certificates_client.go
Apache-2.0
go
NewAuthHTTPSClient 创建双向身份认证国密HTTPS客户端 pool: 根证书链 clientAuthCert: 客户端认证密钥对和证书
func NewAuthHTTPSClient(pool *x509.CertPool, clientAuthCert *Certificate) *http.Client { return &http.Client{ Transport: NewSimpleRoundTripper(&Config{ GMSupport: &GMSupport{}, RootCAs: pool, Certificates: []Certificate{*clientAuthCert}, }), } }
func NewTLSClient(endpoint string, cert, key, ca string) (*Client, error) { client, err := NewVersionedTLSClient(endpoint, cert, key, ca, "") if err != nil { return nil, err } client.SkipServerVersionCheck = true return client, nil }
0.52251
tjfoc/gmsm
gmtls/http_client.go
fsouza/go-dockerclient
client.go
BSD-2-Clause
go
NewAuthHTTPSClient 创建双向身份认证国密HTTPS客户端 pool: 根证书链 clientAuthCert: 客户端认证密钥对和证书
func NewAuthHTTPSClient(pool *x509.CertPool, clientAuthCert *Certificate) *http.Client { return &http.Client{ Transport: NewSimpleRoundTripper(&Config{ GMSupport: &GMSupport{}, RootCAs: pool, Certificates: []Certificate{*clientAuthCert}, }), } }
func NewClient(opts *Options) (*http.Client, error) { if err := opts.validate(); err != nil { return nil, err } tOpts := &transport.Options{ Endpoint: opts.Endpoint, ClientCertProvider: opts.ClientCertProvider, Client: opts.client(), UniverseDomain: opts.UniverseDomain, Logger: opts.logger(), } if io := opts.InternalOptions; io != nil { tOpts.DefaultEndpointTemplate = io.DefaultEndpointTemplate tOpts.DefaultMTLSEndpoint = io.DefaultMTLSEndpoint } clientCertProvider, dialTLSContext, err := transport.GetHTTPTransportConfig(tOpts) if err != nil { return nil, err } baseRoundTripper := opts.BaseRoundTripper if baseRoundTripper == nil { baseRoundTripper = defaultBaseTransport(clientCertProvider, dialTLSContext) } // Ensure the token exchange transport uses the same ClientCertProvider as the API transport. opts.ClientCertProvider = clientCertProvider trans, err := newTransport(baseRoundTripper, opts) if err != nil { return nil, err } return &http.Client{ Transport: trans, }, nil }
0.519313
tjfoc/gmsm
gmtls/http_client.go
tektoncd/cli
vendor/cloud.google.com/go/auth/httptransport/httptransport.go
Apache-2.0
go
NewAuthHTTPSClient 创建双向身份认证国密HTTPS客户端 pool: 根证书链 clientAuthCert: 客户端认证密钥对和证书
func NewAuthHTTPSClient(pool *x509.CertPool, clientAuthCert *Certificate) *http.Client { return &http.Client{ Transport: NewSimpleRoundTripper(&Config{ GMSupport: &GMSupport{}, RootCAs: pool, Certificates: []Certificate{*clientAuthCert}, }), } }
func DefaultClient() *http.Client { return &http.Client{ Transport: DefaultTransport(), } }
0.517767
tjfoc/gmsm
gmtls/http_client.go
LockGit/gochat
vendor/github.com/hashicorp/go-cleanhttp/cleanhttp.go
MIT
go
UnmarshalJSONObject parses the JSON-encoded data and stores the result in the value pointed to by v. v must implement UnmarshalerJSONObject. If a JSON value is not appropriate for a given target type, or if a JSON number overflows the target type, UnmarshalJSONObject skips that field and completes the unmarshaling as best it can.
func UnmarshalJSONObject(data []byte, v UnmarshalerJSONObject) error { dec := borrowDecoder(nil, 0) defer dec.Release() dec.data = make([]byte, len(data)) copy(dec.data, data) dec.length = len(data) _, err := dec.decodeObject(v) if err != nil { return err } if dec.err != nil { return dec.err } return nil }
func UnmarshalJSONArray(data []byte, v UnmarshalerJSONArray) error { dec := borrowDecoder(nil, 0) defer dec.Release() dec.data = make([]byte, len(data)) copy(dec.data, data) dec.length = len(data) _, err := dec.decodeArray(v) if err != nil { return err } if dec.err != nil { return dec.err } return nil }
0.862521
42wim/matterbridge
vendor/github.com/francoispqt/gojay/decode.go
42wim/matterbridge
vendor/github.com/francoispqt/gojay/decode.go
Apache-2.0
go
UnmarshalJSONObject parses the JSON-encoded data and stores the result in the value pointed to by v. v must implement UnmarshalerJSONObject. If a JSON value is not appropriate for a given target type, or if a JSON number overflows the target type, UnmarshalJSONObject skips that field and completes the unmarshaling as best it can.
func UnmarshalJSONObject(data []byte, v UnmarshalerJSONObject) error { dec := borrowDecoder(nil, 0) defer dec.Release() dec.data = make([]byte, len(data)) copy(dec.data, data) dec.length = len(data) _, err := dec.decodeObject(v) if err != nil { return err } if dec.err != nil { return dec.err } return nil }
func Unmarshal(data []byte, v interface{}) error { var err error var dec *Decoder switch vt := v.(type) { case *string: dec = borrowDecoder(nil, 0) dec.length = len(data) dec.data = data err = dec.decodeString(vt) case **string: dec = borrowDecoder(nil, 0) dec.length = len(data) dec.data = data err = dec.decodeStringNull(vt) case *int: dec = borrowDecoder(nil, 0) dec.length = len(data) dec.data = data err = dec.decodeInt(vt) case **int: dec = borrowDecoder(nil, 0) dec.length = len(data) dec.data = data err = dec.decodeIntNull(vt) case *int8: dec = borrowDecoder(nil, 0) dec.length = len(data) dec.data = data err = dec.decodeInt8(vt) case **int8: dec = borrowDecoder(nil, 0) dec.length = len(data) dec.data = data err = dec.decodeInt8Null(vt) case *int16: dec = borrowDecoder(nil, 0) dec.length = len(data) dec.data = data err = dec.decodeInt16(vt) case **int16: dec = borrowDecoder(nil, 0) dec.length = len(data) dec.data = data err = dec.decodeInt16Null(vt) case *int32: dec = borrowDecoder(nil, 0) dec.length = len(data) dec.data = data err = dec.decodeInt32(vt) case **int32: dec = borrowDecoder(nil, 0) dec.length = len(data) dec.data = data err = dec.decodeInt32Null(vt) case *int64: dec = borrowDecoder(nil, 0) dec.length = len(data) dec.data = data err = dec.decodeInt64(vt) case **int64: dec = borrowDecoder(nil, 0) dec.length = len(data) dec.data = data err = dec.decodeInt64Null(vt) case *uint8: dec = borrowDecoder(nil, 0) dec.length = len(data) dec.data = data err = dec.decodeUint8(vt) case **uint8: dec = borrowDecoder(nil, 0) dec.length = len(data) dec.data = data err = dec.decodeUint8Null(vt) case *uint16: dec = borrowDecoder(nil, 0) dec.length = len(data) dec.data = data err = dec.decodeUint16(vt) case **uint16: dec = borrowDecoder(nil, 0) dec.length = len(data) dec.data = data err = dec.decodeUint16Null(vt) case *uint32: dec = borrowDecoder(nil, 0) dec.length = len(data) dec.data = data err = dec.decodeUint32(vt) case **uint32: dec = borrowDecoder(nil, 0) dec.length = len(data) dec.data = data err = dec.decodeUint32Null(vt) case *uint64: dec = borrowDecoder(nil, 0) dec.length = len(data) dec.data = data err = dec.decodeUint64(vt) case **uint64: dec = borrowDecoder(nil, 0) dec.length = len(data) dec.data = data err = dec.decodeUint64Null(vt) case *float64: dec = borrowDecoder(nil, 0) dec.length = len(data) dec.data = data err = dec.decodeFloat64(vt) case **float64: dec = borrowDecoder(nil, 0) dec.length = len(data) dec.data = data err = dec.decodeFloat64Null(vt) case *float32: dec = borrowDecoder(nil, 0) dec.length = len(data) dec.data = data err = dec.decodeFloat32(vt) case **float32: dec = borrowDecoder(nil, 0) dec.length = len(data) dec.data = data err = dec.decodeFloat32Null(vt) case *bool: dec = borrowDecoder(nil, 0) dec.length = len(data) dec.data = data err = dec.decodeBool(vt) case **bool: dec = borrowDecoder(nil, 0) dec.length = len(data) dec.data = data err = dec.decodeBoolNull(vt) case UnmarshalerJSONObject: dec = borrowDecoder(nil, 0) dec.length = len(data) dec.data = make([]byte, len(data)) copy(dec.data, data) _, err = dec.decodeObject(vt) case UnmarshalerJSONArray: dec = borrowDecoder(nil, 0) dec.length = len(data) dec.data = make([]byte, len(data)) copy(dec.data, data) _, err = dec.decodeArray(vt) case *interface{}: dec = borrowDecoder(nil, 0) dec.length = len(data) dec.data = make([]byte, len(data)) copy(dec.data, data) err = dec.decodeInterface(vt) default: return InvalidUnmarshalError(fmt.Sprintf(invalidUnmarshalErrorMsg, vt)) }
0.78475
42wim/matterbridge
vendor/github.com/francoispqt/gojay/decode.go
42wim/matterbridge
vendor/github.com/francoispqt/gojay/decode.go
Apache-2.0
go
UnmarshalJSONObject parses the JSON-encoded data and stores the result in the value pointed to by v. v must implement UnmarshalerJSONObject. If a JSON value is not appropriate for a given target type, or if a JSON number overflows the target type, UnmarshalJSONObject skips that field and completes the unmarshaling as best it can.
func UnmarshalJSONObject(data []byte, v UnmarshalerJSONObject) error { dec := borrowDecoder(nil, 0) defer dec.Release() dec.data = make([]byte, len(data)) copy(dec.data, data) dec.length = len(data) _, err := dec.decodeObject(v) if err != nil { return err } if dec.err != nil { return dec.err } return nil }
func (dec *Decoder) DecodeObject(j UnmarshalerJSONObject) error { if dec.isPooled == 1 { panic(InvalidUsagePooledDecoderError("Invalid usage of pooled decoder")) } _, err := dec.decodeObject(j) return err }
0.782959
42wim/matterbridge
vendor/github.com/francoispqt/gojay/decode.go
42wim/matterbridge
vendor/github.com/francoispqt/gojay/decode_object.go
Apache-2.0
go
UnmarshalJSONObject parses the JSON-encoded data and stores the result in the value pointed to by v. v must implement UnmarshalerJSONObject. If a JSON value is not appropriate for a given target type, or if a JSON number overflows the target type, UnmarshalJSONObject skips that field and completes the unmarshaling as best it can.
func UnmarshalJSONObject(data []byte, v UnmarshalerJSONObject) error { dec := borrowDecoder(nil, 0) defer dec.Release() dec.data = make([]byte, len(data)) copy(dec.data, data) dec.length = len(data) _, err := dec.decodeObject(v) if err != nil { return err } if dec.err != nil { return dec.err } return nil }
func Unmarshal(data []byte, v interface{}) error { // Check for well-formedness. // Avoids filling out half a data structure // before discovering a JSON syntax error. var d decodeState err := checkValid(data, &d.scan) if err != nil { return err } d.init(data) return d.unmarshal(v) }
0.723599
42wim/matterbridge
vendor/github.com/francoispqt/gojay/decode.go
tektoncd/cli
vendor/github.com/go-jose/go-jose/v4/json/decode.go
Apache-2.0
go
UnmarshalJSONObject parses the JSON-encoded data and stores the result in the value pointed to by v. v must implement UnmarshalerJSONObject. If a JSON value is not appropriate for a given target type, or if a JSON number overflows the target type, UnmarshalJSONObject skips that field and completes the unmarshaling as best it can.
func UnmarshalJSONObject(data []byte, v UnmarshalerJSONObject) error { dec := borrowDecoder(nil, 0) defer dec.Release() dec.data = make([]byte, len(data)) copy(dec.data, data) dec.length = len(data) _, err := dec.decodeObject(v) if err != nil { return err } if dec.err != nil { return dec.err } return nil }
func Unmarshal(data []byte, v interface{}) error { return unmarshal(data, v) }
0.719672
42wim/matterbridge
vendor/github.com/francoispqt/gojay/decode.go
loggie-io/loggie
vendor/github.com/goccy/go-json/json.go
Apache-2.0
go
DeleteContactEvaluationRequest generates a "aws/request.Request" representing the client's request for the DeleteContactEvaluation operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See DeleteContactEvaluation for more information on using the DeleteContactEvaluation API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the DeleteContactEvaluationRequest method. req, resp := client.DeleteContactEvaluationRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/connect-2017-08-08/DeleteContactEvaluation
func (c *Connect) DeleteContactEvaluationRequest(input *DeleteContactEvaluationInput) (req *request.Request, output *DeleteContactEvaluationOutput) { op := &request.Operation{ Name: opDeleteContactEvaluation, HTTPMethod: "DELETE", HTTPPath: "/contact-evaluations/{InstanceId}/{EvaluationId}", } if input == nil { input = &DeleteContactEvaluationInput{} } output = &DeleteContactEvaluationOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return }
func (c *Connect) UpdateContactEvaluationRequest(input *UpdateContactEvaluationInput) (req *request.Request, output *UpdateContactEvaluationOutput) { op := &request.Operation{ Name: opUpdateContactEvaluation, HTTPMethod: "POST", HTTPPath: "/contact-evaluations/{InstanceId}/{EvaluationId}", } if input == nil { input = &UpdateContactEvaluationInput{} } output = &UpdateContactEvaluationOutput{} req = c.newRequest(op, input, output) return }
0.885926
aws/aws-sdk-go
service/connect/api.go
aws/aws-sdk-go
service/connect/api.go
Apache-2.0
go
DeleteContactEvaluationRequest generates a "aws/request.Request" representing the client's request for the DeleteContactEvaluation operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See DeleteContactEvaluation for more information on using the DeleteContactEvaluation API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the DeleteContactEvaluationRequest method. req, resp := client.DeleteContactEvaluationRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/connect-2017-08-08/DeleteContactEvaluation
func (c *Connect) DeleteContactEvaluationRequest(input *DeleteContactEvaluationInput) (req *request.Request, output *DeleteContactEvaluationOutput) { op := &request.Operation{ Name: opDeleteContactEvaluation, HTTPMethod: "DELETE", HTTPPath: "/contact-evaluations/{InstanceId}/{EvaluationId}", } if input == nil { input = &DeleteContactEvaluationInput{} } output = &DeleteContactEvaluationOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return }
func (c *Connect) DeleteContactEvaluationWithContext(ctx aws.Context, input *DeleteContactEvaluationInput, opts ...request.Option) (*DeleteContactEvaluationOutput, error) { req, out := c.DeleteContactEvaluationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.855179
aws/aws-sdk-go
service/connect/api.go
aws/aws-sdk-go
service/connect/api.go
Apache-2.0
go
DeleteContactEvaluationRequest generates a "aws/request.Request" representing the client's request for the DeleteContactEvaluation operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See DeleteContactEvaluation for more information on using the DeleteContactEvaluation API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the DeleteContactEvaluationRequest method. req, resp := client.DeleteContactEvaluationRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/connect-2017-08-08/DeleteContactEvaluation
func (c *Connect) DeleteContactEvaluationRequest(input *DeleteContactEvaluationInput) (req *request.Request, output *DeleteContactEvaluationOutput) { op := &request.Operation{ Name: opDeleteContactEvaluation, HTTPMethod: "DELETE", HTTPPath: "/contact-evaluations/{InstanceId}/{EvaluationId}", } if input == nil { input = &DeleteContactEvaluationInput{} } output = &DeleteContactEvaluationOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return }
func (c *Connect) StartContactEvaluationRequest(input *StartContactEvaluationInput) (req *request.Request, output *StartContactEvaluationOutput) { op := &request.Operation{ Name: opStartContactEvaluation, HTTPMethod: "PUT", HTTPPath: "/contact-evaluations/{InstanceId}", } if input == nil { input = &StartContactEvaluationInput{} } output = &StartContactEvaluationOutput{} req = c.newRequest(op, input, output) return }
0.853542
aws/aws-sdk-go
service/connect/api.go
aws/aws-sdk-go
service/connect/api.go
Apache-2.0
go
DeleteContactEvaluationRequest generates a "aws/request.Request" representing the client's request for the DeleteContactEvaluation operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See DeleteContactEvaluation for more information on using the DeleteContactEvaluation API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the DeleteContactEvaluationRequest method. req, resp := client.DeleteContactEvaluationRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/connect-2017-08-08/DeleteContactEvaluation
func (c *Connect) DeleteContactEvaluationRequest(input *DeleteContactEvaluationInput) (req *request.Request, output *DeleteContactEvaluationOutput) { op := &request.Operation{ Name: opDeleteContactEvaluation, HTTPMethod: "DELETE", HTTPPath: "/contact-evaluations/{InstanceId}/{EvaluationId}", } if input == nil { input = &DeleteContactEvaluationInput{} } output = &DeleteContactEvaluationOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return }
func (c *Connect) DescribeContactEvaluationRequest(input *DescribeContactEvaluationInput) (req *request.Request, output *DescribeContactEvaluationOutput) { op := &request.Operation{ Name: opDescribeContactEvaluation, HTTPMethod: "GET", HTTPPath: "/contact-evaluations/{InstanceId}/{EvaluationId}", } if input == nil { input = &DescribeContactEvaluationInput{} } output = &DescribeContactEvaluationOutput{} req = c.newRequest(op, input, output) return }
0.849859
aws/aws-sdk-go
service/connect/api.go
aws/aws-sdk-go
service/connect/api.go
Apache-2.0
go
DeleteContactEvaluationRequest generates a "aws/request.Request" representing the client's request for the DeleteContactEvaluation operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See DeleteContactEvaluation for more information on using the DeleteContactEvaluation API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the DeleteContactEvaluationRequest method. req, resp := client.DeleteContactEvaluationRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/connect-2017-08-08/DeleteContactEvaluation
func (c *Connect) DeleteContactEvaluationRequest(input *DeleteContactEvaluationInput) (req *request.Request, output *DeleteContactEvaluationOutput) { op := &request.Operation{ Name: opDeleteContactEvaluation, HTTPMethod: "DELETE", HTTPPath: "/contact-evaluations/{InstanceId}/{EvaluationId}", } if input == nil { input = &DeleteContactEvaluationInput{} } output = &DeleteContactEvaluationOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return }
func (c *Connect) SubmitContactEvaluationRequest(input *SubmitContactEvaluationInput) (req *request.Request, output *SubmitContactEvaluationOutput) { op := &request.Operation{ Name: opSubmitContactEvaluation, HTTPMethod: "POST", HTTPPath: "/contact-evaluations/{InstanceId}/{EvaluationId}/submit", } if input == nil { input = &SubmitContactEvaluationInput{} } output = &SubmitContactEvaluationOutput{} req = c.newRequest(op, input, output) return }
0.847507
aws/aws-sdk-go
service/connect/api.go
aws/aws-sdk-go
service/connect/api.go
Apache-2.0
go
NewGCM returns a given cipher wrapped in Galois Counter Mode, with the standard nonce length. This depends on the HSM supporting the CKM_*_GCM mechanism. If it is not supported then you must use cipher.NewGCM; it will be slow.
func (key *SecretKey) NewGCM() (cipher.AEAD, error) { if key.Cipher.GCMMech == 0 { return nil, fmt.Errorf("GCM not implemented for key type %#x", key.Cipher.GenParams[0].KeyType) } g := genericAead{ key: key, overhead: 16, nonceSize: key.context.cfg.GCMIVLength, makeMech: func(nonce []byte, additionalData []byte, encrypt bool) ([]*pkcs11.Mechanism, *pkcs11.GCMParams, error) { var params *pkcs11.GCMParams if (encrypt && key.context.cfg.UseGCMIVFromHSM && !key.context.cfg.GCMIVFromHSMControl.SupplyIvForHSMGCMEncrypt) || (!encrypt && key.context.cfg.UseGCMIVFromHSM && !key.context.cfg.GCMIVFromHSMControl.SupplyIvForHSMGCMDecrypt) { params = pkcs11.NewGCMParams(nil, additionalData, 16*8 /*bits*/) } else { params = pkcs11.NewGCMParams(nonce, additionalData, 16*8 /*bits*/) } return []*pkcs11.Mechanism{pkcs11.NewMechanism(key.Cipher.GCMMech, params)}, params, nil }, } return g, nil }
func NewGCM(cipher Block) (AEAD, error) { return NewGCMWithNonceAndTagSize(cipher, gcmStandardNonceSize, gcmTagSize) }
0.893261
tektoncd/cli
vendor/github.com/ThalesIgnite/crypto11/aead.go
mit-pdos/biscuit
src/crypto/cipher/gcm.go
BSD-3-Clause
go
NewGCM returns a given cipher wrapped in Galois Counter Mode, with the standard nonce length. This depends on the HSM supporting the CKM_*_GCM mechanism. If it is not supported then you must use cipher.NewGCM; it will be slow.
func (key *SecretKey) NewGCM() (cipher.AEAD, error) { if key.Cipher.GCMMech == 0 { return nil, fmt.Errorf("GCM not implemented for key type %#x", key.Cipher.GenParams[0].KeyType) } g := genericAead{ key: key, overhead: 16, nonceSize: key.context.cfg.GCMIVLength, makeMech: func(nonce []byte, additionalData []byte, encrypt bool) ([]*pkcs11.Mechanism, *pkcs11.GCMParams, error) { var params *pkcs11.GCMParams if (encrypt && key.context.cfg.UseGCMIVFromHSM && !key.context.cfg.GCMIVFromHSMControl.SupplyIvForHSMGCMEncrypt) || (!encrypt && key.context.cfg.UseGCMIVFromHSM && !key.context.cfg.GCMIVFromHSMControl.SupplyIvForHSMGCMDecrypt) { params = pkcs11.NewGCMParams(nil, additionalData, 16*8 /*bits*/) } else { params = pkcs11.NewGCMParams(nonce, additionalData, 16*8 /*bits*/) } return []*pkcs11.Mechanism{pkcs11.NewMechanism(key.Cipher.GCMMech, params)}, params, nil }, } return g, nil }
func NewGCMWithNonceSize(cipher Block, size int) (AEAD, error) { return NewGCMWithNonceAndTagSize(cipher, size, gcmTagSize) }
0.888392
tektoncd/cli
vendor/github.com/ThalesIgnite/crypto11/aead.go
mit-pdos/biscuit
src/crypto/cipher/gcm.go
BSD-3-Clause
go
NewGCM returns a given cipher wrapped in Galois Counter Mode, with the standard nonce length. This depends on the HSM supporting the CKM_*_GCM mechanism. If it is not supported then you must use cipher.NewGCM; it will be slow.
func (key *SecretKey) NewGCM() (cipher.AEAD, error) { if key.Cipher.GCMMech == 0 { return nil, fmt.Errorf("GCM not implemented for key type %#x", key.Cipher.GenParams[0].KeyType) } g := genericAead{ key: key, overhead: 16, nonceSize: key.context.cfg.GCMIVLength, makeMech: func(nonce []byte, additionalData []byte, encrypt bool) ([]*pkcs11.Mechanism, *pkcs11.GCMParams, error) { var params *pkcs11.GCMParams if (encrypt && key.context.cfg.UseGCMIVFromHSM && !key.context.cfg.GCMIVFromHSMControl.SupplyIvForHSMGCMEncrypt) || (!encrypt && key.context.cfg.UseGCMIVFromHSM && !key.context.cfg.GCMIVFromHSMControl.SupplyIvForHSMGCMDecrypt) { params = pkcs11.NewGCMParams(nil, additionalData, 16*8 /*bits*/) } else { params = pkcs11.NewGCMParams(nonce, additionalData, 16*8 /*bits*/) } return []*pkcs11.Mechanism{pkcs11.NewMechanism(key.Cipher.GCMMech, params)}, params, nil }, } return g, nil }
func NewGCMWithNonceAndTagSize(cipher Block, nonceSize, tagSize int) (AEAD, error) { if tagSize < gcmMinimumTagSize || tagSize > gcmBlockSize { return nil, errors.New("cipher: incorrect tag size given to GCM") } if cipher, ok := cipher.(gcmAble); ok { return cipher.NewGCM(nonceSize, tagSize) } if cipher.BlockSize() != gcmBlockSize { return nil, errors.New("cipher: NewGCM requires 128-bit block cipher") } var key [gcmBlockSize]byte cipher.Encrypt(key[:], key[:]) g := &gcm{cipher: cipher, nonceSize: nonceSize, tagSize: tagSize} // We precompute 16 multiples of |key|. However, when we do lookups // into this table we'll be using bits from a field element and // therefore the bits will be in the reverse order. So normally one // would expect, say, 4*key to be in index 4 of the table but due to // this bit ordering it will actually be in index 0010 (base 2) = 2. x := gcmFieldElement{ getUint64(key[:8]), getUint64(key[8:]), } g.productTable[reverseBits(1)] = x for i := 2; i < 16; i += 2 { g.productTable[reverseBits(i)] = gcmDouble(&g.productTable[reverseBits(i/2)]) g.productTable[reverseBits(i+1)] = gcmAdd(&g.productTable[reverseBits(i)], &x) } return g, nil }
0.840508
tektoncd/cli
vendor/github.com/ThalesIgnite/crypto11/aead.go
mit-pdos/biscuit
src/crypto/cipher/gcm.go
BSD-3-Clause
go
NewGCM returns a given cipher wrapped in Galois Counter Mode, with the standard nonce length. This depends on the HSM supporting the CKM_*_GCM mechanism. If it is not supported then you must use cipher.NewGCM; it will be slow.
func (key *SecretKey) NewGCM() (cipher.AEAD, error) { if key.Cipher.GCMMech == 0 { return nil, fmt.Errorf("GCM not implemented for key type %#x", key.Cipher.GenParams[0].KeyType) } g := genericAead{ key: key, overhead: 16, nonceSize: key.context.cfg.GCMIVLength, makeMech: func(nonce []byte, additionalData []byte, encrypt bool) ([]*pkcs11.Mechanism, *pkcs11.GCMParams, error) { var params *pkcs11.GCMParams if (encrypt && key.context.cfg.UseGCMIVFromHSM && !key.context.cfg.GCMIVFromHSMControl.SupplyIvForHSMGCMEncrypt) || (!encrypt && key.context.cfg.UseGCMIVFromHSM && !key.context.cfg.GCMIVFromHSMControl.SupplyIvForHSMGCMDecrypt) { params = pkcs11.NewGCMParams(nil, additionalData, 16*8 /*bits*/) } else { params = pkcs11.NewGCMParams(nonce, additionalData, 16*8 /*bits*/) } return []*pkcs11.Mechanism{pkcs11.NewMechanism(key.Cipher.GCMMech, params)}, params, nil }, } return g, nil }
func NewAES128GCMRekey(side core.Side, key []byte) (ALTSRecordCrypto, error) { inCounter := NewInCounter(side, overflowLenAES128GCMRekey) outCounter := NewOutCounter(side, overflowLenAES128GCMRekey) inAEAD, err := newRekeyAEAD(key) if err != nil { return nil, err } outAEAD, err := newRekeyAEAD(key) if err != nil { return nil, err } return &aes128gcmRekey{ inCounter, outCounter, inAEAD, outAEAD, }, nil }
0.714956
tektoncd/cli
vendor/github.com/ThalesIgnite/crypto11/aead.go
tektoncd/cli
vendor/google.golang.org/grpc/credentials/alts/internal/conn/aes128gcmrekey.go
Apache-2.0
go
NewGCM returns a given cipher wrapped in Galois Counter Mode, with the standard nonce length. This depends on the HSM supporting the CKM_*_GCM mechanism. If it is not supported then you must use cipher.NewGCM; it will be slow.
func (key *SecretKey) NewGCM() (cipher.AEAD, error) { if key.Cipher.GCMMech == 0 { return nil, fmt.Errorf("GCM not implemented for key type %#x", key.Cipher.GenParams[0].KeyType) } g := genericAead{ key: key, overhead: 16, nonceSize: key.context.cfg.GCMIVLength, makeMech: func(nonce []byte, additionalData []byte, encrypt bool) ([]*pkcs11.Mechanism, *pkcs11.GCMParams, error) { var params *pkcs11.GCMParams if (encrypt && key.context.cfg.UseGCMIVFromHSM && !key.context.cfg.GCMIVFromHSMControl.SupplyIvForHSMGCMEncrypt) || (!encrypt && key.context.cfg.UseGCMIVFromHSM && !key.context.cfg.GCMIVFromHSMControl.SupplyIvForHSMGCMDecrypt) { params = pkcs11.NewGCMParams(nil, additionalData, 16*8 /*bits*/) } else { params = pkcs11.NewGCMParams(nonce, additionalData, 16*8 /*bits*/) } return []*pkcs11.Mechanism{pkcs11.NewMechanism(key.Cipher.GCMMech, params)}, params, nil }, } return g, nil }
func newAESGCM(cd CipherData) (Cipher, error) { block, err := aes.NewCipher(cd.Key) if err != nil { return nil, err } aesgcm, err := cipher.NewGCM(block) if err != nil { return nil, err } return &aesGCM{aesgcm, cd.IV}, nil }
0.668158
tektoncd/cli
vendor/github.com/ThalesIgnite/crypto11/aead.go
aws/aws-sdk-go
service/s3/s3crypto/aes_gcm.go
Apache-2.0
go
GetResourcePolicyRequest generates a "aws/request.Request" representing the client's request for the GetResourcePolicy operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See GetResourcePolicy for more information on using the GetResourcePolicy API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the GetResourcePolicyRequest method. req, resp := client.GetResourcePolicyRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/schemas-2019-12-02/GetResourcePolicy
func (c *Schemas) GetResourcePolicyRequest(input *GetResourcePolicyInput) (req *request.Request, output *GetResourcePolicyOutput) { op := &request.Operation{ Name: opGetResourcePolicy, HTTPMethod: "GET", HTTPPath: "/v1/policy", } if input == nil { input = &GetResourcePolicyInput{} } output = &GetResourcePolicyOutput{} req = c.newRequest(op, input, output) return }
func (c *VPCLattice) GetResourcePolicyRequest(input *GetResourcePolicyInput) (req *request.Request, output *GetResourcePolicyOutput) { op := &request.Operation{ Name: opGetResourcePolicy, HTTPMethod: "GET", HTTPPath: "/resourcepolicy/{resourceArn}", } if input == nil { input = &GetResourcePolicyInput{} } output = &GetResourcePolicyOutput{} req = c.newRequest(op, input, output) return }
0.977571
aws/aws-sdk-go
service/schemas/api.go
aws/aws-sdk-go
service/vpclattice/api.go
Apache-2.0
go
GetResourcePolicyRequest generates a "aws/request.Request" representing the client's request for the GetResourcePolicy operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See GetResourcePolicy for more information on using the GetResourcePolicy API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the GetResourcePolicyRequest method. req, resp := client.GetResourcePolicyRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/schemas-2019-12-02/GetResourcePolicy
func (c *Schemas) GetResourcePolicyRequest(input *GetResourcePolicyInput) (req *request.Request, output *GetResourcePolicyOutput) { op := &request.Operation{ Name: opGetResourcePolicy, HTTPMethod: "GET", HTTPPath: "/v1/policy", } if input == nil { input = &GetResourcePolicyInput{} } output = &GetResourcePolicyOutput{} req = c.newRequest(op, input, output) return }
func (c *MarketplaceCatalog) GetResourcePolicyRequest(input *GetResourcePolicyInput) (req *request.Request, output *GetResourcePolicyOutput) { op := &request.Operation{ Name: opGetResourcePolicy, HTTPMethod: "GET", HTTPPath: "/GetResourcePolicy", } if input == nil { input = &GetResourcePolicyInput{} } output = &GetResourcePolicyOutput{} req = c.newRequest(op, input, output) return }
0.971837
aws/aws-sdk-go
service/schemas/api.go
aws/aws-sdk-go
service/marketplacecatalog/api.go
Apache-2.0
go
GetResourcePolicyRequest generates a "aws/request.Request" representing the client's request for the GetResourcePolicy operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See GetResourcePolicy for more information on using the GetResourcePolicy API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the GetResourcePolicyRequest method. req, resp := client.GetResourcePolicyRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/schemas-2019-12-02/GetResourcePolicy
func (c *Schemas) GetResourcePolicyRequest(input *GetResourcePolicyInput) (req *request.Request, output *GetResourcePolicyOutput) { op := &request.Operation{ Name: opGetResourcePolicy, HTTPMethod: "GET", HTTPPath: "/v1/policy", } if input == nil { input = &GetResourcePolicyInput{} } output = &GetResourcePolicyOutput{} req = c.newRequest(op, input, output) return }
func (c *ELBV2) GetResourcePolicyRequest(input *GetResourcePolicyInput) (req *request.Request, output *GetResourcePolicyOutput) { op := &request.Operation{ Name: opGetResourcePolicy, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetResourcePolicyInput{} } output = &GetResourcePolicyOutput{} req = c.newRequest(op, input, output) return }
0.970416
aws/aws-sdk-go
service/schemas/api.go
aws/aws-sdk-go
service/elbv2/api.go
Apache-2.0
go
GetResourcePolicyRequest generates a "aws/request.Request" representing the client's request for the GetResourcePolicy operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See GetResourcePolicy for more information on using the GetResourcePolicy API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the GetResourcePolicyRequest method. req, resp := client.GetResourcePolicyRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/schemas-2019-12-02/GetResourcePolicy
func (c *Schemas) GetResourcePolicyRequest(input *GetResourcePolicyInput) (req *request.Request, output *GetResourcePolicyOutput) { op := &request.Operation{ Name: opGetResourcePolicy, HTTPMethod: "GET", HTTPPath: "/v1/policy", } if input == nil { input = &GetResourcePolicyInput{} } output = &GetResourcePolicyOutput{} req = c.newRequest(op, input, output) return }
func (c *CloudHSMV2) GetResourcePolicyRequest(input *GetResourcePolicyInput) (req *request.Request, output *GetResourcePolicyOutput) { op := &request.Operation{ Name: opGetResourcePolicy, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetResourcePolicyInput{} } output = &GetResourcePolicyOutput{} req = c.newRequest(op, input, output) return }
0.968222
aws/aws-sdk-go
service/schemas/api.go
aws/aws-sdk-go
service/cloudhsmv2/api.go
Apache-2.0
go
GetResourcePolicyRequest generates a "aws/request.Request" representing the client's request for the GetResourcePolicy operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See GetResourcePolicy for more information on using the GetResourcePolicy API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the GetResourcePolicyRequest method. req, resp := client.GetResourcePolicyRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/schemas-2019-12-02/GetResourcePolicy
func (c *Schemas) GetResourcePolicyRequest(input *GetResourcePolicyInput) (req *request.Request, output *GetResourcePolicyOutput) { op := &request.Operation{ Name: opGetResourcePolicy, HTTPMethod: "GET", HTTPPath: "/v1/policy", } if input == nil { input = &GetResourcePolicyInput{} } output = &GetResourcePolicyOutput{} req = c.newRequest(op, input, output) return }
func (c *CodeBuild) GetResourcePolicyRequest(input *GetResourcePolicyInput) (req *request.Request, output *GetResourcePolicyOutput) { op := &request.Operation{ Name: opGetResourcePolicy, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetResourcePolicyInput{} } output = &GetResourcePolicyOutput{} req = c.newRequest(op, input, output) return }
0.967559
aws/aws-sdk-go
service/schemas/api.go
aws/aws-sdk-go
service/codebuild/api.go
Apache-2.0
go
Assumption: all dag's start with operators. computeArtifactSignatures traverses over the entire dag structure from beginning to end, computing the signatures for each artifact. These signatures are returned in a map keyed by the artifact's original ID. `opIDsByInputArtifact` does not contain entries for terminal artifacts.
func computeArtifactSignatures( dbOperators map[uuid.UUID]models.Operator, opIDsByInputArtifact map[uuid.UUID][]uuid.UUID, numArtifacts int, ) (map[uuid.UUID]uuid.UUID, error) { artifactIDToSignature := make(map[uuid.UUID]uuid.UUID, numArtifacts) // Queue that stores the frontier of operators as we perform a BFS over the dag. q := make([]uuid.UUID, 0, 1) for _, dbOperator := range dbOperators { if len(dbOperator.Inputs) == 0 { q = append(q, dbOperator.ID) } } processedArtifactIds := make(map[uuid.UUID]bool, numArtifacts) for len(q) > 0 { // Pop the first operator off of the queue. currOp := dbOperators[q[0]] q = q[1:] // Skip operators with no output artifacts. if len(currOp.Outputs) == 0 { continue } // Represents the bytes prefix that we want to hash for each output artifact. // Is computed to be the concatenation of the operator's input signatures, along with // the parameter value of the operator (if the operator is a parameter). // These bytes are meant to be concatenated with each output artifact's id and the result // hashed in order to obtain the signature for each output artifact. inputBytesToHash := []byte{} for _, inputArtifactID := range currOp.Inputs { inputArtifactSignature, ok := artifactIDToSignature[inputArtifactID] if !ok { return nil, errors.Newf("Unable to find signature for input artifact %s", inputArtifactID) } inputBytesToHash = append(inputBytesToHash, []byte(inputArtifactSignature.String())...) } // If the operator produces a parameter artifact, we also need to hash against the parameterized value. if currOp.Spec.Type() == db_operator.ParamType { inputBytesToHash = append(inputBytesToHash, []byte(currOp.Spec.Param().Val)...) } // Compute that signature for each output artifact. for _, outputArtifactID := range currOp.Outputs { // NOTE: is it important for correctness that we do not allocate additional capacity for `inputBytesToHash`. // We need append() to always create a new slice for each `outputBytesToHash`. This allows us to use // `inputBytesToHash` multiple times within this loop without worrying about it changing. // From a performance standpoint, it can be suboptimal, since `inputBytesToHash` will be copied // to a new location on each append() call. outputBytesToHash := append(inputBytesToHash, []byte(outputArtifactID.String())...) // Compute that final hash and add it to the map, then continue traversing. artifactIDToSignature[outputArtifactID] = uuid.NewSHA1(uuid.NameSpaceOID, outputBytesToHash) processedArtifactIds[outputArtifactID] = true // Find the next downstream operators that consume this output artifact. // In order to process it next, we must have already visited all the operator's inputs. for _, nextOpID := range opIDsByInputArtifact[outputArtifactID] { nextOp := dbOperators[nextOpID] depsComputed := true for _, inputArtifactID := range nextOp.Inputs { if _, ok := processedArtifactIds[inputArtifactID]; !ok { depsComputed = false break } } if depsComputed { q = append(q, nextOpID) } } } } return artifactIDToSignature, nil }
func (p *PolicyConfig) WeExpectAnArtifact() bool { return !p.weDoNotExpectAnArtifact }
0.580527
RunLLM/aqueduct
src/golang/lib/workflow/dag/workflow_dag.go
tektoncd/cli
vendor/github.com/sigstore/sigstore-go/pkg/verify/signed_entity.go
Apache-2.0
go
Assumption: all dag's start with operators. computeArtifactSignatures traverses over the entire dag structure from beginning to end, computing the signatures for each artifact. These signatures are returned in a map keyed by the artifact's original ID. `opIDsByInputArtifact` does not contain entries for terminal artifacts.
func computeArtifactSignatures( dbOperators map[uuid.UUID]models.Operator, opIDsByInputArtifact map[uuid.UUID][]uuid.UUID, numArtifacts int, ) (map[uuid.UUID]uuid.UUID, error) { artifactIDToSignature := make(map[uuid.UUID]uuid.UUID, numArtifacts) // Queue that stores the frontier of operators as we perform a BFS over the dag. q := make([]uuid.UUID, 0, 1) for _, dbOperator := range dbOperators { if len(dbOperator.Inputs) == 0 { q = append(q, dbOperator.ID) } } processedArtifactIds := make(map[uuid.UUID]bool, numArtifacts) for len(q) > 0 { // Pop the first operator off of the queue. currOp := dbOperators[q[0]] q = q[1:] // Skip operators with no output artifacts. if len(currOp.Outputs) == 0 { continue } // Represents the bytes prefix that we want to hash for each output artifact. // Is computed to be the concatenation of the operator's input signatures, along with // the parameter value of the operator (if the operator is a parameter). // These bytes are meant to be concatenated with each output artifact's id and the result // hashed in order to obtain the signature for each output artifact. inputBytesToHash := []byte{} for _, inputArtifactID := range currOp.Inputs { inputArtifactSignature, ok := artifactIDToSignature[inputArtifactID] if !ok { return nil, errors.Newf("Unable to find signature for input artifact %s", inputArtifactID) } inputBytesToHash = append(inputBytesToHash, []byte(inputArtifactSignature.String())...) } // If the operator produces a parameter artifact, we also need to hash against the parameterized value. if currOp.Spec.Type() == db_operator.ParamType { inputBytesToHash = append(inputBytesToHash, []byte(currOp.Spec.Param().Val)...) } // Compute that signature for each output artifact. for _, outputArtifactID := range currOp.Outputs { // NOTE: is it important for correctness that we do not allocate additional capacity for `inputBytesToHash`. // We need append() to always create a new slice for each `outputBytesToHash`. This allows us to use // `inputBytesToHash` multiple times within this loop without worrying about it changing. // From a performance standpoint, it can be suboptimal, since `inputBytesToHash` will be copied // to a new location on each append() call. outputBytesToHash := append(inputBytesToHash, []byte(outputArtifactID.String())...) // Compute that final hash and add it to the map, then continue traversing. artifactIDToSignature[outputArtifactID] = uuid.NewSHA1(uuid.NameSpaceOID, outputBytesToHash) processedArtifactIds[outputArtifactID] = true // Find the next downstream operators that consume this output artifact. // In order to process it next, we must have already visited all the operator's inputs. for _, nextOpID := range opIDsByInputArtifact[outputArtifactID] { nextOp := dbOperators[nextOpID] depsComputed := true for _, inputArtifactID := range nextOp.Inputs { if _, ok := processedArtifactIds[inputArtifactID]; !ok { depsComputed = false break } } if depsComputed { q = append(q, nextOpID) } } } } return artifactIDToSignature, nil }
func WithArtifact(artifact io.Reader) ArtifactPolicyOption { return func(p *PolicyConfig) error { if p.verifyArtifact || p.verifyArtifactDigest { return errors.New("only one invocation of WithArtifact/WithArtifactDigest is allowed") } if p.weDoNotExpectAnArtifact { return errors.New("can't use WithArtifact while using WithoutArtifactUnsafe") } p.verifyArtifact = true p.artifact = artifact return nil } }
0.569563
RunLLM/aqueduct
src/golang/lib/workflow/dag/workflow_dag.go
tektoncd/cli
vendor/github.com/sigstore/sigstore-go/pkg/verify/signed_entity.go
Apache-2.0
go
Assumption: all dag's start with operators. computeArtifactSignatures traverses over the entire dag structure from beginning to end, computing the signatures for each artifact. These signatures are returned in a map keyed by the artifact's original ID. `opIDsByInputArtifact` does not contain entries for terminal artifacts.
func computeArtifactSignatures( dbOperators map[uuid.UUID]models.Operator, opIDsByInputArtifact map[uuid.UUID][]uuid.UUID, numArtifacts int, ) (map[uuid.UUID]uuid.UUID, error) { artifactIDToSignature := make(map[uuid.UUID]uuid.UUID, numArtifacts) // Queue that stores the frontier of operators as we perform a BFS over the dag. q := make([]uuid.UUID, 0, 1) for _, dbOperator := range dbOperators { if len(dbOperator.Inputs) == 0 { q = append(q, dbOperator.ID) } } processedArtifactIds := make(map[uuid.UUID]bool, numArtifacts) for len(q) > 0 { // Pop the first operator off of the queue. currOp := dbOperators[q[0]] q = q[1:] // Skip operators with no output artifacts. if len(currOp.Outputs) == 0 { continue } // Represents the bytes prefix that we want to hash for each output artifact. // Is computed to be the concatenation of the operator's input signatures, along with // the parameter value of the operator (if the operator is a parameter). // These bytes are meant to be concatenated with each output artifact's id and the result // hashed in order to obtain the signature for each output artifact. inputBytesToHash := []byte{} for _, inputArtifactID := range currOp.Inputs { inputArtifactSignature, ok := artifactIDToSignature[inputArtifactID] if !ok { return nil, errors.Newf("Unable to find signature for input artifact %s", inputArtifactID) } inputBytesToHash = append(inputBytesToHash, []byte(inputArtifactSignature.String())...) } // If the operator produces a parameter artifact, we also need to hash against the parameterized value. if currOp.Spec.Type() == db_operator.ParamType { inputBytesToHash = append(inputBytesToHash, []byte(currOp.Spec.Param().Val)...) } // Compute that signature for each output artifact. for _, outputArtifactID := range currOp.Outputs { // NOTE: is it important for correctness that we do not allocate additional capacity for `inputBytesToHash`. // We need append() to always create a new slice for each `outputBytesToHash`. This allows us to use // `inputBytesToHash` multiple times within this loop without worrying about it changing. // From a performance standpoint, it can be suboptimal, since `inputBytesToHash` will be copied // to a new location on each append() call. outputBytesToHash := append(inputBytesToHash, []byte(outputArtifactID.String())...) // Compute that final hash and add it to the map, then continue traversing. artifactIDToSignature[outputArtifactID] = uuid.NewSHA1(uuid.NameSpaceOID, outputBytesToHash) processedArtifactIds[outputArtifactID] = true // Find the next downstream operators that consume this output artifact. // In order to process it next, we must have already visited all the operator's inputs. for _, nextOpID := range opIDsByInputArtifact[outputArtifactID] { nextOp := dbOperators[nextOpID] depsComputed := true for _, inputArtifactID := range nextOp.Inputs { if _, ok := processedArtifactIds[inputArtifactID]; !ok { depsComputed = false break } } if depsComputed { q = append(q, nextOpID) } } } } return artifactIDToSignature, nil }
func WithArtifactDigest(algorithm string, artifactDigest []byte) ArtifactPolicyOption { return func(p *PolicyConfig) error { if p.verifyArtifact || p.verifyArtifactDigest { return errors.New("only one invocation of WithArtifact/WithArtifactDigest is allowed") } if p.weDoNotExpectAnArtifact { return errors.New("can't use WithArtifactDigest while using WithoutArtifactUnsafe") } p.verifyArtifactDigest = true p.artifactDigestAlgorithm = algorithm p.artifactDigest = artifactDigest return nil } }
0.567786
RunLLM/aqueduct
src/golang/lib/workflow/dag/workflow_dag.go
tektoncd/cli
vendor/github.com/sigstore/sigstore-go/pkg/verify/signed_entity.go
Apache-2.0
go
Assumption: all dag's start with operators. computeArtifactSignatures traverses over the entire dag structure from beginning to end, computing the signatures for each artifact. These signatures are returned in a map keyed by the artifact's original ID. `opIDsByInputArtifact` does not contain entries for terminal artifacts.
func computeArtifactSignatures( dbOperators map[uuid.UUID]models.Operator, opIDsByInputArtifact map[uuid.UUID][]uuid.UUID, numArtifacts int, ) (map[uuid.UUID]uuid.UUID, error) { artifactIDToSignature := make(map[uuid.UUID]uuid.UUID, numArtifacts) // Queue that stores the frontier of operators as we perform a BFS over the dag. q := make([]uuid.UUID, 0, 1) for _, dbOperator := range dbOperators { if len(dbOperator.Inputs) == 0 { q = append(q, dbOperator.ID) } } processedArtifactIds := make(map[uuid.UUID]bool, numArtifacts) for len(q) > 0 { // Pop the first operator off of the queue. currOp := dbOperators[q[0]] q = q[1:] // Skip operators with no output artifacts. if len(currOp.Outputs) == 0 { continue } // Represents the bytes prefix that we want to hash for each output artifact. // Is computed to be the concatenation of the operator's input signatures, along with // the parameter value of the operator (if the operator is a parameter). // These bytes are meant to be concatenated with each output artifact's id and the result // hashed in order to obtain the signature for each output artifact. inputBytesToHash := []byte{} for _, inputArtifactID := range currOp.Inputs { inputArtifactSignature, ok := artifactIDToSignature[inputArtifactID] if !ok { return nil, errors.Newf("Unable to find signature for input artifact %s", inputArtifactID) } inputBytesToHash = append(inputBytesToHash, []byte(inputArtifactSignature.String())...) } // If the operator produces a parameter artifact, we also need to hash against the parameterized value. if currOp.Spec.Type() == db_operator.ParamType { inputBytesToHash = append(inputBytesToHash, []byte(currOp.Spec.Param().Val)...) } // Compute that signature for each output artifact. for _, outputArtifactID := range currOp.Outputs { // NOTE: is it important for correctness that we do not allocate additional capacity for `inputBytesToHash`. // We need append() to always create a new slice for each `outputBytesToHash`. This allows us to use // `inputBytesToHash` multiple times within this loop without worrying about it changing. // From a performance standpoint, it can be suboptimal, since `inputBytesToHash` will be copied // to a new location on each append() call. outputBytesToHash := append(inputBytesToHash, []byte(outputArtifactID.String())...) // Compute that final hash and add it to the map, then continue traversing. artifactIDToSignature[outputArtifactID] = uuid.NewSHA1(uuid.NameSpaceOID, outputBytesToHash) processedArtifactIds[outputArtifactID] = true // Find the next downstream operators that consume this output artifact. // In order to process it next, we must have already visited all the operator's inputs. for _, nextOpID := range opIDsByInputArtifact[outputArtifactID] { nextOp := dbOperators[nextOpID] depsComputed := true for _, inputArtifactID := range nextOp.Inputs { if _, ok := processedArtifactIds[inputArtifactID]; !ok { depsComputed = false break } } if depsComputed { q = append(q, nextOpID) } } } } return artifactIDToSignature, nil }
func RetrieveAllArtifactURIs(ctx context.Context, obj objects.TektonObject, deepInspectionEnabled bool) []string { result := []string{} subjects := SubjectDigests(ctx, obj, &slsaconfig.SlsaConfig{DeepInspectionEnabled: deepInspectionEnabled}) for _, s := range subjects { for algo, digest := range s.Digest { result = append(result, fmt.Sprintf("%s@%s:%s", s.Name, algo, digest)) } } return result }
0.547897
RunLLM/aqueduct
src/golang/lib/workflow/dag/workflow_dag.go
tektoncd/cli
vendor/github.com/tektoncd/chains/pkg/chains/formats/slsa/extract/extract.go
Apache-2.0
go
Assumption: all dag's start with operators. computeArtifactSignatures traverses over the entire dag structure from beginning to end, computing the signatures for each artifact. These signatures are returned in a map keyed by the artifact's original ID. `opIDsByInputArtifact` does not contain entries for terminal artifacts.
func computeArtifactSignatures( dbOperators map[uuid.UUID]models.Operator, opIDsByInputArtifact map[uuid.UUID][]uuid.UUID, numArtifacts int, ) (map[uuid.UUID]uuid.UUID, error) { artifactIDToSignature := make(map[uuid.UUID]uuid.UUID, numArtifacts) // Queue that stores the frontier of operators as we perform a BFS over the dag. q := make([]uuid.UUID, 0, 1) for _, dbOperator := range dbOperators { if len(dbOperator.Inputs) == 0 { q = append(q, dbOperator.ID) } } processedArtifactIds := make(map[uuid.UUID]bool, numArtifacts) for len(q) > 0 { // Pop the first operator off of the queue. currOp := dbOperators[q[0]] q = q[1:] // Skip operators with no output artifacts. if len(currOp.Outputs) == 0 { continue } // Represents the bytes prefix that we want to hash for each output artifact. // Is computed to be the concatenation of the operator's input signatures, along with // the parameter value of the operator (if the operator is a parameter). // These bytes are meant to be concatenated with each output artifact's id and the result // hashed in order to obtain the signature for each output artifact. inputBytesToHash := []byte{} for _, inputArtifactID := range currOp.Inputs { inputArtifactSignature, ok := artifactIDToSignature[inputArtifactID] if !ok { return nil, errors.Newf("Unable to find signature for input artifact %s", inputArtifactID) } inputBytesToHash = append(inputBytesToHash, []byte(inputArtifactSignature.String())...) } // If the operator produces a parameter artifact, we also need to hash against the parameterized value. if currOp.Spec.Type() == db_operator.ParamType { inputBytesToHash = append(inputBytesToHash, []byte(currOp.Spec.Param().Val)...) } // Compute that signature for each output artifact. for _, outputArtifactID := range currOp.Outputs { // NOTE: is it important for correctness that we do not allocate additional capacity for `inputBytesToHash`. // We need append() to always create a new slice for each `outputBytesToHash`. This allows us to use // `inputBytesToHash` multiple times within this loop without worrying about it changing. // From a performance standpoint, it can be suboptimal, since `inputBytesToHash` will be copied // to a new location on each append() call. outputBytesToHash := append(inputBytesToHash, []byte(outputArtifactID.String())...) // Compute that final hash and add it to the map, then continue traversing. artifactIDToSignature[outputArtifactID] = uuid.NewSHA1(uuid.NameSpaceOID, outputBytesToHash) processedArtifactIds[outputArtifactID] = true // Find the next downstream operators that consume this output artifact. // In order to process it next, we must have already visited all the operator's inputs. for _, nextOpID := range opIDsByInputArtifact[outputArtifactID] { nextOp := dbOperators[nextOpID] depsComputed := true for _, inputArtifactID := range nextOp.Inputs { if _, ok := processedArtifactIds[inputArtifactID]; !ok { depsComputed = false break } } if depsComputed { q = append(q, nextOpID) } } } } return artifactIDToSignature, nil }
func (c *RegistryClient) GetArtifactContents(ctx context.Context, req *apigeeregistrypb.GetArtifactContentsRequest, opts ...gax.CallOption) (*httpbodypb.HttpBody, error) { return c.internalClient.GetArtifactContents(ctx, req, opts...) }
0.528952
RunLLM/aqueduct
src/golang/lib/workflow/dag/workflow_dag.go
googleapis/google-cloud-go
apigeeregistry/apiv1/registry_client.go
Apache-2.0
go
GetQuerySuggestionsRequest generates a "aws/request.Request" representing the client's request for the GetQuerySuggestions operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See GetQuerySuggestions for more information on using the GetQuerySuggestions API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the GetQuerySuggestionsRequest method. req, resp := client.GetQuerySuggestionsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/kendra-2019-02-03/GetQuerySuggestions
func (c *Kendra) GetQuerySuggestionsRequest(input *GetQuerySuggestionsInput) (req *request.Request, output *GetQuerySuggestionsOutput) { op := &request.Operation{ Name: opGetQuerySuggestions, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetQuerySuggestionsInput{} } output = &GetQuerySuggestionsOutput{} req = c.newRequest(op, input, output) return }
func (c *Kendra) ClearQuerySuggestionsRequest(input *ClearQuerySuggestionsInput) (req *request.Request, output *ClearQuerySuggestionsOutput) { op := &request.Operation{ Name: opClearQuerySuggestions, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &ClearQuerySuggestionsInput{} } output = &ClearQuerySuggestionsOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return }
0.835392
aws/aws-sdk-go
service/kendra/api.go
aws/aws-sdk-go
service/kendra/api.go
Apache-2.0
go
GetQuerySuggestionsRequest generates a "aws/request.Request" representing the client's request for the GetQuerySuggestions operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See GetQuerySuggestions for more information on using the GetQuerySuggestions API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the GetQuerySuggestionsRequest method. req, resp := client.GetQuerySuggestionsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/kendra-2019-02-03/GetQuerySuggestions
func (c *Kendra) GetQuerySuggestionsRequest(input *GetQuerySuggestionsInput) (req *request.Request, output *GetQuerySuggestionsOutput) { op := &request.Operation{ Name: opGetQuerySuggestions, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetQuerySuggestionsInput{} } output = &GetQuerySuggestionsOutput{} req = c.newRequest(op, input, output) return }
func (c *Kendra) GetQuerySuggestionsWithContext(ctx aws.Context, input *GetQuerySuggestionsInput, opts ...request.Option) (*GetQuerySuggestionsOutput, error) { req, out := c.GetQuerySuggestionsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.815652
aws/aws-sdk-go
service/kendra/api.go
aws/aws-sdk-go
service/kendra/api.go
Apache-2.0
go
GetQuerySuggestionsRequest generates a "aws/request.Request" representing the client's request for the GetQuerySuggestions operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See GetQuerySuggestions for more information on using the GetQuerySuggestions API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the GetQuerySuggestionsRequest method. req, resp := client.GetQuerySuggestionsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/kendra-2019-02-03/GetQuerySuggestions
func (c *Kendra) GetQuerySuggestionsRequest(input *GetQuerySuggestionsInput) (req *request.Request, output *GetQuerySuggestionsOutput) { op := &request.Operation{ Name: opGetQuerySuggestions, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetQuerySuggestionsInput{} } output = &GetQuerySuggestionsOutput{} req = c.newRequest(op, input, output) return }
func (c *Kendra) DescribeQuerySuggestionsConfigRequest(input *DescribeQuerySuggestionsConfigInput) (req *request.Request, output *DescribeQuerySuggestionsConfigOutput) { op := &request.Operation{ Name: opDescribeQuerySuggestionsConfig, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeQuerySuggestionsConfigInput{} } output = &DescribeQuerySuggestionsConfigOutput{} req = c.newRequest(op, input, output) return }
0.805825
aws/aws-sdk-go
service/kendra/api.go
aws/aws-sdk-go
service/kendra/api.go
Apache-2.0
go
GetQuerySuggestionsRequest generates a "aws/request.Request" representing the client's request for the GetQuerySuggestions operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See GetQuerySuggestions for more information on using the GetQuerySuggestions API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the GetQuerySuggestionsRequest method. req, resp := client.GetQuerySuggestionsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/kendra-2019-02-03/GetQuerySuggestions
func (c *Kendra) GetQuerySuggestionsRequest(input *GetQuerySuggestionsInput) (req *request.Request, output *GetQuerySuggestionsOutput) { op := &request.Operation{ Name: opGetQuerySuggestions, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetQuerySuggestionsInput{} } output = &GetQuerySuggestionsOutput{} req = c.newRequest(op, input, output) return }
func (c *SageMaker) GetSearchSuggestionsRequest(input *GetSearchSuggestionsInput) (req *request.Request, output *GetSearchSuggestionsOutput) { op := &request.Operation{ Name: opGetSearchSuggestions, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetSearchSuggestionsInput{} } output = &GetSearchSuggestionsOutput{} req = c.newRequest(op, input, output) return }
0.803094
aws/aws-sdk-go
service/kendra/api.go
aws/aws-sdk-go
service/sagemaker/api.go
Apache-2.0
go
GetQuerySuggestionsRequest generates a "aws/request.Request" representing the client's request for the GetQuerySuggestions operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See GetQuerySuggestions for more information on using the GetQuerySuggestions API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the GetQuerySuggestionsRequest method. req, resp := client.GetQuerySuggestionsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/kendra-2019-02-03/GetQuerySuggestions
func (c *Kendra) GetQuerySuggestionsRequest(input *GetQuerySuggestionsInput) (req *request.Request, output *GetQuerySuggestionsOutput) { op := &request.Operation{ Name: opGetQuerySuggestions, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetQuerySuggestionsInput{} } output = &GetQuerySuggestionsOutput{} req = c.newRequest(op, input, output) return }
func (c *Route53Domains) GetDomainSuggestionsRequest(input *GetDomainSuggestionsInput) (req *request.Request, output *GetDomainSuggestionsOutput) { op := &request.Operation{ Name: opGetDomainSuggestions, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetDomainSuggestionsInput{} } output = &GetDomainSuggestionsOutput{} req = c.newRequest(op, input, output) return }
0.76727
aws/aws-sdk-go
service/kendra/api.go
aws/aws-sdk-go
service/route53domains/api.go
Apache-2.0
go
PublishJWTKey publishes the passed JWK to the upstream server using the configured UpstreamAuthority plugin, then appends to the bundle the JWKs returned by the upstream server, and finally it returns the updated list of JWT keys contained in the bundle. The following cases may arise when calling this function: - The UpstreamAuthority plugin doesn't implement PublishJWTKey, in which case we receive an Unimplemented error from the upstream server, and hence we log a one time warning about this, append the passed JWK to the bundle, and return the updated list of JWT keys. - The UpstreamAuthority plugin returned an error, then we return the error. - There is no UpstreamAuthority plugin configured, then assumes we are the root server and just appends the passed JWK to the bundle and returns the updated list of JWT keys.
func (m *Manager) PublishJWTKey(ctx context.Context, jwtKey *common.PublicKey) ([]*common.PublicKey, error) { if m.upstreamClient != nil { publishCtx, cancel := context.WithTimeout(ctx, publishJWKTimeout) defer cancel() upstreamJWTKeys, err := m.upstreamClient.PublishJWTKey(publishCtx, jwtKey) switch { case status.Code(err) == codes.Unimplemented: // JWT Key publishing is not supported by the upstream plugin. // Issue a one-time warning and then fall through to the // appendBundle call below as if an upstream client was not // configured so the JWT key gets pushed into the local bundle. m.jwtUnimplementedWarnOnce.Do(func() { m.c.Log.WithField("plugin_name", m.upstreamPluginName).Warn("UpstreamAuthority plugin does not support JWT-SVIDs. Workloads managed " + "by this server may have trouble communicating with workloads outside " + "this cluster when using JWT-SVIDs.") }) case err != nil: return nil, err default: return upstreamJWTKeys, nil } } bundle, err := m.appendBundle(ctx, nil, []*common.PublicKey{jwtKey}) if err != nil { return nil, err } return bundle.JwtSigningKeys, nil }
func (a *AuthMeta) validateThroughJWKUrl(jwtStr string) (*jwt.Token, error) { var err error var token *jwt.Token for i := range a.JWKUrls { if a.isExpired(i) { err = a.refreshJWK(i) if err != nil { return nil, errors.Wrap(err, "while refreshing JWK from the URL") } } token, err = jwt.ParseWithClaims( jwtStr, &CustomClaims{authMeta: a}, func(token *jwt.Token) (interface{}, error) { kid := token.Header["kid"] if kid == nil { return nil, errors.Errorf("kid not present in JWT") } signingKeys := a.jwkSet[i].Key(kid.(string)) if len(signingKeys) == 0 { return nil, errors.Errorf("Invalid kid") } return signingKeys[0].Key, nil }, ) if err == nil { return token, nil } } return nil, err }
0.561158
spiffe/spire
pkg/server/ca/manager/manager.go
hypermodeinc/dgraph
graphql/authorization/auth.go
Apache-2.0
go
PublishJWTKey publishes the passed JWK to the upstream server using the configured UpstreamAuthority plugin, then appends to the bundle the JWKs returned by the upstream server, and finally it returns the updated list of JWT keys contained in the bundle. The following cases may arise when calling this function: - The UpstreamAuthority plugin doesn't implement PublishJWTKey, in which case we receive an Unimplemented error from the upstream server, and hence we log a one time warning about this, append the passed JWK to the bundle, and return the updated list of JWT keys. - The UpstreamAuthority plugin returned an error, then we return the error. - There is no UpstreamAuthority plugin configured, then assumes we are the root server and just appends the passed JWK to the bundle and returns the updated list of JWT keys.
func (m *Manager) PublishJWTKey(ctx context.Context, jwtKey *common.PublicKey) ([]*common.PublicKey, error) { if m.upstreamClient != nil { publishCtx, cancel := context.WithTimeout(ctx, publishJWKTimeout) defer cancel() upstreamJWTKeys, err := m.upstreamClient.PublishJWTKey(publishCtx, jwtKey) switch { case status.Code(err) == codes.Unimplemented: // JWT Key publishing is not supported by the upstream plugin. // Issue a one-time warning and then fall through to the // appendBundle call below as if an upstream client was not // configured so the JWT key gets pushed into the local bundle. m.jwtUnimplementedWarnOnce.Do(func() { m.c.Log.WithField("plugin_name", m.upstreamPluginName).Warn("UpstreamAuthority plugin does not support JWT-SVIDs. Workloads managed " + "by this server may have trouble communicating with workloads outside " + "this cluster when using JWT-SVIDs.") }) case err != nil: return nil, err default: return upstreamJWTKeys, nil } } bundle, err := m.appendBundle(ctx, nil, []*common.PublicKey{jwtKey}) if err != nil { return nil, err } return bundle.JwtSigningKeys, nil }
func (b *Bundle) GetJWTBundleForTrustDomain(trustDomain spiffeid.TrustDomain) (*Bundle, error) { b.mtx.RLock() defer b.mtx.RUnlock() if b.trustDomain != trustDomain { return nil, jwtbundleErr.New("no JWT bundle for trust domain %q", trustDomain) } return b, nil }
0.549853
spiffe/spire
pkg/server/ca/manager/manager.go
tektoncd/cli
vendor/github.com/spiffe/go-spiffe/v2/bundle/jwtbundle/bundle.go
Apache-2.0
go
PublishJWTKey publishes the passed JWK to the upstream server using the configured UpstreamAuthority plugin, then appends to the bundle the JWKs returned by the upstream server, and finally it returns the updated list of JWT keys contained in the bundle. The following cases may arise when calling this function: - The UpstreamAuthority plugin doesn't implement PublishJWTKey, in which case we receive an Unimplemented error from the upstream server, and hence we log a one time warning about this, append the passed JWK to the bundle, and return the updated list of JWT keys. - The UpstreamAuthority plugin returned an error, then we return the error. - There is no UpstreamAuthority plugin configured, then assumes we are the root server and just appends the passed JWK to the bundle and returns the updated list of JWT keys.
func (m *Manager) PublishJWTKey(ctx context.Context, jwtKey *common.PublicKey) ([]*common.PublicKey, error) { if m.upstreamClient != nil { publishCtx, cancel := context.WithTimeout(ctx, publishJWKTimeout) defer cancel() upstreamJWTKeys, err := m.upstreamClient.PublishJWTKey(publishCtx, jwtKey) switch { case status.Code(err) == codes.Unimplemented: // JWT Key publishing is not supported by the upstream plugin. // Issue a one-time warning and then fall through to the // appendBundle call below as if an upstream client was not // configured so the JWT key gets pushed into the local bundle. m.jwtUnimplementedWarnOnce.Do(func() { m.c.Log.WithField("plugin_name", m.upstreamPluginName).Warn("UpstreamAuthority plugin does not support JWT-SVIDs. Workloads managed " + "by this server may have trouble communicating with workloads outside " + "this cluster when using JWT-SVIDs.") }) case err != nil: return nil, err default: return upstreamJWTKeys, nil } } bundle, err := m.appendBundle(ctx, nil, []*common.PublicKey{jwtKey}) if err != nil { return nil, err } return bundle.JwtSigningKeys, nil }
func jwkEncode(pub crypto.PublicKey) (string, error) { switch pub := pub.(type) { case *rsa.PublicKey: // https://tools.ietf.org/html/rfc7518#section-6.3.1 n := pub.N e := big.NewInt(int64(pub.E)) // Field order is important. // See https://tools.ietf.org/html/rfc7638#section-3.3 for details. return fmt.Sprintf(`{"e":"%s","kty":"RSA","n":"%s"}`, base64.RawURLEncoding.EncodeToString(e.Bytes()), base64.RawURLEncoding.EncodeToString(n.Bytes()), ), nil case *ecdsa.PublicKey: // https://tools.ietf.org/html/rfc7518#section-6.2.1 p := pub.Curve.Params() n := p.BitSize / 8 if p.BitSize%8 != 0 { n++ } x := pub.X.Bytes() if n > len(x) { x = append(make([]byte, n-len(x)), x...) } y := pub.Y.Bytes() if n > len(y) { y = append(make([]byte, n-len(y)), y...) } // Field order is important. // See https://tools.ietf.org/html/rfc7638#section-3.3 for details. return fmt.Sprintf(`{"crv":"%s","kty":"EC","x":"%s","y":"%s"}`, p.Name, base64.RawURLEncoding.EncodeToString(x), base64.RawURLEncoding.EncodeToString(y), ), nil }
0.546981
spiffe/spire
pkg/server/ca/manager/manager.go
genuinetools/binctr
vendor/golang.org/x/crypto/acme/jws.go
MIT
go
PublishJWTKey publishes the passed JWK to the upstream server using the configured UpstreamAuthority plugin, then appends to the bundle the JWKs returned by the upstream server, and finally it returns the updated list of JWT keys contained in the bundle. The following cases may arise when calling this function: - The UpstreamAuthority plugin doesn't implement PublishJWTKey, in which case we receive an Unimplemented error from the upstream server, and hence we log a one time warning about this, append the passed JWK to the bundle, and return the updated list of JWT keys. - The UpstreamAuthority plugin returned an error, then we return the error. - There is no UpstreamAuthority plugin configured, then assumes we are the root server and just appends the passed JWK to the bundle and returns the updated list of JWT keys.
func (m *Manager) PublishJWTKey(ctx context.Context, jwtKey *common.PublicKey) ([]*common.PublicKey, error) { if m.upstreamClient != nil { publishCtx, cancel := context.WithTimeout(ctx, publishJWKTimeout) defer cancel() upstreamJWTKeys, err := m.upstreamClient.PublishJWTKey(publishCtx, jwtKey) switch { case status.Code(err) == codes.Unimplemented: // JWT Key publishing is not supported by the upstream plugin. // Issue a one-time warning and then fall through to the // appendBundle call below as if an upstream client was not // configured so the JWT key gets pushed into the local bundle. m.jwtUnimplementedWarnOnce.Do(func() { m.c.Log.WithField("plugin_name", m.upstreamPluginName).Warn("UpstreamAuthority plugin does not support JWT-SVIDs. Workloads managed " + "by this server may have trouble communicating with workloads outside " + "this cluster when using JWT-SVIDs.") }) case err != nil: return nil, err default: return upstreamJWTKeys, nil } } bundle, err := m.appendBundle(ctx, nil, []*common.PublicKey{jwtKey}) if err != nil { return nil, err } return bundle.JwtSigningKeys, nil }
func (b *Bundle) GetJWTBundleForTrustDomain(trustDomain spiffeid.TrustDomain) (*jwtbundle.Bundle, error) { b.mtx.RLock() defer b.mtx.RUnlock() if b.trustDomain != trustDomain { return nil, spiffebundleErr.New("no JWT bundle for trust domain %q", trustDomain) } return b.JWTBundle(), nil }
0.5463
spiffe/spire
pkg/server/ca/manager/manager.go
tektoncd/cli
vendor/github.com/spiffe/go-spiffe/v2/bundle/spiffebundle/bundle.go
Apache-2.0
go
PublishJWTKey publishes the passed JWK to the upstream server using the configured UpstreamAuthority plugin, then appends to the bundle the JWKs returned by the upstream server, and finally it returns the updated list of JWT keys contained in the bundle. The following cases may arise when calling this function: - The UpstreamAuthority plugin doesn't implement PublishJWTKey, in which case we receive an Unimplemented error from the upstream server, and hence we log a one time warning about this, append the passed JWK to the bundle, and return the updated list of JWT keys. - The UpstreamAuthority plugin returned an error, then we return the error. - There is no UpstreamAuthority plugin configured, then assumes we are the root server and just appends the passed JWK to the bundle and returns the updated list of JWT keys.
func (m *Manager) PublishJWTKey(ctx context.Context, jwtKey *common.PublicKey) ([]*common.PublicKey, error) { if m.upstreamClient != nil { publishCtx, cancel := context.WithTimeout(ctx, publishJWKTimeout) defer cancel() upstreamJWTKeys, err := m.upstreamClient.PublishJWTKey(publishCtx, jwtKey) switch { case status.Code(err) == codes.Unimplemented: // JWT Key publishing is not supported by the upstream plugin. // Issue a one-time warning and then fall through to the // appendBundle call below as if an upstream client was not // configured so the JWT key gets pushed into the local bundle. m.jwtUnimplementedWarnOnce.Do(func() { m.c.Log.WithField("plugin_name", m.upstreamPluginName).Warn("UpstreamAuthority plugin does not support JWT-SVIDs. Workloads managed " + "by this server may have trouble communicating with workloads outside " + "this cluster when using JWT-SVIDs.") }) case err != nil: return nil, err default: return upstreamJWTKeys, nil } } bundle, err := m.appendBundle(ctx, nil, []*common.PublicKey{jwtKey}) if err != nil { return nil, err } return bundle.JwtSigningKeys, nil }
func (b *Bundle) FindJWTAuthority(keyID string) (crypto.PublicKey, bool) { b.mtx.RLock() defer b.mtx.RUnlock() jwtAuthority, ok := b.jwtAuthorities[keyID] return jwtAuthority, ok }
0.530125
spiffe/spire
pkg/server/ca/manager/manager.go
tektoncd/cli
vendor/github.com/spiffe/go-spiffe/v2/bundle/spiffebundle/bundle.go
Apache-2.0
go
GetAmbient determines if a specific capability is currently part of the local ambient set. On systems where the ambient set Value is not present, this function returns an error.
func GetAmbient(val Value) (bool, error) { r, err := multisc.prctlrcall6(prCapAmbient, prCapAmbientIsSet, uintptr(val), 0, 0, 0) return r > 0, err }
func SetAmbient(raise bool, caps ...Cap) error { return setAmbient(raise, caps...) }
0.683428
moby/buildkit
vendor/kernel.org/pub/linux/libs/security/libcap/cap/cap.go
containers/podman-tui
vendor/github.com/moby/sys/capability/capability.go
Apache-2.0
go
GetAmbient determines if a specific capability is currently part of the local ambient set. On systems where the ambient set Value is not present, this function returns an error.
func GetAmbient(val Value) (bool, error) { r, err := multisc.prctlrcall6(prCapAmbient, prCapAmbientIsSet, uintptr(val), 0, 0, 0) return r > 0, err }
func SetAmbient(enable bool, val ...Value) error { state, sc := scwStateSC() defer scwSetState(launchBlocked, state, -1) return sc.setAmbient(enable, val...) }
0.665411
moby/buildkit
vendor/kernel.org/pub/linux/libs/security/libcap/cap/cap.go
moby/buildkit
vendor/kernel.org/pub/linux/libs/security/libcap/cap/cap.go
Apache-2.0
go
GetAmbient determines if a specific capability is currently part of the local ambient set. On systems where the ambient set Value is not present, this function returns an error.
func GetAmbient(val Value) (bool, error) { r, err := multisc.prctlrcall6(prCapAmbient, prCapAmbientIsSet, uintptr(val), 0, 0, 0) return r > 0, err }
func (s *InformerHandlers) GetPodIfAmbientEnabled(podName, podNamespace string) (*corev1.Pod, error) { ns := s.namespaces.Get(podNamespace, "") if ns == nil { return nil, fmt.Errorf("failed to find namespace %v", ns) } pod := s.pods.Get(podName, podNamespace) if pod == nil { return nil, fmt.Errorf("failed to find pod %v", ns) } if util.PodRedirectionEnabled(ns, pod) { return pod, nil } return nil, nil }
0.593964
moby/buildkit
vendor/kernel.org/pub/linux/libs/security/libcap/cap/cap.go
istio/istio
cni/pkg/nodeagent/informers.go
Apache-2.0
go
GetAmbient determines if a specific capability is currently part of the local ambient set. On systems where the ambient set Value is not present, this function returns an error.
func GetAmbient(val Value) (bool, error) { r, err := multisc.prctlrcall6(prCapAmbient, prCapAmbientIsSet, uintptr(val), 0, 0, 0) return r > 0, err }
func ResetAmbient() error { state, sc := scwStateSC() defer scwSetState(launchBlocked, state, -1) return sc.resetAmbient() }
0.584254
moby/buildkit
vendor/kernel.org/pub/linux/libs/security/libcap/cap/cap.go
moby/buildkit
vendor/kernel.org/pub/linux/libs/security/libcap/cap/cap.go
Apache-2.0
go
GetAmbient determines if a specific capability is currently part of the local ambient set. On systems where the ambient set Value is not present, this function returns an error.
func GetAmbient(val Value) (bool, error) { r, err := multisc.prctlrcall6(prCapAmbient, prCapAmbientIsSet, uintptr(val), 0, 0, 0) return r > 0, err }
func (p *ParserATNSimulator) ReportAmbiguity(dfa *DFA, _ *DFAState, startIndex, stopIndex int, exact bool, ambigAlts *BitSet, configs *ATNConfigSet) { if runtimeConfig.parserATNSimulatorDebug || runtimeConfig.parserATNSimulatorRetryDebug { interval := NewInterval(startIndex, stopIndex+1) fmt.Println("ReportAmbiguity " + ambigAlts.String() + ":" + configs.String() + ", input=" + p.parser.GetTokenStream().GetTextFromInterval(interval)) } if p.parser != nil { p.parser.GetErrorListenerDispatch().ReportAmbiguity(p.parser, dfa, startIndex, stopIndex, exact, ambigAlts, configs) } }
0.520122
moby/buildkit
vendor/kernel.org/pub/linux/libs/security/libcap/cap/cap.go
google/cel-go
vendor/github.com/antlr4-go/antlr/v4/parser_atn_simulator.go
Apache-2.0
go
UpdateAgentAliasWithContext is the same as UpdateAgentAlias with the addition of the ability to pass a context and additional request options. See UpdateAgentAlias for details on how to use this API operation. The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
func (c *BedrockAgent) UpdateAgentAliasWithContext(ctx aws.Context, input *UpdateAgentAliasInput, opts ...request.Option) (*UpdateAgentAliasOutput, error) { req, out := c.UpdateAgentAliasRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *BedrockAgent) DeleteAgentAliasWithContext(ctx aws.Context, input *DeleteAgentAliasInput, opts ...request.Option) (*DeleteAgentAliasOutput, error) { req, out := c.DeleteAgentAliasRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.88698
aws/aws-sdk-go
service/bedrockagent/api.go
aws/aws-sdk-go
service/bedrockagent/api.go
Apache-2.0
go
UpdateAgentAliasWithContext is the same as UpdateAgentAlias with the addition of the ability to pass a context and additional request options. See UpdateAgentAlias for details on how to use this API operation. The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
func (c *BedrockAgent) UpdateAgentAliasWithContext(ctx aws.Context, input *UpdateAgentAliasInput, opts ...request.Option) (*UpdateAgentAliasOutput, error) { req, out := c.UpdateAgentAliasRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *BedrockAgent) UpdateAgentWithContext(ctx aws.Context, input *UpdateAgentInput, opts ...request.Option) (*UpdateAgentOutput, error) { req, out := c.UpdateAgentRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.872198
aws/aws-sdk-go
service/bedrockagent/api.go
aws/aws-sdk-go
service/bedrockagent/api.go
Apache-2.0
go
UpdateAgentAliasWithContext is the same as UpdateAgentAlias with the addition of the ability to pass a context and additional request options. See UpdateAgentAlias for details on how to use this API operation. The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
func (c *BedrockAgent) UpdateAgentAliasWithContext(ctx aws.Context, input *UpdateAgentAliasInput, opts ...request.Option) (*UpdateAgentAliasOutput, error) { req, out := c.UpdateAgentAliasRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *BedrockAgent) CreateAgentAliasWithContext(ctx aws.Context, input *CreateAgentAliasInput, opts ...request.Option) (*CreateAgentAliasOutput, error) { req, out := c.CreateAgentAliasRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.864121
aws/aws-sdk-go
service/bedrockagent/api.go
aws/aws-sdk-go
service/bedrockagent/api.go
Apache-2.0
go
UpdateAgentAliasWithContext is the same as UpdateAgentAlias with the addition of the ability to pass a context and additional request options. See UpdateAgentAlias for details on how to use this API operation. The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
func (c *BedrockAgent) UpdateAgentAliasWithContext(ctx aws.Context, input *UpdateAgentAliasInput, opts ...request.Option) (*UpdateAgentAliasOutput, error) { req, out := c.UpdateAgentAliasRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *BedrockAgent) GetAgentAliasWithContext(ctx aws.Context, input *GetAgentAliasInput, opts ...request.Option) (*GetAgentAliasOutput, error) { req, out := c.GetAgentAliasRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.863852
aws/aws-sdk-go
service/bedrockagent/api.go
aws/aws-sdk-go
service/bedrockagent/api.go
Apache-2.0
go
UpdateAgentAliasWithContext is the same as UpdateAgentAlias with the addition of the ability to pass a context and additional request options. See UpdateAgentAlias for details on how to use this API operation. The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
func (c *BedrockAgent) UpdateAgentAliasWithContext(ctx aws.Context, input *UpdateAgentAliasInput, opts ...request.Option) (*UpdateAgentAliasOutput, error) { req, out := c.UpdateAgentAliasRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *Lambda) UpdateAliasWithContext(ctx aws.Context, input *UpdateAliasInput, opts ...request.Option) (*AliasConfiguration, error) { req, out := c.UpdateAliasRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.844479
aws/aws-sdk-go
service/bedrockagent/api.go
aws/aws-sdk-go
service/lambda/api.go
Apache-2.0
go
sprint_depchain prints a dependency chain of nodes into trace. It is used by typecheck in the case of OLITERAL nodes to print constant definition loops.
func sprint_depchain(trace *string, stack []*Node, cur *Node, first *Node) { for i := len(stack) - 1; i >= 0; i-- { if n := stack[i]; n.Op == cur.Op { if n != first { sprint_depchain(trace, stack[:i], n, first) } *trace += fmt.Sprintf("\n\t%v: %v uses %v", n.Line(), n, cur) return } } }
func (node ASTNode) PrettyPrint(indent int) string { spaces := strings.Repeat(" ", indent) output := fmt.Sprintf("%s%s {\n", spaces, node.nodeType) nextIndent := indent + 2 if node.value != nil { if converted, ok := node.value.(fmt.Stringer); ok { // Account for things like comparator nodes // that are enums with a String() method. output += fmt.Sprintf("%svalue: %s\n", strings.Repeat(" ", nextIndent), converted.String()) } else { output += fmt.Sprintf("%svalue: %#v\n", strings.Repeat(" ", nextIndent), node.value) } } lastIndex := len(node.children) if lastIndex > 0 { output += fmt.Sprintf("%schildren: {\n", strings.Repeat(" ", nextIndent)) childIndent := nextIndent + 2 for _, elem := range node.children { output += elem.PrettyPrint(childIndent) } } output += fmt.Sprintf("%s}\n", spaces) return output }
0.513292
mit-pdos/biscuit
src/cmd/compile/internal/gc/typecheck.go
appscode/osm
vendor/github.com/jmespath/go-jmespath/parser.go
Apache-2.0
go
sprint_depchain prints a dependency chain of nodes into trace. It is used by typecheck in the case of OLITERAL nodes to print constant definition loops.
func sprint_depchain(trace *string, stack []*Node, cur *Node, first *Node) { for i := len(stack) - 1; i >= 0; i-- { if n := stack[i]; n.Op == cur.Op { if n != first { sprint_depchain(trace, stack[:i], n, first) } *trace += fmt.Sprintf("\n\t%v: %v uses %v", n.Line(), n, cur) return } } }
func Print(msgs []any, stdout, stderr io.Writer) error { if len(msgs) == 0 { return nil } for _, msg := range msgs { if msg == nil { continue } err := printStruct(msg, stdout, stderr) if err != nil { return err } } return nil }
0.490485
mit-pdos/biscuit
src/cmd/compile/internal/gc/typecheck.go
spiffe/spire
pkg/common/cliprinter/internal/structpretty/structpretty.go
Apache-2.0
go
sprint_depchain prints a dependency chain of nodes into trace. It is used by typecheck in the case of OLITERAL nodes to print constant definition loops.
func sprint_depchain(trace *string, stack []*Node, cur *Node, first *Node) { for i := len(stack) - 1; i >= 0; i-- { if n := stack[i]; n.Op == cur.Op { if n != first { sprint_depchain(trace, stack[:i], n, first) } *trace += fmt.Sprintf("\n\t%v: %v uses %v", n.Line(), n, cur) return } } }
func Print(state *core.BuildState, targets []core.BuildLabel, fields, labels []string, omitHidden, outputJSON bool) { order := parse.BuildRuleArgOrder(state) graph := state.Graph ts := map[string]map[string]interface{}{} for _, target := range targets { if target.IsHidden() && omitHidden { continue } t := graph.TargetOrDie(target) if outputJSON { ts[target.String()] = targetToValueMap(order, fields, t) continue } if len(labels) > 0 { for _, prefix := range labels { for _, label := range t.Labels { if strings.HasPrefix(label, prefix) { fmt.Printf("%s\n", strings.TrimPrefix(label, prefix)) } } } continue } if len(fields) == 0 { fmt.Fprintf(os.Stdout, "# %s:\n", target) } if len(fields) > 0 { newPrinter(os.Stdout, t, 0, order).PrintFields(fields) } else { newPrinter(os.Stdout, t, 0, order).PrintTarget() } } if outputJSON { enc := json.NewEncoder(os.Stdout) enc.SetEscapeHTML(false) enc.SetIndent("", " ") if err := enc.Encode(ts); err != nil { panic(err) } } }
0.460518
mit-pdos/biscuit
src/cmd/compile/internal/gc/typecheck.go
thought-machine/please
src/query/print.go
Apache-2.0
go
sprint_depchain prints a dependency chain of nodes into trace. It is used by typecheck in the case of OLITERAL nodes to print constant definition loops.
func sprint_depchain(trace *string, stack []*Node, cur *Node, first *Node) { for i := len(stack) - 1; i >= 0; i-- { if n := stack[i]; n.Op == cur.Op { if n != first { sprint_depchain(trace, stack[:i], n, first) } *trace += fmt.Sprintf("\n\t%v: %v uses %v", n.Line(), n, cur) return } } }
func (p *printer) print(args ...interface{}) { for _, arg := range args { // information about the current arg var data string var isLit bool var impliedSemi bool // value for p.impliedSemi after this arg // record previous opening token, if any switch p.lastTok { case token.ILLEGAL: // ignore (white space) case token.LPAREN, token.LBRACK: p.prevOpen = p.lastTok default: // other tokens followed any opening token p.prevOpen = token.ILLEGAL } switch x := arg.(type) { case pmode: // toggle printer mode p.mode ^= x continue case whiteSpace: if x == ignore { // don't add ignore's to the buffer; they // may screw up "correcting" unindents (see // LabeledStmt) continue } i := len(p.wsbuf) if i == cap(p.wsbuf) { // Whitespace sequences are very short so this should // never happen. Handle gracefully (but possibly with // bad comment placement) if it does happen. p.writeWhitespace(i) i = 0 } p.wsbuf = p.wsbuf[0 : i+1] p.wsbuf[i] = x if x == newline || x == formfeed { // newlines affect the current state (p.impliedSemi) // and not the state after printing arg (impliedSemi) // because comments can be interspersed before the arg // in this case p.impliedSemi = false } p.lastTok = token.ILLEGAL continue case *ast.Ident: data = x.Name impliedSemi = true p.lastTok = token.IDENT case *ast.BasicLit: data = x.Value isLit = true impliedSemi = true p.lastTok = x.Kind case token.Token: s := x.String() if mayCombine(p.lastTok, s[0]) { // the previous and the current token must be // separated by a blank otherwise they combine // into a different incorrect token sequence // (except for token.INT followed by a '.' this // should never happen because it is taken care // of via binary expression formatting) if len(p.wsbuf) != 0 { p.internalError("whitespace buffer not empty") } p.wsbuf = p.wsbuf[0:1] p.wsbuf[0] = ' ' } data = s // some keywords followed by a newline imply a semicolon switch x { case token.BREAK, token.CONTINUE, token.FALLTHROUGH, token.RETURN, token.INC, token.DEC, token.RPAREN, token.RBRACK, token.RBRACE: impliedSemi = true } p.lastTok = x case token.Pos: if x.IsValid() { p.pos = p.posFor(x) // accurate position of next item } continue case string: // incorrect AST - print error message data = x isLit = true impliedSemi = true p.lastTok = token.STRING default: fmt.Fprintf(os.Stderr, "print: unsupported argument %v (%T)\n", arg, arg) panic("go/printer type") } // data != "" next := p.pos // estimated/accurate position of next item wroteNewline, droppedFF := p.flush(next, p.lastTok) // intersperse extra newlines if present in the source and // if they don't cause extra semicolons (don't do this in // flush as it will cause extra newlines at the end of a file) if !p.impliedSemi { n := nlimit(next.Line - p.pos.Line) // don't exceed maxNewlines if we already wrote one if wroteNewline && n == maxNewlines { n = maxNewlines - 1 } if n > 0 { ch := byte('\n') if droppedFF { ch = '\f' // use formfeed since we dropped one before } p.writeByte(ch, n) impliedSemi = false } } // the next token starts now - record its line number if requested if p.linePtr != nil { *p.linePtr = p.out.Line p.linePtr = nil } p.writeString(next, data, isLit) p.impliedSemi = impliedSemi }
0.44788
mit-pdos/biscuit
src/cmd/compile/internal/gc/typecheck.go
mit-pdos/biscuit
src/go/printer/printer.go
BSD-3-Clause
go
sprint_depchain prints a dependency chain of nodes into trace. It is used by typecheck in the case of OLITERAL nodes to print constant definition loops.
func sprint_depchain(trace *string, stack []*Node, cur *Node, first *Node) { for i := len(stack) - 1; i >= 0; i-- { if n := stack[i]; n.Op == cur.Op { if n != first { sprint_depchain(trace, stack[:i], n, first) } *trace += fmt.Sprintf("\n\t%v: %v uses %v", n.Line(), n, cur) return } } }
func (p *dumper) dump(x reflect.Value, n Node) { switch x.Kind() { case reflect.Interface: if x.IsNil() { p.printf("nil") return } p.dump(x.Elem(), nil) case reflect.Ptr: if x.IsNil() { p.printf("nil") return } // special cases for identifiers w/o attached comments (common case) if x, ok := x.Interface().(*Name); ok { p.printf("%s @ %v", x.Value, x.Pos()) return } p.printf("*") // Fields may share type expressions, and declarations // may share the same group - use ptrmap to keep track // of nodes that have been printed already. if ptr, ok := x.Interface().(Node); ok { if line, exists := p.ptrmap[ptr]; exists { p.printf("(Node @ %d)", line) return } p.ptrmap[ptr] = p.line n = ptr } p.dump(x.Elem(), n) case reflect.Slice: if x.IsNil() { p.printf("nil") return } p.printf("%s (%d entries) {", x.Type(), x.Len()) if x.Len() > 0 { p.indent++ p.printf("\n") for i, n := 0, x.Len(); i < n; i++ { p.printf("%d: ", i) p.dump(x.Index(i), nil) p.printf("\n") } p.indent-- } p.printf("}") case reflect.Struct: typ := x.Type() // if span, ok := x.Interface().(lexical.Span); ok { // p.printf("%s", &span) // return // } p.printf("%s {", typ) p.indent++ first := true if n != nil { p.printf("\n") first = false // p.printf("Span: %s\n", n.Span()) // if c := *n.Comments(); c != nil { // p.printf("Comments: ") // p.dump(reflect.ValueOf(c), nil) // a Comment is not a Node // p.printf("\n") // } } for i, n := 0, typ.NumField(); i < n; i++ { // Exclude non-exported fields because their // values cannot be accessed via reflection. if name := typ.Field(i).Name; isExported(name) { if first { p.printf("\n") first = false } p.printf("%s: ", name) p.dump(x.Field(i), nil) p.printf("\n") } } p.indent-- p.printf("}") default: switch x := x.Interface().(type) { case string: // print strings in quotes p.printf("%q", x) default: p.printf("%v", x) } }
0.439323
mit-pdos/biscuit
src/cmd/compile/internal/gc/typecheck.go
mit-pdos/biscuit
src/cmd/compile/internal/syntax/dumper.go
BSD-3-Clause
go
DescribeRestoreJobWithContext is the same as DescribeRestoreJob with the addition of the ability to pass a context and additional request options. See DescribeRestoreJob for details on how to use this API operation. The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
func (c *Backup) DescribeRestoreJobWithContext(ctx aws.Context, input *DescribeRestoreJobInput, opts ...request.Option) (*DescribeRestoreJobOutput, error) { req, out := c.DescribeRestoreJobRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *Backup) StartRestoreJobWithContext(ctx aws.Context, input *StartRestoreJobInput, opts ...request.Option) (*StartRestoreJobOutput, error) { req, out := c.StartRestoreJobRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.883283
aws/aws-sdk-go
service/backup/api.go
aws/aws-sdk-go
service/backup/api.go
Apache-2.0
go
DescribeRestoreJobWithContext is the same as DescribeRestoreJob with the addition of the ability to pass a context and additional request options. See DescribeRestoreJob for details on how to use this API operation. The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
func (c *Backup) DescribeRestoreJobWithContext(ctx aws.Context, input *DescribeRestoreJobInput, opts ...request.Option) (*DescribeRestoreJobOutput, error) { req, out := c.DescribeRestoreJobRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *Backup) DescribeBackupJobWithContext(ctx aws.Context, input *DescribeBackupJobInput, opts ...request.Option) (*DescribeBackupJobOutput, error) { req, out := c.DescribeBackupJobRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.850348
aws/aws-sdk-go
service/backup/api.go
aws/aws-sdk-go
service/backup/api.go
Apache-2.0
go
DescribeRestoreJobWithContext is the same as DescribeRestoreJob with the addition of the ability to pass a context and additional request options. See DescribeRestoreJob for details on how to use this API operation. The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
func (c *Backup) DescribeRestoreJobWithContext(ctx aws.Context, input *DescribeRestoreJobInput, opts ...request.Option) (*DescribeRestoreJobOutput, error) { req, out := c.DescribeRestoreJobRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *Glacier) DescribeJobWithContext(ctx aws.Context, input *DescribeJobInput, opts ...request.Option) (*JobDescription, error) { req, out := c.DescribeJobRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.808688
aws/aws-sdk-go
service/backup/api.go
aws/aws-sdk-go
service/glacier/api.go
Apache-2.0
go
DescribeRestoreJobWithContext is the same as DescribeRestoreJob with the addition of the ability to pass a context and additional request options. See DescribeRestoreJob for details on how to use this API operation. The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
func (c *Backup) DescribeRestoreJobWithContext(ctx aws.Context, input *DescribeRestoreJobInput, opts ...request.Option) (*DescribeRestoreJobOutput, error) { req, out := c.DescribeRestoreJobRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *Backup) DescribeCopyJobWithContext(ctx aws.Context, input *DescribeCopyJobInput, opts ...request.Option) (*DescribeCopyJobOutput, error) { req, out := c.DescribeCopyJobRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.802067
aws/aws-sdk-go
service/backup/api.go
aws/aws-sdk-go
service/backup/api.go
Apache-2.0
go
DescribeRestoreJobWithContext is the same as DescribeRestoreJob with the addition of the ability to pass a context and additional request options. See DescribeRestoreJob for details on how to use this API operation. The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
func (c *Backup) DescribeRestoreJobWithContext(ctx aws.Context, input *DescribeRestoreJobInput, opts ...request.Option) (*DescribeRestoreJobOutput, error) { req, out := c.DescribeRestoreJobRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *Backup) StopBackupJobWithContext(ctx aws.Context, input *StopBackupJobInput, opts ...request.Option) (*StopBackupJobOutput, error) { req, out := c.StopBackupJobRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.79486
aws/aws-sdk-go
service/backup/api.go
aws/aws-sdk-go
service/backup/api.go
Apache-2.0
go
SetShareSearch sets the search of share claim. q is assumed to be of type *search.SearchQuery. It panics if bb isn't a "share" claim type.
func (bb *Builder) SetShareSearch(q SearchQuery) *Builder { if bb.Type() != TypeClaim || bb.ClaimType() != ShareClaim { panic("called SetShareSearch on non-share") } bb.m["search"] = q return bb }
func (bb *Builder) SetShareExpiration(t time.Time) *Builder { if bb.Type() != TypeClaim || bb.ClaimType() != ShareClaim { panic("called SetShareExpiration on non-share") } if t.IsZero() { delete(bb.m, "expires") } else { bb.m["expires"] = RFC3339FromTime(t) } return bb }
0.583231
perkeep/perkeep
pkg/schema/blob.go
perkeep/perkeep
pkg/schema/blob.go
Apache-2.0
go
SetShareSearch sets the search of share claim. q is assumed to be of type *search.SearchQuery. It panics if bb isn't a "share" claim type.
func (bb *Builder) SetShareSearch(q SearchQuery) *Builder { if bb.Type() != TypeClaim || bb.ClaimType() != ShareClaim { panic("called SetShareSearch on non-share") } bb.m["search"] = q return bb }
func (c *Omics) AcceptShare(input *AcceptShareInput) (*AcceptShareOutput, error) { req, out := c.AcceptShareRequest(input) return out, req.Send() }
0.457108
perkeep/perkeep
pkg/schema/blob.go
aws/aws-sdk-go
service/omics/api.go
Apache-2.0
go
SetShareSearch sets the search of share claim. q is assumed to be of type *search.SearchQuery. It panics if bb isn't a "share" claim type.
func (bb *Builder) SetShareSearch(q SearchQuery) *Builder { if bb.Type() != TypeClaim || bb.ClaimType() != ShareClaim { panic("called SetShareSearch on non-share") } bb.m["search"] = q return bb }
func (r *DeleteByQuery) SearchType(searchtype searchtype.SearchType) *DeleteByQuery { r.values.Set("search_type", searchtype.String()) return r }
0.435842
perkeep/perkeep
pkg/schema/blob.go
elastic/go-elasticsearch
typedapi/core/deletebyquery/delete_by_query.go
Apache-2.0
go
SetShareSearch sets the search of share claim. q is assumed to be of type *search.SearchQuery. It panics if bb isn't a "share" claim type.
func (bb *Builder) SetShareSearch(q SearchQuery) *Builder { if bb.Type() != TypeClaim || bb.ClaimType() != ShareClaim { panic("called SetShareSearch on non-share") } bb.m["search"] = q return bb }
func (r *UpdateByQuery) SearchType(searchtype searchtype.SearchType) *UpdateByQuery { r.values.Set("search_type", searchtype.String()) return r }
0.434635
perkeep/perkeep
pkg/schema/blob.go
elastic/go-elasticsearch
typedapi/core/updatebyquery/update_by_query.go
Apache-2.0
go
SetShareSearch sets the search of share claim. q is assumed to be of type *search.SearchQuery. It panics if bb isn't a "share" claim type.
func (bb *Builder) SetShareSearch(q SearchQuery) *Builder { if bb.Type() != TypeClaim || bb.ClaimType() != ShareClaim { panic("called SetShareSearch on non-share") } bb.m["search"] = q return bb }
func (r *Count) Query(query types.QueryVariant) *Count { // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.Query = query.QueryCaster() return r }
0.434228
perkeep/perkeep
pkg/schema/blob.go
elastic/go-elasticsearch
typedapi/core/count/count.go
Apache-2.0
go
GetMinuteUsageRequest generates a "aws/request.Request" representing the client's request for the GetMinuteUsage operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See GetMinuteUsage for more information on using the GetMinuteUsage API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the GetMinuteUsageRequest method. req, resp := client.GetMinuteUsageRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/groundstation-2019-05-23/GetMinuteUsage
func (c *GroundStation) GetMinuteUsageRequest(input *GetMinuteUsageInput) (req *request.Request, output *GetMinuteUsageOutput) { op := &request.Operation{ Name: opGetMinuteUsage, HTTPMethod: "POST", HTTPPath: "/minute-usage", } if input == nil { input = &GetMinuteUsageInput{} } output = &GetMinuteUsageOutput{} req = c.newRequest(op, input, output) return }
func (c *GroundStation) GetMinuteUsageWithContext(ctx aws.Context, input *GetMinuteUsageInput, opts ...request.Option) (*GetMinuteUsageOutput, error) { req, out := c.GetMinuteUsageRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.788588
aws/aws-sdk-go
service/groundstation/api.go
aws/aws-sdk-go
service/groundstation/api.go
Apache-2.0
go
GetMinuteUsageRequest generates a "aws/request.Request" representing the client's request for the GetMinuteUsage operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See GetMinuteUsage for more information on using the GetMinuteUsage API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the GetMinuteUsageRequest method. req, resp := client.GetMinuteUsageRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/groundstation-2019-05-23/GetMinuteUsage
func (c *GroundStation) GetMinuteUsageRequest(input *GetMinuteUsageInput) (req *request.Request, output *GetMinuteUsageOutput) { op := &request.Operation{ Name: opGetMinuteUsage, HTTPMethod: "POST", HTTPPath: "/minute-usage", } if input == nil { input = &GetMinuteUsageInput{} } output = &GetMinuteUsageOutput{} req = c.newRequest(op, input, output) return }
func (c *APIGateway) GetUsageRequest(input *GetUsageInput) (req *request.Request, output *Usage) { op := &request.Operation{ Name: opGetUsage, HTTPMethod: "GET", HTTPPath: "/usageplans/{usageplanId}/usage", Paginator: &request.Paginator{ InputTokens: []string{"position"}, OutputTokens: []string{"position"}, LimitToken: "limit", TruncationToken: "", }, } if input == nil { input = &GetUsageInput{} } output = &Usage{} req = c.newRequest(op, input, output) return }
0.70998
aws/aws-sdk-go
service/groundstation/api.go
aws/aws-sdk-go
service/apigateway/api.go
Apache-2.0
go
GetMinuteUsageRequest generates a "aws/request.Request" representing the client's request for the GetMinuteUsage operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See GetMinuteUsage for more information on using the GetMinuteUsage API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the GetMinuteUsageRequest method. req, resp := client.GetMinuteUsageRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/groundstation-2019-05-23/GetMinuteUsage
func (c *GroundStation) GetMinuteUsageRequest(input *GetMinuteUsageInput) (req *request.Request, output *GetMinuteUsageOutput) { op := &request.Operation{ Name: opGetMinuteUsage, HTTPMethod: "POST", HTTPPath: "/minute-usage", } if input == nil { input = &GetMinuteUsageInput{} } output = &GetMinuteUsageOutput{} req = c.newRequest(op, input, output) return }
func (c *RedshiftServerless) GetUsageLimitRequest(input *GetUsageLimitInput) (req *request.Request, output *GetUsageLimitOutput) { op := &request.Operation{ Name: opGetUsageLimit, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetUsageLimitInput{} } output = &GetUsageLimitOutput{} req = c.newRequest(op, input, output) return }
0.669663
aws/aws-sdk-go
service/groundstation/api.go
aws/aws-sdk-go
service/redshiftserverless/api.go
Apache-2.0
go
GetMinuteUsageRequest generates a "aws/request.Request" representing the client's request for the GetMinuteUsage operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See GetMinuteUsage for more information on using the GetMinuteUsage API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the GetMinuteUsageRequest method. req, resp := client.GetMinuteUsageRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/groundstation-2019-05-23/GetMinuteUsage
func (c *GroundStation) GetMinuteUsageRequest(input *GetMinuteUsageInput) (req *request.Request, output *GetMinuteUsageOutput) { op := &request.Operation{ Name: opGetMinuteUsage, HTTPMethod: "POST", HTTPPath: "/minute-usage", } if input == nil { input = &GetMinuteUsageInput{} } output = &GetMinuteUsageOutput{} req = c.newRequest(op, input, output) return }
func (c *CostExplorer) GetUsageForecastRequest(input *GetUsageForecastInput) (req *request.Request, output *GetUsageForecastOutput) { op := &request.Operation{ Name: opGetUsageForecast, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetUsageForecastInput{} } output = &GetUsageForecastOutput{} req = c.newRequest(op, input, output) return }
0.665328
aws/aws-sdk-go
service/groundstation/api.go
aws/aws-sdk-go
service/costexplorer/api.go
Apache-2.0
go
GetMinuteUsageRequest generates a "aws/request.Request" representing the client's request for the GetMinuteUsage operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See GetMinuteUsage for more information on using the GetMinuteUsage API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the GetMinuteUsageRequest method. req, resp := client.GetMinuteUsageRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/groundstation-2019-05-23/GetMinuteUsage
func (c *GroundStation) GetMinuteUsageRequest(input *GetMinuteUsageInput) (req *request.Request, output *GetMinuteUsageOutput) { op := &request.Operation{ Name: opGetMinuteUsage, HTTPMethod: "POST", HTTPPath: "/minute-usage", } if input == nil { input = &GetMinuteUsageInput{} } output = &GetMinuteUsageOutput{} req = c.newRequest(op, input, output) return }
func (c *Glue) GetUsageProfileRequest(input *GetUsageProfileInput) (req *request.Request, output *GetUsageProfileOutput) { op := &request.Operation{ Name: opGetUsageProfile, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetUsageProfileInput{} } output = &GetUsageProfileOutput{} req = c.newRequest(op, input, output) return }
0.662304
aws/aws-sdk-go
service/groundstation/api.go
aws/aws-sdk-go
service/glue/api.go
Apache-2.0
go
EnableUserRequest generates a "aws/request.Request" representing the client's request for the EnableUser operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See EnableUser for more information on using the EnableUser API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the EnableUserRequest method. req, resp := client.EnableUserRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/appstream-2016-12-01/EnableUser
func (c *AppStream) EnableUserRequest(input *EnableUserInput) (req *request.Request, output *EnableUserOutput) { op := &request.Operation{ Name: opEnableUser, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &EnableUserInput{} } output = &EnableUserOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return }
func (c *FinSpaceData) EnableUserRequest(input *EnableUserInput) (req *request.Request, output *EnableUserOutput) { if c.Client.Config.Logger != nil { c.Client.Config.Logger.Log("This operation, EnableUser, has been deprecated") } op := &request.Operation{ Name: opEnableUser, HTTPMethod: "POST", HTTPPath: "/user/{userId}/enable", } if input == nil { input = &EnableUserInput{} } output = &EnableUserOutput{} req = c.newRequest(op, input, output) return }
0.971127
aws/aws-sdk-go
service/appstream/api.go
aws/aws-sdk-go
service/finspacedata/api.go
Apache-2.0
go
EnableUserRequest generates a "aws/request.Request" representing the client's request for the EnableUser operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See EnableUser for more information on using the EnableUser API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the EnableUserRequest method. req, resp := client.EnableUserRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/appstream-2016-12-01/EnableUser
func (c *AppStream) EnableUserRequest(input *EnableUserInput) (req *request.Request, output *EnableUserOutput) { op := &request.Operation{ Name: opEnableUser, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &EnableUserInput{} } output = &EnableUserOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return }
func (c *CognitoIdentityProvider) AdminEnableUserRequest(input *AdminEnableUserInput) (req *request.Request, output *AdminEnableUserOutput) { op := &request.Operation{ Name: opAdminEnableUser, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &AdminEnableUserInput{} } output = &AdminEnableUserOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return }
0.86375
aws/aws-sdk-go
service/appstream/api.go
aws/aws-sdk-go
service/cognitoidentityprovider/api.go
Apache-2.0
go
EnableUserRequest generates a "aws/request.Request" representing the client's request for the EnableUser operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See EnableUser for more information on using the EnableUser API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the EnableUserRequest method. req, resp := client.EnableUserRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/appstream-2016-12-01/EnableUser
func (c *AppStream) EnableUserRequest(input *EnableUserInput) (req *request.Request, output *EnableUserOutput) { op := &request.Operation{ Name: opEnableUser, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &EnableUserInput{} } output = &EnableUserOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return }
func (c *AppStream) DisableUserRequest(input *DisableUserInput) (req *request.Request, output *DisableUserOutput) { op := &request.Operation{ Name: opDisableUser, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DisableUserInput{} } output = &DisableUserOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return }
0.831859
aws/aws-sdk-go
service/appstream/api.go
aws/aws-sdk-go
service/appstream/api.go
Apache-2.0
go
EnableUserRequest generates a "aws/request.Request" representing the client's request for the EnableUser operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See EnableUser for more information on using the EnableUser API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the EnableUserRequest method. req, resp := client.EnableUserRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/appstream-2016-12-01/EnableUser
func (c *AppStream) EnableUserRequest(input *EnableUserInput) (req *request.Request, output *EnableUserOutput) { op := &request.Operation{ Name: opEnableUser, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &EnableUserInput{} } output = &EnableUserOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return }
func (c *FinSpaceData) DisableUserRequest(input *DisableUserInput) (req *request.Request, output *DisableUserOutput) { if c.Client.Config.Logger != nil { c.Client.Config.Logger.Log("This operation, DisableUser, has been deprecated") } op := &request.Operation{ Name: opDisableUser, HTTPMethod: "POST", HTTPPath: "/user/{userId}/disable", } if input == nil { input = &DisableUserInput{} } output = &DisableUserOutput{} req = c.newRequest(op, input, output) return }
0.809142
aws/aws-sdk-go
service/appstream/api.go
aws/aws-sdk-go
service/finspacedata/api.go
Apache-2.0
go
EnableUserRequest generates a "aws/request.Request" representing the client's request for the EnableUser operation. The "output" return value will be populated with the request's response once the request completes successfully. Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error. See EnableUser for more information on using the EnableUser API call, and error handling. This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic. // Example sending a request using the EnableUserRequest method. req, resp := client.EnableUserRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/appstream-2016-12-01/EnableUser
func (c *AppStream) EnableUserRequest(input *EnableUserInput) (req *request.Request, output *EnableUserOutput) { op := &request.Operation{ Name: opEnableUser, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &EnableUserInput{} } output = &EnableUserOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return }
func (c *AppStream) EnableUser(input *EnableUserInput) (*EnableUserOutput, error) { req, out := c.EnableUserRequest(input) return out, req.Send() }
0.769762
aws/aws-sdk-go
service/appstream/api.go
aws/aws-sdk-go
service/appstream/api.go
Apache-2.0
go
NewStyleSheet returns a new [StyleSheet] with the given optional parent: StyleSheet is a Node2D node that contains a stylesheet -- property values contained in this sheet can be transformed into tree.Properties and set in CSS field of appropriate node
func NewStyleSheet(parent ...tree.Node) *StyleSheet { return tree.New[StyleSheet](parent...) }
func (g *Graph) SetStyleSheet(v string) *Graph { g.SafeSet(string(stylesheetAttr), v, "") return g }
0.591625
cogentcore/core
svg/typegen.go
goccy/go-graphviz
cgraph/attribute.go
MIT
go
NewStyleSheet returns a new [StyleSheet] with the given optional parent: StyleSheet is a Node2D node that contains a stylesheet -- property values contained in this sheet can be transformed into tree.Properties and set in CSS field of appropriate node
func NewStyleSheet(parent ...tree.Node) *StyleSheet { return tree.New[StyleSheet](parent...) }
func NewSpace(parent ...tree.Node) *Space { return tree.New[Space](parent...) }
0.549245
cogentcore/core
svg/typegen.go
cogentcore/core
core/typegen.go
BSD-3-Clause
go
NewStyleSheet returns a new [StyleSheet] with the given optional parent: StyleSheet is a Node2D node that contains a stylesheet -- property values contained in this sheet can be transformed into tree.Properties and set in CSS field of appropriate node
func NewStyleSheet(parent ...tree.Node) *StyleSheet { return tree.New[StyleSheet](parent...) }
func NewFrame(parent ...tree.Node) *Frame { return tree.New[Frame](parent...) }
0.538056
cogentcore/core
svg/typegen.go
cogentcore/core
core/typegen.go
BSD-3-Clause
go
NewStyleSheet returns a new [StyleSheet] with the given optional parent: StyleSheet is a Node2D node that contains a stylesheet -- property values contained in this sheet can be transformed into tree.Properties and set in CSS field of appropriate node
func NewStyleSheet(parent ...tree.Node) *StyleSheet { return tree.New[StyleSheet](parent...) }
func (c Cell) WithStyle(attr StyleAttrs) Cell { c.style = attr return c }
0.529322
cogentcore/core
svg/typegen.go
gcla/gowid
cell.go
MIT
go
NewStyleSheet returns a new [StyleSheet] with the given optional parent: StyleSheet is a Node2D node that contains a stylesheet -- property values contained in this sheet can be transformed into tree.Properties and set in CSS field of appropriate node
func NewStyleSheet(parent ...tree.Node) *StyleSheet { return tree.New[StyleSheet](parent...) }
func NewNodeBase(parent ...Node) *NodeBase { return New[NodeBase](parent...) }
0.516076
cogentcore/core
svg/typegen.go
cogentcore/core
tree/typegen.go
BSD-3-Clause
go
CreateDistributionWithContext is the same as CreateDistribution with the addition of the ability to pass a context and additional request options. See CreateDistribution for details on how to use this API operation. The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
func (c *Lightsail) CreateDistributionWithContext(ctx aws.Context, input *CreateDistributionInput, opts ...request.Option) (*CreateDistributionOutput, error) { req, out := c.CreateDistributionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *Imagebuilder) CreateDistributionConfigurationWithContext(ctx aws.Context, input *CreateDistributionConfigurationInput, opts ...request.Option) (*CreateDistributionConfigurationOutput, error) { req, out := c.CreateDistributionConfigurationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.921048
aws/aws-sdk-go
service/lightsail/api.go
aws/aws-sdk-go
service/imagebuilder/api.go
Apache-2.0
go
CreateDistributionWithContext is the same as CreateDistribution with the addition of the ability to pass a context and additional request options. See CreateDistribution for details on how to use this API operation. The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
func (c *Lightsail) CreateDistributionWithContext(ctx aws.Context, input *CreateDistributionInput, opts ...request.Option) (*CreateDistributionOutput, error) { req, out := c.CreateDistributionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *CloudFront) CopyDistributionWithContext(ctx aws.Context, input *CopyDistributionInput, opts ...request.Option) (*CopyDistributionOutput, error) { req, out := c.CopyDistributionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.891562
aws/aws-sdk-go
service/lightsail/api.go
aws/aws-sdk-go
service/cloudfront/api.go
Apache-2.0
go
CreateDistributionWithContext is the same as CreateDistribution with the addition of the ability to pass a context and additional request options. See CreateDistribution for details on how to use this API operation. The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
func (c *Lightsail) CreateDistributionWithContext(ctx aws.Context, input *CreateDistributionInput, opts ...request.Option) (*CreateDistributionOutput, error) { req, out := c.CreateDistributionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *CloudFront) CreateDistributionWithTagsWithContext(ctx aws.Context, input *CreateDistributionWithTagsInput, opts ...request.Option) (*CreateDistributionWithTagsOutput, error) { req, out := c.CreateDistributionWithTagsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.888174
aws/aws-sdk-go
service/lightsail/api.go
aws/aws-sdk-go
service/cloudfront/api.go
Apache-2.0
go
CreateDistributionWithContext is the same as CreateDistribution with the addition of the ability to pass a context and additional request options. See CreateDistribution for details on how to use this API operation. The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
func (c *Lightsail) CreateDistributionWithContext(ctx aws.Context, input *CreateDistributionInput, opts ...request.Option) (*CreateDistributionOutput, error) { req, out := c.CreateDistributionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *CloudFront) GetDistributionWithContext(ctx aws.Context, input *GetDistributionInput, opts ...request.Option) (*GetDistributionOutput, error) { req, out := c.GetDistributionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.881725
aws/aws-sdk-go
service/lightsail/api.go
aws/aws-sdk-go
service/cloudfront/api.go
Apache-2.0
go
CreateDistributionWithContext is the same as CreateDistribution with the addition of the ability to pass a context and additional request options. See CreateDistribution for details on how to use this API operation. The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
func (c *Lightsail) CreateDistributionWithContext(ctx aws.Context, input *CreateDistributionInput, opts ...request.Option) (*CreateDistributionOutput, error) { req, out := c.CreateDistributionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *Lightsail) DeleteDistributionWithContext(ctx aws.Context, input *DeleteDistributionInput, opts ...request.Option) (*DeleteDistributionOutput, error) { req, out := c.DeleteDistributionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.845302
aws/aws-sdk-go
service/lightsail/api.go
aws/aws-sdk-go
service/lightsail/api.go
Apache-2.0
go
String makes a random string up to n characters long. If n is 0, the default size range is [0-20). The returned string may include a variety of (valid) UTF-8 encodings.
func (c Continue) String(n int) string { return randString(c.Rand, n) }
func String(n int) string { b := make([]byte, n) rng.Lock() defer rng.Unlock() randomInt63 := rng.rand.Int63() remaining := maxAlphanumsPerInt for i := 0; i < n; { if remaining == 0 { randomInt63, remaining = rng.rand.Int63(), maxAlphanumsPerInt } if idx := int(randomInt63 & alphanumsIdxMask); idx < len(alphanums) { b[i] = alphanums[idx] i++ } randomInt63 >>= alphanumsIdxBits remaining-- } return string(b) }
0.769403
kubernetes-sigs/cri-tools
vendor/sigs.k8s.io/randfill/randfill.go
Mirantis/cri-dockerd
vendor/k8s.io/apimachinery/pkg/util/rand/rand.go
Apache-2.0
go
String makes a random string up to n characters long. If n is 0, the default size range is [0-20). The returned string may include a variety of (valid) UTF-8 encodings.
func (c Continue) String(n int) string { return randString(c.Rand, n) }
func (ur UnicodeRanges) randString(r *rand.Rand) string { n := r.Intn(20) sb := strings.Builder{} sb.Grow(n) for i := 0; i < n; i++ { sb.WriteRune(ur[r.Intn(len(ur))].choose(r)) } return sb.String() }
0.665697
kubernetes-sigs/cri-tools
vendor/sigs.k8s.io/randfill/randfill.go
k8snetworkplumbingwg/multus-cni
vendor/github.com/google/gofuzz/fuzz.go
Apache-2.0
go
String makes a random string up to n characters long. If n is 0, the default size range is [0-20). The returned string may include a variety of (valid) UTF-8 encodings.
func (c Continue) String(n int) string { return randString(c.Rand, n) }
func String(n int) string { return StringFn(n, cryptorand.Reader) }
0.627175
kubernetes-sigs/cri-tools
vendor/sigs.k8s.io/randfill/randfill.go
rclone/rclone
lib/random/random.go
MIT
go
String makes a random string up to n characters long. If n is 0, the default size range is [0-20). The returned string may include a variety of (valid) UTF-8 encodings.
func (c Continue) String(n int) string { return randString(c.Rand, n) }
func StringFn(n int, randReader io.Reader) string { const ( vowel = "aeiou" consonant = "bcdfghjklmnpqrstvwxyz" digit = "0123456789" ) var ( pattern = []string{consonant, vowel, consonant, vowel, consonant, vowel, consonant, digit} out = make([]byte, n) p = 0 ) _, err := io.ReadFull(randReader, out) if err != nil { panic(fmt.Sprintf("internal error: failed to read from random reader: %v", err)) } for i := range out { source := pattern[p] p = (p + 1) % len(pattern) // this generation method means the distribution is slightly biased. However these // strings are not for passwords so this is deemed OK. out[i] = source[out[i]%byte(len(source))] } return string(out) }
0.62674
kubernetes-sigs/cri-tools
vendor/sigs.k8s.io/randfill/randfill.go
rclone/rclone
lib/random/random.go
MIT
go
String makes a random string up to n characters long. If n is 0, the default size range is [0-20). The returned string may include a variety of (valid) UTF-8 encodings.
func (c Continue) String(n int) string { return randString(c.Rand, n) }
func RandStringSlice(charset string, sliceLen, strLen int) []string { if sliceLen <= 0 || strLen <= 0 { return []string{} } result := make([]string, sliceLen) for i := range result { result[i] = random(charset, strLen) } return result }
0.578734
kubernetes-sigs/cri-tools
vendor/sigs.k8s.io/randfill/randfill.go
duke-git/lancet
random/random.go
MIT
go