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
Cursor creates a cursor associated with the bucket. The cursor is only valid as long as the transaction is open. Do not use a cursor after the transaction is closed.
func (b *Bucket) Cursor() *Cursor { // Update transaction statistics. b.tx.stats.IncCursorCount(1) // Allocate and return a cursor. return &Cursor{ bucket: b, stack: make([]elemRef, 0), } }
func (tx *Tx) Cursor() *Cursor { return tx.root.Cursor() }
0.876875
moby/buildkit
vendor/go.etcd.io/bbolt/bucket.go
moby/buildkit
vendor/go.etcd.io/bbolt/tx.go
Apache-2.0
go
Cursor creates a cursor associated with the bucket. The cursor is only valid as long as the transaction is open. Do not use a cursor after the transaction is closed.
func (b *Bucket) Cursor() *Cursor { // Update transaction statistics. b.tx.stats.IncCursorCount(1) // Allocate and return a cursor. return &Cursor{ bucket: b, stack: make([]elemRef, 0), } }
func (c *Cursor) First() (key []byte, value []byte) { _assert(c.bucket.tx.db != nil, "tx closed") k, v, flags := c.first() if (flags & uint32(bucketLeafFlag)) != 0 { return k, nil } return k, v }
0.672314
moby/buildkit
vendor/go.etcd.io/bbolt/bucket.go
moby/buildkit
vendor/go.etcd.io/bbolt/cursor.go
Apache-2.0
go
Cursor creates a cursor associated with the bucket. The cursor is only valid as long as the transaction is open. Do not use a cursor after the transaction is closed.
func (b *Bucket) Cursor() *Cursor { // Update transaction statistics. b.tx.stats.IncCursorCount(1) // Allocate and return a cursor. return &Cursor{ bucket: b, stack: make([]elemRef, 0), } }
func (c *Cursor) Next() (key []byte, value []byte) { _assert(c.bucket.tx.db != nil, "tx closed") k, v, flags := c.next() if (flags & uint32(bucketLeafFlag)) != 0 { return k, nil } return k, v }
0.65295
moby/buildkit
vendor/go.etcd.io/bbolt/bucket.go
moby/buildkit
vendor/go.etcd.io/bbolt/cursor.go
Apache-2.0
go
Cursor creates a cursor associated with the bucket. The cursor is only valid as long as the transaction is open. Do not use a cursor after the transaction is closed.
func (b *Bucket) Cursor() *Cursor { // Update transaction statistics. b.tx.stats.IncCursorCount(1) // Allocate and return a cursor. return &Cursor{ bucket: b, stack: make([]elemRef, 0), } }
func NewCursorClient(ctx context.Context, opts ...option.ClientOption) (*CursorClient, error) { clientOpts := defaultCursorGRPCClientOptions() if newCursorClientHook != nil { hookOpts, err := newCursorClientHook(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 := CursorClient{CallOptions: defaultCursorCallOptions()} c := &cursorGRPCClient{ connPool: connPool, cursorClient: pubsublitepb.NewCursorServiceClient(connPool), CallOptions: &client.CallOptions, logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() client.internalClient = c return &client, nil }
0.599363
moby/buildkit
vendor/go.etcd.io/bbolt/bucket.go
googleapis/google-cloud-go
pubsublite/apiv1/cursor_client.go
Apache-2.0
go
Cursor creates a cursor associated with the bucket. The cursor is only valid as long as the transaction is open. Do not use a cursor after the transaction is closed.
func (b *Bucket) Cursor() *Cursor { // Update transaction statistics. b.tx.stats.IncCursorCount(1) // Allocate and return a cursor. return &Cursor{ bucket: b, stack: make([]elemRef, 0), } }
func (c *Command) ResultCursor() (*driver.BatchCursor, error) { if !c.createCursor { return nil, errors.New("command operation was not configured to create a cursor, but a result cursor was requested") } return c.resultCursor, nil }
0.596787
moby/buildkit
vendor/go.etcd.io/bbolt/bucket.go
umputun/tg-spam
vendor/go.mongodb.org/mongo-driver/x/mongo/driver/operation/command.go
MIT
go
DeleteProject API operation for AWS IoT SiteWise. Deletes a project from IoT SiteWise Monitor. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for AWS IoT SiteWise's API operation DeleteProject for usage and error information. Returned Error Types: - InvalidRequestException The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters. Check your request and try again. - ResourceNotFoundException The requested resource can't be found. - InternalFailureException IoT SiteWise can't process your request right now. Try again later. - ThrottlingException Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise assets that can be created per second, the allowed number of messages per second, and so on. For more information, see Quotas (https://docs.aws.amazon.com/iot-sitewise/latest/userguide/quotas.html) in the IoT SiteWise User Guide. See also, https://docs.aws.amazon.com/goto/WebAPI/iotsitewise-2019-12-02/DeleteProject
func (c *IoTSiteWise) DeleteProject(input *DeleteProjectInput) (*DeleteProjectOutput, error) { req, out := c.DeleteProjectRequest(input) return out, req.Send() }
func (c *DataZone) DeleteProject(input *DeleteProjectInput) (*DeleteProjectOutput, error) { req, out := c.DeleteProjectRequest(input) return out, req.Send() }
0.890722
aws/aws-sdk-go
service/iotsitewise/api.go
aws/aws-sdk-go
service/datazone/api.go
Apache-2.0
go
DeleteProject API operation for AWS IoT SiteWise. Deletes a project from IoT SiteWise Monitor. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for AWS IoT SiteWise's API operation DeleteProject for usage and error information. Returned Error Types: - InvalidRequestException The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters. Check your request and try again. - ResourceNotFoundException The requested resource can't be found. - InternalFailureException IoT SiteWise can't process your request right now. Try again later. - ThrottlingException Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise assets that can be created per second, the allowed number of messages per second, and so on. For more information, see Quotas (https://docs.aws.amazon.com/iot-sitewise/latest/userguide/quotas.html) in the IoT SiteWise User Guide. See also, https://docs.aws.amazon.com/goto/WebAPI/iotsitewise-2019-12-02/DeleteProject
func (c *IoTSiteWise) DeleteProject(input *DeleteProjectInput) (*DeleteProjectOutput, error) { req, out := c.DeleteProjectRequest(input) return out, req.Send() }
func (c *SageMaker) DeleteProject(input *DeleteProjectInput) (*DeleteProjectOutput, error) { req, out := c.DeleteProjectRequest(input) return out, req.Send() }
0.865904
aws/aws-sdk-go
service/iotsitewise/api.go
aws/aws-sdk-go
service/sagemaker/api.go
Apache-2.0
go
DeleteProject API operation for AWS IoT SiteWise. Deletes a project from IoT SiteWise Monitor. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for AWS IoT SiteWise's API operation DeleteProject for usage and error information. Returned Error Types: - InvalidRequestException The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters. Check your request and try again. - ResourceNotFoundException The requested resource can't be found. - InternalFailureException IoT SiteWise can't process your request right now. Try again later. - ThrottlingException Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise assets that can be created per second, the allowed number of messages per second, and so on. For more information, see Quotas (https://docs.aws.amazon.com/iot-sitewise/latest/userguide/quotas.html) in the IoT SiteWise User Guide. See also, https://docs.aws.amazon.com/goto/WebAPI/iotsitewise-2019-12-02/DeleteProject
func (c *IoTSiteWise) DeleteProject(input *DeleteProjectInput) (*DeleteProjectOutput, error) { req, out := c.DeleteProjectRequest(input) return out, req.Send() }
func (c *CodeBuild) DeleteProject(input *DeleteProjectInput) (*DeleteProjectOutput, error) { req, out := c.DeleteProjectRequest(input) return out, req.Send() }
0.858469
aws/aws-sdk-go
service/iotsitewise/api.go
aws/aws-sdk-go
service/codebuild/api.go
Apache-2.0
go
DeleteProject API operation for AWS IoT SiteWise. Deletes a project from IoT SiteWise Monitor. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for AWS IoT SiteWise's API operation DeleteProject for usage and error information. Returned Error Types: - InvalidRequestException The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters. Check your request and try again. - ResourceNotFoundException The requested resource can't be found. - InternalFailureException IoT SiteWise can't process your request right now. Try again later. - ThrottlingException Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise assets that can be created per second, the allowed number of messages per second, and so on. For more information, see Quotas (https://docs.aws.amazon.com/iot-sitewise/latest/userguide/quotas.html) in the IoT SiteWise User Guide. See also, https://docs.aws.amazon.com/goto/WebAPI/iotsitewise-2019-12-02/DeleteProject
func (c *IoTSiteWise) DeleteProject(input *DeleteProjectInput) (*DeleteProjectOutput, error) { req, out := c.DeleteProjectRequest(input) return out, req.Send() }
func (c *IoT1ClickProjects) DeleteProject(input *DeleteProjectInput) (*DeleteProjectOutput, error) { req, out := c.DeleteProjectRequest(input) return out, req.Send() }
0.851833
aws/aws-sdk-go
service/iotsitewise/api.go
aws/aws-sdk-go
service/iot1clickprojects/api.go
Apache-2.0
go
DeleteProject API operation for AWS IoT SiteWise. Deletes a project from IoT SiteWise Monitor. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for AWS IoT SiteWise's API operation DeleteProject for usage and error information. Returned Error Types: - InvalidRequestException The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters. Check your request and try again. - ResourceNotFoundException The requested resource can't be found. - InternalFailureException IoT SiteWise can't process your request right now. Try again later. - ThrottlingException Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise assets that can be created per second, the allowed number of messages per second, and so on. For more information, see Quotas (https://docs.aws.amazon.com/iot-sitewise/latest/userguide/quotas.html) in the IoT SiteWise User Guide. See also, https://docs.aws.amazon.com/goto/WebAPI/iotsitewise-2019-12-02/DeleteProject
func (c *IoTSiteWise) DeleteProject(input *DeleteProjectInput) (*DeleteProjectOutput, error) { req, out := c.DeleteProjectRequest(input) return out, req.Send() }
func (c *DeviceFarm) DeleteProject(input *DeleteProjectInput) (*DeleteProjectOutput, error) { req, out := c.DeleteProjectRequest(input) return out, req.Send() }
0.84875
aws/aws-sdk-go
service/iotsitewise/api.go
aws/aws-sdk-go
service/devicefarm/api.go
Apache-2.0
go
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using: client.PlanRateCard.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(planratecard.FieldID) }), ). Exec(ctx)
func (u *PlanRateCardUpsertBulk) UpdateNewValues() *PlanRateCardUpsertBulk { u.create.conflict = append(u.create.conflict, sql.ResolveWithNewValues()) u.create.conflict = append(u.create.conflict, sql.ResolveWith(func(s *sql.UpdateSet) { for _, b := range u.create.builders { if _, exists := b.mutation.ID(); exists { s.SetIgnore(planratecard.FieldID) } if _, exists := b.mutation.Namespace(); exists { s.SetIgnore(planratecard.FieldNamespace) } if _, exists := b.mutation.CreatedAt(); exists { s.SetIgnore(planratecard.FieldCreatedAt) } if _, exists := b.mutation.Key(); exists { s.SetIgnore(planratecard.FieldKey) } if _, exists := b.mutation.GetType(); exists { s.SetIgnore(planratecard.FieldType) } } })) return u }
func (u *PlanRateCardUpsertOne) UpdateNewValues() *PlanRateCardUpsertOne { u.create.conflict = append(u.create.conflict, sql.ResolveWithNewValues()) u.create.conflict = append(u.create.conflict, sql.ResolveWith(func(s *sql.UpdateSet) { if _, exists := u.create.mutation.ID(); exists { s.SetIgnore(planratecard.FieldID) } if _, exists := u.create.mutation.Namespace(); exists { s.SetIgnore(planratecard.FieldNamespace) } if _, exists := u.create.mutation.CreatedAt(); exists { s.SetIgnore(planratecard.FieldCreatedAt) } if _, exists := u.create.mutation.Key(); exists { s.SetIgnore(planratecard.FieldKey) } if _, exists := u.create.mutation.GetType(); exists { s.SetIgnore(planratecard.FieldType) } })) return u }
0.973012
openmeterio/openmeter
openmeter/ent/db/planratecard_create.go
openmeterio/openmeter
openmeter/ent/db/planratecard_create.go
Apache-2.0
go
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using: client.PlanRateCard.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(planratecard.FieldID) }), ). Exec(ctx)
func (u *PlanRateCardUpsertBulk) UpdateNewValues() *PlanRateCardUpsertBulk { u.create.conflict = append(u.create.conflict, sql.ResolveWithNewValues()) u.create.conflict = append(u.create.conflict, sql.ResolveWith(func(s *sql.UpdateSet) { for _, b := range u.create.builders { if _, exists := b.mutation.ID(); exists { s.SetIgnore(planratecard.FieldID) } if _, exists := b.mutation.Namespace(); exists { s.SetIgnore(planratecard.FieldNamespace) } if _, exists := b.mutation.CreatedAt(); exists { s.SetIgnore(planratecard.FieldCreatedAt) } if _, exists := b.mutation.Key(); exists { s.SetIgnore(planratecard.FieldKey) } if _, exists := b.mutation.GetType(); exists { s.SetIgnore(planratecard.FieldType) } } })) return u }
func (u *PlanUpsertBulk) UpdateNewValues() *PlanUpsertBulk { u.create.conflict = append(u.create.conflict, sql.ResolveWithNewValues()) u.create.conflict = append(u.create.conflict, sql.ResolveWith(func(s *sql.UpdateSet) { for _, b := range u.create.builders { if _, exists := b.mutation.ID(); exists { s.SetIgnore(plan.FieldID) } if _, exists := b.mutation.Namespace(); exists { s.SetIgnore(plan.FieldNamespace) } if _, exists := b.mutation.CreatedAt(); exists { s.SetIgnore(plan.FieldCreatedAt) } if _, exists := b.mutation.Key(); exists { s.SetIgnore(plan.FieldKey) } if _, exists := b.mutation.Currency(); exists { s.SetIgnore(plan.FieldCurrency) } } })) return u }
0.94246
openmeterio/openmeter
openmeter/ent/db/planratecard_create.go
openmeterio/openmeter
openmeter/ent/db/plan_create.go
Apache-2.0
go
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using: client.PlanRateCard.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(planratecard.FieldID) }), ). Exec(ctx)
func (u *PlanRateCardUpsertBulk) UpdateNewValues() *PlanRateCardUpsertBulk { u.create.conflict = append(u.create.conflict, sql.ResolveWithNewValues()) u.create.conflict = append(u.create.conflict, sql.ResolveWith(func(s *sql.UpdateSet) { for _, b := range u.create.builders { if _, exists := b.mutation.ID(); exists { s.SetIgnore(planratecard.FieldID) } if _, exists := b.mutation.Namespace(); exists { s.SetIgnore(planratecard.FieldNamespace) } if _, exists := b.mutation.CreatedAt(); exists { s.SetIgnore(planratecard.FieldCreatedAt) } if _, exists := b.mutation.Key(); exists { s.SetIgnore(planratecard.FieldKey) } if _, exists := b.mutation.GetType(); exists { s.SetIgnore(planratecard.FieldType) } } })) return u }
func (u *PlanUpsertOne) UpdateNewValues() *PlanUpsertOne { u.create.conflict = append(u.create.conflict, sql.ResolveWithNewValues()) u.create.conflict = append(u.create.conflict, sql.ResolveWith(func(s *sql.UpdateSet) { if _, exists := u.create.mutation.ID(); exists { s.SetIgnore(plan.FieldID) } if _, exists := u.create.mutation.Namespace(); exists { s.SetIgnore(plan.FieldNamespace) } if _, exists := u.create.mutation.CreatedAt(); exists { s.SetIgnore(plan.FieldCreatedAt) } if _, exists := u.create.mutation.Key(); exists { s.SetIgnore(plan.FieldKey) } if _, exists := u.create.mutation.Currency(); exists { s.SetIgnore(plan.FieldCurrency) } })) return u }
0.928422
openmeterio/openmeter
openmeter/ent/db/planratecard_create.go
openmeterio/openmeter
openmeter/ent/db/plan_create.go
Apache-2.0
go
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using: client.PlanRateCard.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(planratecard.FieldID) }), ). Exec(ctx)
func (u *PlanRateCardUpsertBulk) UpdateNewValues() *PlanRateCardUpsertBulk { u.create.conflict = append(u.create.conflict, sql.ResolveWithNewValues()) u.create.conflict = append(u.create.conflict, sql.ResolveWith(func(s *sql.UpdateSet) { for _, b := range u.create.builders { if _, exists := b.mutation.ID(); exists { s.SetIgnore(planratecard.FieldID) } if _, exists := b.mutation.Namespace(); exists { s.SetIgnore(planratecard.FieldNamespace) } if _, exists := b.mutation.CreatedAt(); exists { s.SetIgnore(planratecard.FieldCreatedAt) } if _, exists := b.mutation.Key(); exists { s.SetIgnore(planratecard.FieldKey) } if _, exists := b.mutation.GetType(); exists { s.SetIgnore(planratecard.FieldType) } } })) return u }
func (u *PlanPhaseUpsertBulk) UpdateNewValues() *PlanPhaseUpsertBulk { u.create.conflict = append(u.create.conflict, sql.ResolveWithNewValues()) u.create.conflict = append(u.create.conflict, sql.ResolveWith(func(s *sql.UpdateSet) { for _, b := range u.create.builders { if _, exists := b.mutation.ID(); exists { s.SetIgnore(planphase.FieldID) } if _, exists := b.mutation.Namespace(); exists { s.SetIgnore(planphase.FieldNamespace) } if _, exists := b.mutation.CreatedAt(); exists { s.SetIgnore(planphase.FieldCreatedAt) } if _, exists := b.mutation.Key(); exists { s.SetIgnore(planphase.FieldKey) } } })) return u }
0.924082
openmeterio/openmeter
openmeter/ent/db/planratecard_create.go
openmeterio/openmeter
openmeter/ent/db/planphase_create.go
Apache-2.0
go
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using: client.PlanRateCard.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(planratecard.FieldID) }), ). Exec(ctx)
func (u *PlanRateCardUpsertBulk) UpdateNewValues() *PlanRateCardUpsertBulk { u.create.conflict = append(u.create.conflict, sql.ResolveWithNewValues()) u.create.conflict = append(u.create.conflict, sql.ResolveWith(func(s *sql.UpdateSet) { for _, b := range u.create.builders { if _, exists := b.mutation.ID(); exists { s.SetIgnore(planratecard.FieldID) } if _, exists := b.mutation.Namespace(); exists { s.SetIgnore(planratecard.FieldNamespace) } if _, exists := b.mutation.CreatedAt(); exists { s.SetIgnore(planratecard.FieldCreatedAt) } if _, exists := b.mutation.Key(); exists { s.SetIgnore(planratecard.FieldKey) } if _, exists := b.mutation.GetType(); exists { s.SetIgnore(planratecard.FieldType) } } })) return u }
func (u *AppStripeUpsertBulk) UpdateNewValues() *AppStripeUpsertBulk { u.create.conflict = append(u.create.conflict, sql.ResolveWithNewValues()) u.create.conflict = append(u.create.conflict, sql.ResolveWith(func(s *sql.UpdateSet) { for _, b := range u.create.builders { if _, exists := b.mutation.ID(); exists { s.SetIgnore(appstripe.FieldID) } if _, exists := b.mutation.Namespace(); exists { s.SetIgnore(appstripe.FieldNamespace) } if _, exists := b.mutation.CreatedAt(); exists { s.SetIgnore(appstripe.FieldCreatedAt) } if _, exists := b.mutation.StripeAccountID(); exists { s.SetIgnore(appstripe.FieldStripeAccountID) } if _, exists := b.mutation.StripeLivemode(); exists { s.SetIgnore(appstripe.FieldStripeLivemode) } } })) return u }
0.923358
openmeterio/openmeter
openmeter/ent/db/planratecard_create.go
openmeterio/openmeter
openmeter/ent/db/appstripe_create.go
Apache-2.0
go
AuthCheckWithContext validates the given credentials. It returns nil if successful. The context object can be used to cancel the request. For Docker API versions >= 1.23, the AuthStatus struct will be populated, otherwise it will be empty. See https://goo.gl/6nsZkH for more details.
func (c *Client) AuthCheckWithContext(conf *AuthConfiguration, ctx context.Context) (AuthStatus, error) { var authStatus AuthStatus if conf == nil { return authStatus, errors.New("conf is nil") } resp, err := c.do(http.MethodPost, "/auth", doOptions{data: conf, context: ctx}) if err != nil { return authStatus, err } defer resp.Body.Close() data, err := io.ReadAll(resp.Body) if err != nil { return authStatus, err } if len(data) == 0 { return authStatus, nil } if err := json.Unmarshal(data, &authStatus); err != nil { return authStatus, err } return authStatus, nil }
func (c *Client) AuthCheck(conf *AuthConfiguration) (AuthStatus, error) { return c.AuthCheckWithContext(conf, context.TODO()) }
0.831573
fsouza/go-dockerclient
auth.go
fsouza/go-dockerclient
auth.go
BSD-2-Clause
go
AuthCheckWithContext validates the given credentials. It returns nil if successful. The context object can be used to cancel the request. For Docker API versions >= 1.23, the AuthStatus struct will be populated, otherwise it will be empty. See https://goo.gl/6nsZkH for more details.
func (c *Client) AuthCheckWithContext(conf *AuthConfiguration, ctx context.Context) (AuthStatus, error) { var authStatus AuthStatus if conf == nil { return authStatus, errors.New("conf is nil") } resp, err := c.do(http.MethodPost, "/auth", doOptions{data: conf, context: ctx}) if err != nil { return authStatus, err } defer resp.Body.Close() data, err := io.ReadAll(resp.Body) if err != nil { return authStatus, err } if len(data) == 0 { return authStatus, nil } if err := json.Unmarshal(data, &authStatus); err != nil { return authStatus, err } return authStatus, nil }
func (c *CognitoIdentityProvider) InitiateAuthWithContext(ctx aws.Context, input *InitiateAuthInput, opts ...request.Option) (*InitiateAuthOutput, error) { req, out := c.InitiateAuthRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.566865
fsouza/go-dockerclient
auth.go
aws/aws-sdk-go
service/cognitoidentityprovider/api.go
Apache-2.0
go
AuthCheckWithContext validates the given credentials. It returns nil if successful. The context object can be used to cancel the request. For Docker API versions >= 1.23, the AuthStatus struct will be populated, otherwise it will be empty. See https://goo.gl/6nsZkH for more details.
func (c *Client) AuthCheckWithContext(conf *AuthConfiguration, ctx context.Context) (AuthStatus, error) { var authStatus AuthStatus if conf == nil { return authStatus, errors.New("conf is nil") } resp, err := c.do(http.MethodPost, "/auth", doOptions{data: conf, context: ctx}) if err != nil { return authStatus, err } defer resp.Body.Close() data, err := io.ReadAll(resp.Body) if err != nil { return authStatus, err } if len(data) == 0 { return authStatus, nil } if err := json.Unmarshal(data, &authStatus); err != nil { return authStatus, err } return authStatus, nil }
func (c *AccessAnalyzer) CheckNoNewAccessWithContext(ctx aws.Context, input *CheckNoNewAccessInput, opts ...request.Option) (*CheckNoNewAccessOutput, error) { req, out := c.CheckNoNewAccessRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.533068
fsouza/go-dockerclient
auth.go
aws/aws-sdk-go
service/accessanalyzer/api.go
Apache-2.0
go
AuthCheckWithContext validates the given credentials. It returns nil if successful. The context object can be used to cancel the request. For Docker API versions >= 1.23, the AuthStatus struct will be populated, otherwise it will be empty. See https://goo.gl/6nsZkH for more details.
func (c *Client) AuthCheckWithContext(conf *AuthConfiguration, ctx context.Context) (AuthStatus, error) { var authStatus AuthStatus if conf == nil { return authStatus, errors.New("conf is nil") } resp, err := c.do(http.MethodPost, "/auth", doOptions{data: conf, context: ctx}) if err != nil { return authStatus, err } defer resp.Body.Close() data, err := io.ReadAll(resp.Body) if err != nil { return authStatus, err } if len(data) == 0 { return authStatus, nil } if err := json.Unmarshal(data, &authStatus); err != nil { return authStatus, err } return authStatus, nil }
func (m *UpstreamTlsContext) Validate() error { return m.validate(false) }
0.528601
fsouza/go-dockerclient
auth.go
tektoncd/cli
vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/tls.pb.validate.go
Apache-2.0
go
AuthCheckWithContext validates the given credentials. It returns nil if successful. The context object can be used to cancel the request. For Docker API versions >= 1.23, the AuthStatus struct will be populated, otherwise it will be empty. See https://goo.gl/6nsZkH for more details.
func (c *Client) AuthCheckWithContext(conf *AuthConfiguration, ctx context.Context) (AuthStatus, error) { var authStatus AuthStatus if conf == nil { return authStatus, errors.New("conf is nil") } resp, err := c.do(http.MethodPost, "/auth", doOptions{data: conf, context: ctx}) if err != nil { return authStatus, err } defer resp.Body.Close() data, err := io.ReadAll(resp.Body) if err != nil { return authStatus, err } if len(data) == 0 { return authStatus, nil } if err := json.Unmarshal(data, &authStatus); err != nil { return authStatus, err } return authStatus, nil }
func VerifyWithCtx(public PublicKey, message, signature []byte, ctx string) bool { if len(ctx) == 0 || len(ctx) > ContextMaxSize { return false } return verify(public, message, signature, []byte(ctx), false) }
0.528309
fsouza/go-dockerclient
auth.go
tektoncd/cli
vendor/github.com/cloudflare/circl/sign/ed25519/ed25519.go
Apache-2.0
go
getLayerStoreLocked obtains and returns a handle to the writeable layer store object used by the Store. It must be called with s.graphLock held.
func (s *store) getLayerStoreLocked() (rwLayerStore, error) { if s.layerStoreUseGetters != nil { return s.layerStoreUseGetters, nil } driverPrefix := s.graphDriverName + "-" rlpath := filepath.Join(s.runRoot, driverPrefix+"layers") if err := os.MkdirAll(rlpath, 0o700); err != nil { return nil, err } glpath := filepath.Join(s.graphRoot, driverPrefix+"layers") if err := os.MkdirAll(glpath, 0o700); err != nil { return nil, err } ilpath := "" if s.imageStoreDir != "" { ilpath = filepath.Join(s.imageStoreDir, driverPrefix+"layers") } rls, err := s.newLayerStore(rlpath, glpath, ilpath, s.graphDriver, s.transientStore) if err != nil { return nil, err } s.layerStoreUseGetters = rls return s.layerStoreUseGetters, nil }
func (s *store) getLayerStore() (rwLayerStore, error) { if err := s.startUsingGraphDriver(); err != nil { return nil, err } defer s.stopUsingGraphDriver() return s.getLayerStoreLocked() }
0.954991
containers/podman-tui
vendor/github.com/containers/storage/store.go
containers/podman-tui
vendor/github.com/containers/storage/store.go
Apache-2.0
go
getLayerStoreLocked obtains and returns a handle to the writeable layer store object used by the Store. It must be called with s.graphLock held.
func (s *store) getLayerStoreLocked() (rwLayerStore, error) { if s.layerStoreUseGetters != nil { return s.layerStoreUseGetters, nil } driverPrefix := s.graphDriverName + "-" rlpath := filepath.Join(s.runRoot, driverPrefix+"layers") if err := os.MkdirAll(rlpath, 0o700); err != nil { return nil, err } glpath := filepath.Join(s.graphRoot, driverPrefix+"layers") if err := os.MkdirAll(glpath, 0o700); err != nil { return nil, err } ilpath := "" if s.imageStoreDir != "" { ilpath = filepath.Join(s.imageStoreDir, driverPrefix+"layers") } rls, err := s.newLayerStore(rlpath, glpath, ilpath, s.graphDriver, s.transientStore) if err != nil { return nil, err } s.layerStoreUseGetters = rls return s.layerStoreUseGetters, nil }
func (s *store) getROLayerStoresLocked() ([]roLayerStore, error) { if s.roLayerStoresUseGetters != nil { return s.roLayerStoresUseGetters, nil } driverPrefix := s.graphDriverName + "-" rlpath := filepath.Join(s.runRoot, driverPrefix+"layers") if err := os.MkdirAll(rlpath, 0o700); err != nil { return nil, err } for _, store := range s.graphDriver.AdditionalImageStores() { glpath := filepath.Join(store, driverPrefix+"layers") rls, err := newROLayerStore(rlpath, glpath, s.graphDriver) if err != nil { return nil, err } s.roLayerStoresUseGetters = append(s.roLayerStoresUseGetters, rls) } return s.roLayerStoresUseGetters, nil }
0.811422
containers/podman-tui
vendor/github.com/containers/storage/store.go
containers/podman-tui
vendor/github.com/containers/storage/store.go
Apache-2.0
go
getLayerStoreLocked obtains and returns a handle to the writeable layer store object used by the Store. It must be called with s.graphLock held.
func (s *store) getLayerStoreLocked() (rwLayerStore, error) { if s.layerStoreUseGetters != nil { return s.layerStoreUseGetters, nil } driverPrefix := s.graphDriverName + "-" rlpath := filepath.Join(s.runRoot, driverPrefix+"layers") if err := os.MkdirAll(rlpath, 0o700); err != nil { return nil, err } glpath := filepath.Join(s.graphRoot, driverPrefix+"layers") if err := os.MkdirAll(glpath, 0o700); err != nil { return nil, err } ilpath := "" if s.imageStoreDir != "" { ilpath = filepath.Join(s.imageStoreDir, driverPrefix+"layers") } rls, err := s.newLayerStore(rlpath, glpath, ilpath, s.graphDriver, s.transientStore) if err != nil { return nil, err } s.layerStoreUseGetters = rls return s.layerStoreUseGetters, nil }
func (s *store) allLayerStores() ([]roLayerStore, error) { if err := s.startUsingGraphDriver(); err != nil { return nil, err } defer s.stopUsingGraphDriver() return s.allLayerStoresLocked() }
0.694653
containers/podman-tui
vendor/github.com/containers/storage/store.go
containers/podman-tui
vendor/github.com/containers/storage/store.go
Apache-2.0
go
getLayerStoreLocked obtains and returns a handle to the writeable layer store object used by the Store. It must be called with s.graphLock held.
func (s *store) getLayerStoreLocked() (rwLayerStore, error) { if s.layerStoreUseGetters != nil { return s.layerStoreUseGetters, nil } driverPrefix := s.graphDriverName + "-" rlpath := filepath.Join(s.runRoot, driverPrefix+"layers") if err := os.MkdirAll(rlpath, 0o700); err != nil { return nil, err } glpath := filepath.Join(s.graphRoot, driverPrefix+"layers") if err := os.MkdirAll(glpath, 0o700); err != nil { return nil, err } ilpath := "" if s.imageStoreDir != "" { ilpath = filepath.Join(s.imageStoreDir, driverPrefix+"layers") } rls, err := s.newLayerStore(rlpath, glpath, ilpath, s.graphDriver, s.transientStore) if err != nil { return nil, err } s.layerStoreUseGetters = rls return s.layerStoreUseGetters, nil }
func (s *store) allLayerStoresLocked() ([]roLayerStore, error) { primary, additional, err := s.bothLayerStoreKindsLocked() if err != nil { return nil, err } return append([]roLayerStore{primary}, additional...), nil }
0.691477
containers/podman-tui
vendor/github.com/containers/storage/store.go
containers/podman-tui
vendor/github.com/containers/storage/store.go
Apache-2.0
go
getLayerStoreLocked obtains and returns a handle to the writeable layer store object used by the Store. It must be called with s.graphLock held.
func (s *store) getLayerStoreLocked() (rwLayerStore, error) { if s.layerStoreUseGetters != nil { return s.layerStoreUseGetters, nil } driverPrefix := s.graphDriverName + "-" rlpath := filepath.Join(s.runRoot, driverPrefix+"layers") if err := os.MkdirAll(rlpath, 0o700); err != nil { return nil, err } glpath := filepath.Join(s.graphRoot, driverPrefix+"layers") if err := os.MkdirAll(glpath, 0o700); err != nil { return nil, err } ilpath := "" if s.imageStoreDir != "" { ilpath = filepath.Join(s.imageStoreDir, driverPrefix+"layers") } rls, err := s.newLayerStore(rlpath, glpath, ilpath, s.graphDriver, s.transientStore) if err != nil { return nil, err } s.layerStoreUseGetters = rls return s.layerStoreUseGetters, nil }
func NewLayerProvidersFromStores(lss map[string]layer.Store) map[string]PushLayerProvider { plps := make(map[string]PushLayerProvider) for os, ls := range lss { plps[os] = &storeLayerProvider{ls: ls} } return plps }
0.516842
containers/podman-tui
vendor/github.com/containers/storage/store.go
genuinetools/binctr
vendor/github.com/docker/docker/distribution/config.go
MIT
go
CreateDataSourceFromRDS API operation for Amazon Machine Learning. Creates a DataSource object from an Amazon Relational Database Service (http://aws.amazon.com/rds/) (Amazon RDS). A DataSource references data that can be used to perform CreateMLModel, CreateEvaluation, or CreateBatchPrediction operations. CreateDataSourceFromRDS is an asynchronous operation. In response to CreateDataSourceFromRDS, Amazon Machine Learning (Amazon ML) immediately returns and sets the DataSource status to PENDING. After the DataSource is created and ready for use, Amazon ML sets the Status parameter to COMPLETED. DataSource in the COMPLETED or PENDING state can be used only to perform >CreateMLModel>, CreateEvaluation, or CreateBatchPrediction operations. If Amazon ML cannot accept the input source, it sets the Status parameter to FAILED and includes an error message in the Message attribute of the GetDataSource operation response. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for Amazon Machine Learning's API operation CreateDataSourceFromRDS for usage and error information. Returned Error Types: - InvalidInputException An error on the client occurred. Typically, the cause is an invalid input value. - InternalServerException An error on the server occurred when trying to process a request. - IdempotentParameterMismatchException A second request to use or change an object was not allowed. This can result from retrying a request using a parameter that was not present in the original request.
func (c *MachineLearning) CreateDataSourceFromRDS(input *CreateDataSourceFromRDSInput) (*CreateDataSourceFromRDSOutput, error) { req, out := c.CreateDataSourceFromRDSRequest(input) return out, req.Send() }
func (c *MachineLearning) CreateDataSourceFromS3(input *CreateDataSourceFromS3Input) (*CreateDataSourceFromS3Output, error) { req, out := c.CreateDataSourceFromS3Request(input) return out, req.Send() }
0.869396
aws/aws-sdk-go
service/machinelearning/api.go
aws/aws-sdk-go
service/machinelearning/api.go
Apache-2.0
go
CreateDataSourceFromRDS API operation for Amazon Machine Learning. Creates a DataSource object from an Amazon Relational Database Service (http://aws.amazon.com/rds/) (Amazon RDS). A DataSource references data that can be used to perform CreateMLModel, CreateEvaluation, or CreateBatchPrediction operations. CreateDataSourceFromRDS is an asynchronous operation. In response to CreateDataSourceFromRDS, Amazon Machine Learning (Amazon ML) immediately returns and sets the DataSource status to PENDING. After the DataSource is created and ready for use, Amazon ML sets the Status parameter to COMPLETED. DataSource in the COMPLETED or PENDING state can be used only to perform >CreateMLModel>, CreateEvaluation, or CreateBatchPrediction operations. If Amazon ML cannot accept the input source, it sets the Status parameter to FAILED and includes an error message in the Message attribute of the GetDataSource operation response. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for Amazon Machine Learning's API operation CreateDataSourceFromRDS for usage and error information. Returned Error Types: - InvalidInputException An error on the client occurred. Typically, the cause is an invalid input value. - InternalServerException An error on the server occurred when trying to process a request. - IdempotentParameterMismatchException A second request to use or change an object was not allowed. This can result from retrying a request using a parameter that was not present in the original request.
func (c *MachineLearning) CreateDataSourceFromRDS(input *CreateDataSourceFromRDSInput) (*CreateDataSourceFromRDSOutput, error) { req, out := c.CreateDataSourceFromRDSRequest(input) return out, req.Send() }
func (c *MachineLearning) CreateDataSourceFromRedshift(input *CreateDataSourceFromRedshiftInput) (*CreateDataSourceFromRedshiftOutput, error) { req, out := c.CreateDataSourceFromRedshiftRequest(input) return out, req.Send() }
0.825299
aws/aws-sdk-go
service/machinelearning/api.go
aws/aws-sdk-go
service/machinelearning/api.go
Apache-2.0
go
CreateDataSourceFromRDS API operation for Amazon Machine Learning. Creates a DataSource object from an Amazon Relational Database Service (http://aws.amazon.com/rds/) (Amazon RDS). A DataSource references data that can be used to perform CreateMLModel, CreateEvaluation, or CreateBatchPrediction operations. CreateDataSourceFromRDS is an asynchronous operation. In response to CreateDataSourceFromRDS, Amazon Machine Learning (Amazon ML) immediately returns and sets the DataSource status to PENDING. After the DataSource is created and ready for use, Amazon ML sets the Status parameter to COMPLETED. DataSource in the COMPLETED or PENDING state can be used only to perform >CreateMLModel>, CreateEvaluation, or CreateBatchPrediction operations. If Amazon ML cannot accept the input source, it sets the Status parameter to FAILED and includes an error message in the Message attribute of the GetDataSource operation response. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for Amazon Machine Learning's API operation CreateDataSourceFromRDS for usage and error information. Returned Error Types: - InvalidInputException An error on the client occurred. Typically, the cause is an invalid input value. - InternalServerException An error on the server occurred when trying to process a request. - IdempotentParameterMismatchException A second request to use or change an object was not allowed. This can result from retrying a request using a parameter that was not present in the original request.
func (c *MachineLearning) CreateDataSourceFromRDS(input *CreateDataSourceFromRDSInput) (*CreateDataSourceFromRDSOutput, error) { req, out := c.CreateDataSourceFromRDSRequest(input) return out, req.Send() }
func (c *DataZone) CreateDataSource(input *CreateDataSourceInput) (*CreateDataSourceOutput, error) { req, out := c.CreateDataSourceRequest(input) return out, req.Send() }
0.791786
aws/aws-sdk-go
service/machinelearning/api.go
aws/aws-sdk-go
service/datazone/api.go
Apache-2.0
go
CreateDataSourceFromRDS API operation for Amazon Machine Learning. Creates a DataSource object from an Amazon Relational Database Service (http://aws.amazon.com/rds/) (Amazon RDS). A DataSource references data that can be used to perform CreateMLModel, CreateEvaluation, or CreateBatchPrediction operations. CreateDataSourceFromRDS is an asynchronous operation. In response to CreateDataSourceFromRDS, Amazon Machine Learning (Amazon ML) immediately returns and sets the DataSource status to PENDING. After the DataSource is created and ready for use, Amazon ML sets the Status parameter to COMPLETED. DataSource in the COMPLETED or PENDING state can be used only to perform >CreateMLModel>, CreateEvaluation, or CreateBatchPrediction operations. If Amazon ML cannot accept the input source, it sets the Status parameter to FAILED and includes an error message in the Message attribute of the GetDataSource operation response. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for Amazon Machine Learning's API operation CreateDataSourceFromRDS for usage and error information. Returned Error Types: - InvalidInputException An error on the client occurred. Typically, the cause is an invalid input value. - InternalServerException An error on the server occurred when trying to process a request. - IdempotentParameterMismatchException A second request to use or change an object was not allowed. This can result from retrying a request using a parameter that was not present in the original request.
func (c *MachineLearning) CreateDataSourceFromRDS(input *CreateDataSourceFromRDSInput) (*CreateDataSourceFromRDSOutput, error) { req, out := c.CreateDataSourceFromRDSRequest(input) return out, req.Send() }
func (c *AppSync) CreateDataSource(input *CreateDataSourceInput) (*CreateDataSourceOutput, error) { req, out := c.CreateDataSourceRequest(input) return out, req.Send() }
0.75208
aws/aws-sdk-go
service/machinelearning/api.go
aws/aws-sdk-go
service/appsync/api.go
Apache-2.0
go
CreateDataSourceFromRDS API operation for Amazon Machine Learning. Creates a DataSource object from an Amazon Relational Database Service (http://aws.amazon.com/rds/) (Amazon RDS). A DataSource references data that can be used to perform CreateMLModel, CreateEvaluation, or CreateBatchPrediction operations. CreateDataSourceFromRDS is an asynchronous operation. In response to CreateDataSourceFromRDS, Amazon Machine Learning (Amazon ML) immediately returns and sets the DataSource status to PENDING. After the DataSource is created and ready for use, Amazon ML sets the Status parameter to COMPLETED. DataSource in the COMPLETED or PENDING state can be used only to perform >CreateMLModel>, CreateEvaluation, or CreateBatchPrediction operations. If Amazon ML cannot accept the input source, it sets the Status parameter to FAILED and includes an error message in the Message attribute of the GetDataSource operation response. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for Amazon Machine Learning's API operation CreateDataSourceFromRDS for usage and error information. Returned Error Types: - InvalidInputException An error on the client occurred. Typically, the cause is an invalid input value. - InternalServerException An error on the server occurred when trying to process a request. - IdempotentParameterMismatchException A second request to use or change an object was not allowed. This can result from retrying a request using a parameter that was not present in the original request.
func (c *MachineLearning) CreateDataSourceFromRDS(input *CreateDataSourceFromRDSInput) (*CreateDataSourceFromRDSOutput, error) { req, out := c.CreateDataSourceFromRDSRequest(input) return out, req.Send() }
func (c *MachineLearning) GetDataSource(input *GetDataSourceInput) (*GetDataSourceOutput, error) { req, out := c.GetDataSourceRequest(input) return out, req.Send() }
0.74573
aws/aws-sdk-go
service/machinelearning/api.go
aws/aws-sdk-go
service/machinelearning/api.go
Apache-2.0
go
WithHardlink creates a link in the directory which links to target. Target must be a path relative to the directory. Note: the argument order is the inverse of [os.Link] to be consistent with the other functions in this package.
func WithHardlink(path, target string) PathOp { return func(root Path) error { if _, ok := root.(manifestDirectory); ok { return fmt.Errorf("WithHardlink not implemented for manifests") } return os.Link(filepath.Join(root.Path(), target), filepath.Join(root.Path(), path)) } }
func WithHardlink(path, target string) PathOp { return func(root Path) error { if _, ok := root.(manifestDirectory); ok { return errors.New("WithHardlink not implemented for manifests") } return os.Link(filepath.Join(root.Path(), target), filepath.Join(root.Path(), path)) } }
0.989023
docker/cli
vendor/gotest.tools/v3/fs/ops.go
docker/app
vendor/gotest.tools/fs/ops.go
Apache-2.0
go
WithHardlink creates a link in the directory which links to target. Target must be a path relative to the directory. Note: the argument order is the inverse of [os.Link] to be consistent with the other functions in this package.
func WithHardlink(path, target string) PathOp { return func(root Path) error { if _, ok := root.(manifestDirectory); ok { return fmt.Errorf("WithHardlink not implemented for manifests") } return os.Link(filepath.Join(root.Path(), target), filepath.Join(root.Path(), path)) } }
func WithSymlink(path, target string) PathOp { return func(root Path) error { if v, ok := root.(manifestDirectory); ok { return v.AddSymlink(path, target) } return os.Symlink(filepath.Join(root.Path(), target), filepath.Join(root.Path(), path)) } }
0.788251
docker/cli
vendor/gotest.tools/v3/fs/ops.go
docker/cli
vendor/gotest.tools/v3/fs/ops.go
Apache-2.0
go
WithHardlink creates a link in the directory which links to target. Target must be a path relative to the directory. Note: the argument order is the inverse of [os.Link] to be consistent with the other functions in this package.
func WithHardlink(path, target string) PathOp { return func(root Path) error { if _, ok := root.(manifestDirectory); ok { return fmt.Errorf("WithHardlink not implemented for manifests") } return os.Link(filepath.Join(root.Path(), target), filepath.Join(root.Path(), path)) } }
func Link(src, dest string) error { if PathExists(dest) { // remove existing hard links as git won't follow them if err := os.Remove(dest); err != nil { return fmt.Errorf("could not remove link %s: %w", dest, err) } } return os.Link(src, dest) }
0.712283
docker/cli
vendor/gotest.tools/v3/fs/ops.go
thought-machine/please
src/fs/copy.go
Apache-2.0
go
WithHardlink creates a link in the directory which links to target. Target must be a path relative to the directory. Note: the argument order is the inverse of [os.Link] to be consistent with the other functions in this package.
func WithHardlink(path, target string) PathOp { return func(root Path) error { if _, ok := root.(manifestDirectory); ok { return fmt.Errorf("WithHardlink not implemented for manifests") } return os.Link(filepath.Join(root.Path(), target), filepath.Join(root.Path(), path)) } }
func RecursiveLink(from string, to string) error { return RecursiveCopyOrLinkFile(from, to, 0, true, true) }
0.698958
docker/cli
vendor/gotest.tools/v3/fs/ops.go
thought-machine/please
src/fs/copy.go
Apache-2.0
go
WithHardlink creates a link in the directory which links to target. Target must be a path relative to the directory. Note: the argument order is the inverse of [os.Link] to be consistent with the other functions in this package.
func WithHardlink(path, target string) PathOp { return func(root Path) error { if _, ok := root.(manifestDirectory); ok { return fmt.Errorf("WithHardlink not implemented for manifests") } return os.Link(filepath.Join(root.Path(), target), filepath.Join(root.Path(), path)) } }
func hardlinkRootPath(root, linkname string) (string, error) { ppath, base := filepath.Split(linkname) ppath, err := fs.RootPath(root, ppath) if err != nil { return "", err } targetPath := filepath.Join(ppath, base) if !strings.HasPrefix(targetPath, root) { targetPath = root } return targetPath, nil }
0.675026
docker/cli
vendor/gotest.tools/v3/fs/ops.go
moby/buildkit
vendor/github.com/containerd/containerd/v2/pkg/archive/tar.go
Apache-2.0
go
CreateWebLoginTokenWithContext is the same as CreateWebLoginToken with the addition of the ability to pass a context and additional request options. See CreateWebLoginToken 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 *MWAA) CreateWebLoginTokenWithContext(ctx aws.Context, input *CreateWebLoginTokenInput, opts ...request.Option) (*CreateWebLoginTokenOutput, error) { req, out := c.CreateWebLoginTokenRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *SSOOIDC) CreateTokenWithContext(ctx aws.Context, input *CreateTokenInput, opts ...request.Option) (*CreateTokenOutput, error) { req, out := c.CreateTokenRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.795641
aws/aws-sdk-go
service/mwaa/api.go
tektoncd/cli
vendor/github.com/aws/aws-sdk-go/service/ssooidc/api.go
Apache-2.0
go
CreateWebLoginTokenWithContext is the same as CreateWebLoginToken with the addition of the ability to pass a context and additional request options. See CreateWebLoginToken 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 *MWAA) CreateWebLoginTokenWithContext(ctx aws.Context, input *CreateWebLoginTokenInput, opts ...request.Option) (*CreateWebLoginTokenOutput, error) { req, out := c.CreateWebLoginTokenRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *IAM) CreateLoginProfileWithContext(ctx aws.Context, input *CreateLoginProfileInput, opts ...request.Option) (*CreateLoginProfileOutput, error) { req, out := c.CreateLoginProfileRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.776169
aws/aws-sdk-go
service/mwaa/api.go
aws/aws-sdk-go
service/iam/api.go
Apache-2.0
go
CreateWebLoginTokenWithContext is the same as CreateWebLoginToken with the addition of the ability to pass a context and additional request options. See CreateWebLoginToken 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 *MWAA) CreateWebLoginTokenWithContext(ctx aws.Context, input *CreateWebLoginTokenInput, opts ...request.Option) (*CreateWebLoginTokenOutput, error) { req, out := c.CreateWebLoginTokenRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *MWAA) CreateWebLoginTokenRequest(input *CreateWebLoginTokenInput) (req *request.Request, output *CreateWebLoginTokenOutput) { op := &request.Operation{ Name: opCreateWebLoginToken, HTTPMethod: "POST", HTTPPath: "/webtoken/{Name}", } if input == nil { input = &CreateWebLoginTokenInput{} } output = &CreateWebLoginTokenOutput{} req = c.newRequest(op, input, output) req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("env.", nil)) req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler) return }
0.771372
aws/aws-sdk-go
service/mwaa/api.go
aws/aws-sdk-go
service/mwaa/api.go
Apache-2.0
go
CreateWebLoginTokenWithContext is the same as CreateWebLoginToken with the addition of the ability to pass a context and additional request options. See CreateWebLoginToken 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 *MWAA) CreateWebLoginTokenWithContext(ctx aws.Context, input *CreateWebLoginTokenInput, opts ...request.Option) (*CreateWebLoginTokenOutput, error) { req, out := c.CreateWebLoginTokenRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *SSOOIDC) CreateTokenWithIAMWithContext(ctx aws.Context, input *CreateTokenWithIAMInput, opts ...request.Option) (*CreateTokenWithIAMOutput, error) { req, out := c.CreateTokenWithIAMRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.741398
aws/aws-sdk-go
service/mwaa/api.go
tektoncd/cli
vendor/github.com/aws/aws-sdk-go/service/ssooidc/api.go
Apache-2.0
go
CreateWebLoginTokenWithContext is the same as CreateWebLoginToken with the addition of the ability to pass a context and additional request options. See CreateWebLoginToken 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 *MWAA) CreateWebLoginTokenWithContext(ctx aws.Context, input *CreateWebLoginTokenInput, opts ...request.Option) (*CreateWebLoginTokenOutput, error) { req, out := c.CreateWebLoginTokenRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *MWAA) CreateCliTokenWithContext(ctx aws.Context, input *CreateCliTokenInput, opts ...request.Option) (*CreateCliTokenOutput, error) { req, out := c.CreateCliTokenRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.733044
aws/aws-sdk-go
service/mwaa/api.go
aws/aws-sdk-go
service/mwaa/api.go
Apache-2.0
go
ListCustomRoutingPortMappingsWithContext is the same as ListCustomRoutingPortMappings with the addition of the ability to pass a context and additional request options. See ListCustomRoutingPortMappings 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 *GlobalAccelerator) ListCustomRoutingPortMappingsWithContext(ctx aws.Context, input *ListCustomRoutingPortMappingsInput, opts ...request.Option) (*ListCustomRoutingPortMappingsOutput, error) { req, out := c.ListCustomRoutingPortMappingsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *GlobalAccelerator) ListCustomRoutingPortMappingsPagesWithContext(ctx aws.Context, input *ListCustomRoutingPortMappingsInput, fn func(*ListCustomRoutingPortMappingsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *ListCustomRoutingPortMappingsInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.ListCustomRoutingPortMappingsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*ListCustomRoutingPortMappingsOutput), !p.HasNextPage()) { break } } return p.Err() }
0.930732
aws/aws-sdk-go
service/globalaccelerator/api.go
aws/aws-sdk-go
service/globalaccelerator/api.go
Apache-2.0
go
ListCustomRoutingPortMappingsWithContext is the same as ListCustomRoutingPortMappings with the addition of the ability to pass a context and additional request options. See ListCustomRoutingPortMappings 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 *GlobalAccelerator) ListCustomRoutingPortMappingsWithContext(ctx aws.Context, input *ListCustomRoutingPortMappingsInput, opts ...request.Option) (*ListCustomRoutingPortMappingsOutput, error) { req, out := c.ListCustomRoutingPortMappingsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *GlobalAccelerator) ListCustomRoutingPortMappingsByDestinationWithContext(ctx aws.Context, input *ListCustomRoutingPortMappingsByDestinationInput, opts ...request.Option) (*ListCustomRoutingPortMappingsByDestinationOutput, error) { req, out := c.ListCustomRoutingPortMappingsByDestinationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.897571
aws/aws-sdk-go
service/globalaccelerator/api.go
aws/aws-sdk-go
service/globalaccelerator/api.go
Apache-2.0
go
ListCustomRoutingPortMappingsWithContext is the same as ListCustomRoutingPortMappings with the addition of the ability to pass a context and additional request options. See ListCustomRoutingPortMappings 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 *GlobalAccelerator) ListCustomRoutingPortMappingsWithContext(ctx aws.Context, input *ListCustomRoutingPortMappingsInput, opts ...request.Option) (*ListCustomRoutingPortMappingsOutput, error) { req, out := c.ListCustomRoutingPortMappingsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *GlobalAccelerator) ListCustomRoutingPortMappingsByDestinationPagesWithContext(ctx aws.Context, input *ListCustomRoutingPortMappingsByDestinationInput, fn func(*ListCustomRoutingPortMappingsByDestinationOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *ListCustomRoutingPortMappingsByDestinationInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.ListCustomRoutingPortMappingsByDestinationRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*ListCustomRoutingPortMappingsByDestinationOutput), !p.HasNextPage()) { break } } return p.Err() }
0.868698
aws/aws-sdk-go
service/globalaccelerator/api.go
aws/aws-sdk-go
service/globalaccelerator/api.go
Apache-2.0
go
ListCustomRoutingPortMappingsWithContext is the same as ListCustomRoutingPortMappings with the addition of the ability to pass a context and additional request options. See ListCustomRoutingPortMappings 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 *GlobalAccelerator) ListCustomRoutingPortMappingsWithContext(ctx aws.Context, input *ListCustomRoutingPortMappingsInput, opts ...request.Option) (*ListCustomRoutingPortMappingsOutput, error) { req, out := c.ListCustomRoutingPortMappingsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *GlobalAccelerator) ListCustomRoutingPortMappingsPages(input *ListCustomRoutingPortMappingsInput, fn func(*ListCustomRoutingPortMappingsOutput, bool) bool) error { return c.ListCustomRoutingPortMappingsPagesWithContext(aws.BackgroundContext(), input, fn) }
0.821077
aws/aws-sdk-go
service/globalaccelerator/api.go
aws/aws-sdk-go
service/globalaccelerator/api.go
Apache-2.0
go
ListCustomRoutingPortMappingsWithContext is the same as ListCustomRoutingPortMappings with the addition of the ability to pass a context and additional request options. See ListCustomRoutingPortMappings 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 *GlobalAccelerator) ListCustomRoutingPortMappingsWithContext(ctx aws.Context, input *ListCustomRoutingPortMappingsInput, opts ...request.Option) (*ListCustomRoutingPortMappingsOutput, error) { req, out := c.ListCustomRoutingPortMappingsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *GlobalAccelerator) ListCustomRoutingListenersWithContext(ctx aws.Context, input *ListCustomRoutingListenersInput, opts ...request.Option) (*ListCustomRoutingListenersOutput, error) { req, out := c.ListCustomRoutingListenersRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.81083
aws/aws-sdk-go
service/globalaccelerator/api.go
aws/aws-sdk-go
service/globalaccelerator/api.go
Apache-2.0
go
DeleteConnectorDefinition API operation for AWS Greengrass. Deletes a connector definition. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for AWS Greengrass's API operation DeleteConnectorDefinition for usage and error information. Returned Error Types: - BadRequestException General error information. See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DeleteConnectorDefinition
func (c *Greengrass) DeleteConnectorDefinition(input *DeleteConnectorDefinitionInput) (*DeleteConnectorDefinitionOutput, error) { req, out := c.DeleteConnectorDefinitionRequest(input) return out, req.Send() }
func (c *Greengrass) UpdateConnectorDefinition(input *UpdateConnectorDefinitionInput) (*UpdateConnectorDefinitionOutput, error) { req, out := c.UpdateConnectorDefinitionRequest(input) return out, req.Send() }
0.833171
aws/aws-sdk-go
service/greengrass/api.go
aws/aws-sdk-go
service/greengrass/api.go
Apache-2.0
go
DeleteConnectorDefinition API operation for AWS Greengrass. Deletes a connector definition. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for AWS Greengrass's API operation DeleteConnectorDefinition for usage and error information. Returned Error Types: - BadRequestException General error information. See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DeleteConnectorDefinition
func (c *Greengrass) DeleteConnectorDefinition(input *DeleteConnectorDefinitionInput) (*DeleteConnectorDefinitionOutput, error) { req, out := c.DeleteConnectorDefinitionRequest(input) return out, req.Send() }
func (c *Greengrass) CreateConnectorDefinition(input *CreateConnectorDefinitionInput) (*CreateConnectorDefinitionOutput, error) { req, out := c.CreateConnectorDefinitionRequest(input) return out, req.Send() }
0.831838
aws/aws-sdk-go
service/greengrass/api.go
aws/aws-sdk-go
service/greengrass/api.go
Apache-2.0
go
DeleteConnectorDefinition API operation for AWS Greengrass. Deletes a connector definition. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for AWS Greengrass's API operation DeleteConnectorDefinition for usage and error information. Returned Error Types: - BadRequestException General error information. See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DeleteConnectorDefinition
func (c *Greengrass) DeleteConnectorDefinition(input *DeleteConnectorDefinitionInput) (*DeleteConnectorDefinitionOutput, error) { req, out := c.DeleteConnectorDefinitionRequest(input) return out, req.Send() }
func (c *Greengrass) DeleteConnectorDefinitionRequest(input *DeleteConnectorDefinitionInput) (req *request.Request, output *DeleteConnectorDefinitionOutput) { op := &request.Operation{ Name: opDeleteConnectorDefinition, HTTPMethod: "DELETE", HTTPPath: "/greengrass/definition/connectors/{ConnectorDefinitionId}", } if input == nil { input = &DeleteConnectorDefinitionInput{} } output = &DeleteConnectorDefinitionOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return }
0.803232
aws/aws-sdk-go
service/greengrass/api.go
aws/aws-sdk-go
service/greengrass/api.go
Apache-2.0
go
DeleteConnectorDefinition API operation for AWS Greengrass. Deletes a connector definition. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for AWS Greengrass's API operation DeleteConnectorDefinition for usage and error information. Returned Error Types: - BadRequestException General error information. See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DeleteConnectorDefinition
func (c *Greengrass) DeleteConnectorDefinition(input *DeleteConnectorDefinitionInput) (*DeleteConnectorDefinitionOutput, error) { req, out := c.DeleteConnectorDefinitionRequest(input) return out, req.Send() }
func (c *Greengrass) GetConnectorDefinition(input *GetConnectorDefinitionInput) (*GetConnectorDefinitionOutput, error) { req, out := c.GetConnectorDefinitionRequest(input) return out, req.Send() }
0.801112
aws/aws-sdk-go
service/greengrass/api.go
aws/aws-sdk-go
service/greengrass/api.go
Apache-2.0
go
DeleteConnectorDefinition API operation for AWS Greengrass. Deletes a connector definition. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for AWS Greengrass's API operation DeleteConnectorDefinition for usage and error information. Returned Error Types: - BadRequestException General error information. See also, https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DeleteConnectorDefinition
func (c *Greengrass) DeleteConnectorDefinition(input *DeleteConnectorDefinitionInput) (*DeleteConnectorDefinitionOutput, error) { req, out := c.DeleteConnectorDefinitionRequest(input) return out, req.Send() }
func (c *Greengrass) DeleteConnectorDefinitionWithContext(ctx aws.Context, input *DeleteConnectorDefinitionInput, opts ...request.Option) (*DeleteConnectorDefinitionOutput, error) { req, out := c.DeleteConnectorDefinitionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.766296
aws/aws-sdk-go
service/greengrass/api.go
aws/aws-sdk-go
service/greengrass/api.go
Apache-2.0
go
styleFromTag takes the given style, defined by a foreground color (fgColor), a background color (bgColor), and style attributes, and modifies it based on the substrings (tagSubstrings) extracted by the regular expression for color tags. The new colors and attributes are returned where empty strings mean "don't modify" and a dash ("-") means "reset to default".
func styleFromTag(fgColor, bgColor, attributes string, tagSubstrings []string) (newFgColor, newBgColor, newAttributes string) { if tagSubstrings[colorForegroundPos] != "" { color := tagSubstrings[colorForegroundPos] if color == "-" { fgColor = "-" } else if color != "" { fgColor = color } } if tagSubstrings[colorBackgroundPos-1] != "" { color := tagSubstrings[colorBackgroundPos] if color == "-" { bgColor = "-" } else if color != "" { bgColor = color } } if tagSubstrings[colorFlagPos-1] != "" { flags := tagSubstrings[colorFlagPos] if flags == "-" { attributes = "-" } else if flags != "" { attributes = flags } } return fgColor, bgColor, attributes }
func (hs Style) Tag(tag token.Tokens) StyleEntry { se := hs.TagRaw(tag).Inherit( hs.TagRaw(token.Text), hs.TagRaw(tag.Cat()), hs.TagRaw(tag.SubCat())) return se }
0.601828
containers/podman-tui
vendor/github.com/rivo/tview/util.go
cogentcore/core
texteditor/highlighting/style.go
BSD-3-Clause
go
styleFromTag takes the given style, defined by a foreground color (fgColor), a background color (bgColor), and style attributes, and modifies it based on the substrings (tagSubstrings) extracted by the regular expression for color tags. The new colors and attributes are returned where empty strings mean "don't modify" and a dash ("-") means "reset to default".
func styleFromTag(fgColor, bgColor, attributes string, tagSubstrings []string) (newFgColor, newBgColor, newAttributes string) { if tagSubstrings[colorForegroundPos] != "" { color := tagSubstrings[colorForegroundPos] if color == "-" { fgColor = "-" } else if color != "" { fgColor = color } } if tagSubstrings[colorBackgroundPos-1] != "" { color := tagSubstrings[colorBackgroundPos] if color == "-" { bgColor = "-" } else if color != "" { bgColor = color } } if tagSubstrings[colorFlagPos-1] != "" { flags := tagSubstrings[colorFlagPos] if flags == "-" { attributes = "-" } else if flags != "" { attributes = flags } } return fgColor, bgColor, attributes }
func styleFromTags(w Widget, tags reflect.StructTag) { w.AsWidget().Styler(func(s *styles.Style) { setFromTag(tags, "width", s.Min.X.Ch) setFromTag(tags, "max-width", s.Max.X.Ch) setFromTag(tags, "height", s.Min.Y.Em) setFromTag(tags, "max-height", s.Max.Y.Em) setFromTag(tags, "grow", func(v float32) { s.Grow.X = v }) setFromTag(tags, "grow-y", func(v float32) { s.Grow.Y = v }) }) if tags.Get("new-window") == "+" { w.AsWidget().setFlag(true, widgetValueNewWindow) } }
0.540336
containers/podman-tui
vendor/github.com/rivo/tview/util.go
cogentcore/core
core/style.go
BSD-3-Clause
go
styleFromTag takes the given style, defined by a foreground color (fgColor), a background color (bgColor), and style attributes, and modifies it based on the substrings (tagSubstrings) extracted by the regular expression for color tags. The new colors and attributes are returned where empty strings mean "don't modify" and a dash ("-") means "reset to default".
func styleFromTag(fgColor, bgColor, attributes string, tagSubstrings []string) (newFgColor, newBgColor, newAttributes string) { if tagSubstrings[colorForegroundPos] != "" { color := tagSubstrings[colorForegroundPos] if color == "-" { fgColor = "-" } else if color != "" { fgColor = color } } if tagSubstrings[colorBackgroundPos-1] != "" { color := tagSubstrings[colorBackgroundPos] if color == "-" { bgColor = "-" } else if color != "" { bgColor = color } } if tagSubstrings[colorFlagPos-1] != "" { flags := tagSubstrings[colorFlagPos] if flags == "-" { attributes = "-" } else if flags != "" { attributes = flags } } return fgColor, bgColor, attributes }
func Styler(attrs ...attribute) func(interface{}) string { attrstrs := make([]string, len(attrs)) for i, v := range attrs { attrstrs[i] = strconv.Itoa(int(v)) } seq := strings.Join(attrstrs, ";") return func(v interface{}) string { end := "" s, ok := v.(string) if !ok || !strings.HasSuffix(s, ResetCode) { end = ResetCode } return fmt.Sprintf("%s%sm%v%s", esc, seq, v, end) } }
0.539272
containers/podman-tui
vendor/github.com/rivo/tview/util.go
containers/podman-tui
vendor/github.com/manifoldco/promptui/codes.go
Apache-2.0
go
styleFromTag takes the given style, defined by a foreground color (fgColor), a background color (bgColor), and style attributes, and modifies it based on the substrings (tagSubstrings) extracted by the regular expression for color tags. The new colors and attributes are returned where empty strings mean "don't modify" and a dash ("-") means "reset to default".
func styleFromTag(fgColor, bgColor, attributes string, tagSubstrings []string) (newFgColor, newBgColor, newAttributes string) { if tagSubstrings[colorForegroundPos] != "" { color := tagSubstrings[colorForegroundPos] if color == "-" { fgColor = "-" } else if color != "" { fgColor = color } } if tagSubstrings[colorBackgroundPos-1] != "" { color := tagSubstrings[colorBackgroundPos] if color == "-" { bgColor = "-" } else if color != "" { bgColor = color } } if tagSubstrings[colorFlagPos-1] != "" { flags := tagSubstrings[colorFlagPos] if flags == "-" { attributes = "-" } else if flags != "" { attributes = flags } } return fgColor, bgColor, attributes }
func style(elms ...string) string { str := "" for _, e := range elms { if e == "" { continue } if str != "" { str += ";" } str += e } if str == "" { return "" } return "style=\"" + str + "\"" }
0.509118
containers/podman-tui
vendor/github.com/rivo/tview/util.go
gonum/plot
vg/vgsvg/vgsvg.go
BSD-3-Clause
go
styleFromTag takes the given style, defined by a foreground color (fgColor), a background color (bgColor), and style attributes, and modifies it based on the substrings (tagSubstrings) extracted by the regular expression for color tags. The new colors and attributes are returned where empty strings mean "don't modify" and a dash ("-") means "reset to default".
func styleFromTag(fgColor, bgColor, attributes string, tagSubstrings []string) (newFgColor, newBgColor, newAttributes string) { if tagSubstrings[colorForegroundPos] != "" { color := tagSubstrings[colorForegroundPos] if color == "-" { fgColor = "-" } else if color != "" { fgColor = color } } if tagSubstrings[colorBackgroundPos-1] != "" { color := tagSubstrings[colorBackgroundPos] if color == "-" { bgColor = "-" } else if color != "" { bgColor = color } } if tagSubstrings[colorFlagPos-1] != "" { flags := tagSubstrings[colorFlagPos] if flags == "-" { attributes = "-" } else if flags != "" { attributes = flags } } return fgColor, bgColor, attributes }
func MakeColorSafe(s string) (Color, error) { var col IColor var err error col, err = MakeTCellColor(s) if err == nil { return Color{col, s}, nil } col, err = MakeRGBColorSafe(s) if err == nil { return Color{col, s}, nil } col, err = MakeGrayColorSafe(s) if err == nil { return Color{col, s}, nil } col, err = NewUrwidColorSafe(s) if err == nil { return Color{col, s}, nil } return Color{}, errors.WithStack(InvalidColor{Color: s}) }
0.488767
containers/podman-tui
vendor/github.com/rivo/tview/util.go
gcla/gowid
decoration.go
MIT
go
CreateBranchRequest generates a "aws/request.Request" representing the client's request for the CreateBranch 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 CreateBranch for more information on using the CreateBranch 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 CreateBranchRequest method. req, resp := client.CreateBranchRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/CreateBranch
func (c *Amplify) CreateBranchRequest(input *CreateBranchInput) (req *request.Request, output *CreateBranchOutput) { op := &request.Operation{ Name: opCreateBranch, HTTPMethod: "POST", HTTPPath: "/apps/{appId}/branches", } if input == nil { input = &CreateBranchInput{} } output = &CreateBranchOutput{} req = c.newRequest(op, input, output) return }
func (c *CodeCommit) CreateBranchRequest(input *CreateBranchInput) (req *request.Request, output *CreateBranchOutput) { op := &request.Operation{ Name: opCreateBranch, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &CreateBranchInput{} } output = &CreateBranchOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return }
0.9869
aws/aws-sdk-go
service/amplify/api.go
aws/aws-sdk-go
service/codecommit/api.go
Apache-2.0
go
CreateBranchRequest generates a "aws/request.Request" representing the client's request for the CreateBranch 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 CreateBranch for more information on using the CreateBranch 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 CreateBranchRequest method. req, resp := client.CreateBranchRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/CreateBranch
func (c *Amplify) CreateBranchRequest(input *CreateBranchInput) (req *request.Request, output *CreateBranchOutput) { op := &request.Operation{ Name: opCreateBranch, HTTPMethod: "POST", HTTPPath: "/apps/{appId}/branches", } if input == nil { input = &CreateBranchInput{} } output = &CreateBranchOutput{} req = c.newRequest(op, input, output) return }
func (c *Amplify) GetBranchRequest(input *GetBranchInput) (req *request.Request, output *GetBranchOutput) { op := &request.Operation{ Name: opGetBranch, HTTPMethod: "GET", HTTPPath: "/apps/{appId}/branches/{branchName}", } if input == nil { input = &GetBranchInput{} } output = &GetBranchOutput{} req = c.newRequest(op, input, output) return }
0.834052
aws/aws-sdk-go
service/amplify/api.go
aws/aws-sdk-go
service/amplify/api.go
Apache-2.0
go
CreateBranchRequest generates a "aws/request.Request" representing the client's request for the CreateBranch 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 CreateBranch for more information on using the CreateBranch 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 CreateBranchRequest method. req, resp := client.CreateBranchRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/CreateBranch
func (c *Amplify) CreateBranchRequest(input *CreateBranchInput) (req *request.Request, output *CreateBranchOutput) { op := &request.Operation{ Name: opCreateBranch, HTTPMethod: "POST", HTTPPath: "/apps/{appId}/branches", } if input == nil { input = &CreateBranchInput{} } output = &CreateBranchOutput{} req = c.newRequest(op, input, output) return }
func (c *CodeCommit) GetBranchRequest(input *GetBranchInput) (req *request.Request, output *GetBranchOutput) { op := &request.Operation{ Name: opGetBranch, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetBranchInput{} } output = &GetBranchOutput{} req = c.newRequest(op, input, output) return }
0.826481
aws/aws-sdk-go
service/amplify/api.go
aws/aws-sdk-go
service/codecommit/api.go
Apache-2.0
go
CreateBranchRequest generates a "aws/request.Request" representing the client's request for the CreateBranch 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 CreateBranch for more information on using the CreateBranch 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 CreateBranchRequest method. req, resp := client.CreateBranchRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/CreateBranch
func (c *Amplify) CreateBranchRequest(input *CreateBranchInput) (req *request.Request, output *CreateBranchOutput) { op := &request.Operation{ Name: opCreateBranch, HTTPMethod: "POST", HTTPPath: "/apps/{appId}/branches", } if input == nil { input = &CreateBranchInput{} } output = &CreateBranchOutput{} req = c.newRequest(op, input, output) return }
func (c *Amplify) DeleteBranchRequest(input *DeleteBranchInput) (req *request.Request, output *DeleteBranchOutput) { op := &request.Operation{ Name: opDeleteBranch, HTTPMethod: "DELETE", HTTPPath: "/apps/{appId}/branches/{branchName}", } if input == nil { input = &DeleteBranchInput{} } output = &DeleteBranchOutput{} req = c.newRequest(op, input, output) return }
0.787092
aws/aws-sdk-go
service/amplify/api.go
aws/aws-sdk-go
service/amplify/api.go
Apache-2.0
go
CreateBranchRequest generates a "aws/request.Request" representing the client's request for the CreateBranch 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 CreateBranch for more information on using the CreateBranch 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 CreateBranchRequest method. req, resp := client.CreateBranchRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/CreateBranch
func (c *Amplify) CreateBranchRequest(input *CreateBranchInput) (req *request.Request, output *CreateBranchOutput) { op := &request.Operation{ Name: opCreateBranch, HTTPMethod: "POST", HTTPPath: "/apps/{appId}/branches", } if input == nil { input = &CreateBranchInput{} } output = &CreateBranchOutput{} req = c.newRequest(op, input, output) return }
func (c *CodeCommit) DeleteBranchRequest(input *DeleteBranchInput) (req *request.Request, output *DeleteBranchOutput) { op := &request.Operation{ Name: opDeleteBranch, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteBranchInput{} } output = &DeleteBranchOutput{} req = c.newRequest(op, input, output) return }
0.776916
aws/aws-sdk-go
service/amplify/api.go
aws/aws-sdk-go
service/codecommit/api.go
Apache-2.0
go
WaitUntilLifecyclePolicyPreviewComplete uses the Amazon ECR API operation GetLifecyclePolicyPreview to wait for a condition to be met before returning. If the condition is not met within the max attempt window, an error will be returned.
func (c *ECR) WaitUntilLifecyclePolicyPreviewComplete(input *GetLifecyclePolicyPreviewInput) error { return c.WaitUntilLifecyclePolicyPreviewCompleteWithContext(aws.BackgroundContext(), input) }
func (c *ECR) WaitUntilLifecyclePolicyPreviewCompleteWithContext(ctx aws.Context, input *GetLifecyclePolicyPreviewInput, opts ...request.WaiterOption) error { w := request.Waiter{ Name: "WaitUntilLifecyclePolicyPreviewComplete", MaxAttempts: 20, Delay: request.ConstantWaiterDelay(5 * time.Second), Acceptors: []request.WaiterAcceptor{ { State: request.SuccessWaiterState, Matcher: request.PathWaiterMatch, Argument: "status", Expected: "COMPLETE", }, { State: request.FailureWaiterState, Matcher: request.PathWaiterMatch, Argument: "status", Expected: "FAILED", }, }, Logger: c.Config.Logger, NewRequest: func(opts []request.Option) (*request.Request, error) { var inCpy *GetLifecyclePolicyPreviewInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.GetLifecyclePolicyPreviewRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } w.ApplyOptions(opts...) return w.WaitWithContext(ctx) }
0.79674
aws/aws-sdk-go
service/ecr/waiters.go
aws/aws-sdk-go
service/ecr/waiters.go
Apache-2.0
go
WaitUntilLifecyclePolicyPreviewComplete uses the Amazon ECR API operation GetLifecyclePolicyPreview to wait for a condition to be met before returning. If the condition is not met within the max attempt window, an error will be returned.
func (c *ECR) WaitUntilLifecyclePolicyPreviewComplete(input *GetLifecyclePolicyPreviewInput) error { return c.WaitUntilLifecyclePolicyPreviewCompleteWithContext(aws.BackgroundContext(), input) }
func (c *ECR) GetLifecyclePolicyPreview(input *GetLifecyclePolicyPreviewInput) (*GetLifecyclePolicyPreviewOutput, error) { req, out := c.GetLifecyclePolicyPreviewRequest(input) return out, req.Send() }
0.732095
aws/aws-sdk-go
service/ecr/waiters.go
aws/aws-sdk-go
service/ecr/api.go
Apache-2.0
go
WaitUntilLifecyclePolicyPreviewComplete uses the Amazon ECR API operation GetLifecyclePolicyPreview to wait for a condition to be met before returning. If the condition is not met within the max attempt window, an error will be returned.
func (c *ECR) WaitUntilLifecyclePolicyPreviewComplete(input *GetLifecyclePolicyPreviewInput) error { return c.WaitUntilLifecyclePolicyPreviewCompleteWithContext(aws.BackgroundContext(), input) }
func (w *LifecyclePolicyPreviewCompleteWaiter) Wait(ctx context.Context, params *GetLifecyclePolicyPreviewInput, maxWaitDur time.Duration, optFns ...func(*LifecyclePolicyPreviewCompleteWaiterOptions)) error { _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) return err }
0.702332
aws/aws-sdk-go
service/ecr/waiters.go
tektoncd/cli
vendor/github.com/aws/aws-sdk-go-v2/service/ecr/api_op_GetLifecyclePolicyPreview.go
Apache-2.0
go
WaitUntilLifecyclePolicyPreviewComplete uses the Amazon ECR API operation GetLifecyclePolicyPreview to wait for a condition to be met before returning. If the condition is not met within the max attempt window, an error will be returned.
func (c *ECR) WaitUntilLifecyclePolicyPreviewComplete(input *GetLifecyclePolicyPreviewInput) error { return c.WaitUntilLifecyclePolicyPreviewCompleteWithContext(aws.BackgroundContext(), input) }
func (c *ECR) GetLifecyclePolicyPreviewWithContext(ctx aws.Context, input *GetLifecyclePolicyPreviewInput, opts ...request.Option) (*GetLifecyclePolicyPreviewOutput, error) { req, out := c.GetLifecyclePolicyPreviewRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.695608
aws/aws-sdk-go
service/ecr/waiters.go
aws/aws-sdk-go
service/ecr/api.go
Apache-2.0
go
WaitUntilLifecyclePolicyPreviewComplete uses the Amazon ECR API operation GetLifecyclePolicyPreview to wait for a condition to be met before returning. If the condition is not met within the max attempt window, an error will be returned.
func (c *ECR) WaitUntilLifecyclePolicyPreviewComplete(input *GetLifecyclePolicyPreviewInput) error { return c.WaitUntilLifecyclePolicyPreviewCompleteWithContext(aws.BackgroundContext(), input) }
func (c *ECR) StartLifecyclePolicyPreview(input *StartLifecyclePolicyPreviewInput) (*StartLifecyclePolicyPreviewOutput, error) { req, out := c.StartLifecyclePolicyPreviewRequest(input) return out, req.Send() }
0.684583
aws/aws-sdk-go
service/ecr/waiters.go
aws/aws-sdk-go
service/ecr/api.go
Apache-2.0
go
GetNestedMethod resolves a certain public method in anonymous structs, it will look for the specific method in every anonymous struct field recursively. Deprecated, this is an old API in mockito. Please use GetMethod instead.
func GetNestedMethod(instance interface{}, methodName string) interface{} { if typ := reflect.TypeOf(instance); typ != nil { if m, ok := getNestedMethod(reflect.ValueOf(instance), methodName); ok { return m.Func.Interface() } } tool.Assert(false, "can't reflect instance method :%v", methodName) return nil }
func getFieldMethod(instance interface{}, fieldName string) (interface{}, bool) { v := reflect.Indirect(reflect.ValueOf(instance)) if v.Kind() != reflect.Struct { return nil, false } field := v.FieldByName(fieldName) if !field.IsValid() || field.Kind() != reflect.Func { return nil, false } carrier := reflect.MakeFunc(field.Type(), nil) type function struct { _ uintptr fnAddr *uintptr } *(*function)(unsafe.Pointer(&carrier)).fnAddr = field.Pointer() return carrier.Interface(), true }
0.633093
bytedance/mockey
utils.go
bytedance/mockey
utils.go
Apache-2.0
go
GetNestedMethod resolves a certain public method in anonymous structs, it will look for the specific method in every anonymous struct field recursively. Deprecated, this is an old API in mockito. Please use GetMethod instead.
func GetNestedMethod(instance interface{}, methodName string) interface{} { if typ := reflect.TypeOf(instance); typ != nil { if m, ok := getNestedMethod(reflect.ValueOf(instance), methodName); ok { return m.Func.Interface() } } tool.Assert(false, "can't reflect instance method :%v", methodName) return nil }
func (c *APIGateway) GetMethod(input *GetMethodInput) (*Method, error) { req, out := c.GetMethodRequest(input) return out, req.Send() }
0.502957
bytedance/mockey
utils.go
aws/aws-sdk-go
service/apigateway/api.go
Apache-2.0
go
GetNestedMethod resolves a certain public method in anonymous structs, it will look for the specific method in every anonymous struct field recursively. Deprecated, this is an old API in mockito. Please use GetMethod instead.
func GetNestedMethod(instance interface{}, methodName string) interface{} { if typ := reflect.TypeOf(instance); typ != nil { if m, ok := getNestedMethod(reflect.ValueOf(instance), methodName); ok { return m.Func.Interface() } } tool.Assert(false, "can't reflect instance method :%v", methodName) return nil }
func (v Value) NumMethod() int { if v.typ() == nil { panic(&ValueError{"reflect.Value.NumMethod", Invalid}) } if v.flag&flagMethod != 0 { return 0 } return toRType(v.typ()).NumMethod() }
0.474491
bytedance/mockey
utils.go
goplus/llgo
runtime/internal/lib/reflect/value.go
Apache-2.0
go
GetNestedMethod resolves a certain public method in anonymous structs, it will look for the specific method in every anonymous struct field recursively. Deprecated, this is an old API in mockito. Please use GetMethod instead.
func GetNestedMethod(instance interface{}, methodName string) interface{} { if typ := reflect.TypeOf(instance); typ != nil { if m, ok := getNestedMethod(reflect.ValueOf(instance), methodName); ok { return m.Func.Interface() } } tool.Assert(false, "can't reflect instance method :%v", methodName) return nil }
func (s *Service) AddAllMethods(target interface{}, namespace ...string) *Service { s.methodManager.AddAllMethods(target, namespace...) return s }
0.473062
bytedance/mockey
utils.go
hprose/hprose-golang
rpc/core/service.go
MIT
go
GetNestedMethod resolves a certain public method in anonymous structs, it will look for the specific method in every anonymous struct field recursively. Deprecated, this is an old API in mockito. Please use GetMethod instead.
func GetNestedMethod(instance interface{}, methodName string) interface{} { if typ := reflect.TypeOf(instance); typ != nil { if m, ok := getNestedMethod(reflect.ValueOf(instance), methodName); ok { return m.Func.Interface() } } tool.Assert(false, "can't reflect instance method :%v", methodName) return nil }
func GetStructKeys(typ reflect.Type, tag, squashValue string) []string { return appendStructKeys(typ, tag, ","+squashValue, nil, nil) }
0.468616
bytedance/mockey
utils.go
treeverse/lakeFS
pkg/config/struct_keys.go
Apache-2.0
go
PutConfigurationSetDeliveryOptionsRequest generates a "aws/request.Request" representing the client's request for the PutConfigurationSetDeliveryOptions 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 PutConfigurationSetDeliveryOptions for more information on using the PutConfigurationSetDeliveryOptions 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 PutConfigurationSetDeliveryOptionsRequest method. req, resp := client.PutConfigurationSetDeliveryOptionsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-email-2018-07-26/PutConfigurationSetDeliveryOptions
func (c *PinpointEmail) PutConfigurationSetDeliveryOptionsRequest(input *PutConfigurationSetDeliveryOptionsInput) (req *request.Request, output *PutConfigurationSetDeliveryOptionsOutput) { op := &request.Operation{ Name: opPutConfigurationSetDeliveryOptions, HTTPMethod: "PUT", HTTPPath: "/v1/email/configuration-sets/{ConfigurationSetName}/delivery-options", } if input == nil { input = &PutConfigurationSetDeliveryOptionsInput{} } output = &PutConfigurationSetDeliveryOptionsOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return }
func (c *SES) PutConfigurationSetDeliveryOptionsRequest(input *PutConfigurationSetDeliveryOptionsInput) (req *request.Request, output *PutConfigurationSetDeliveryOptionsOutput) { op := &request.Operation{ Name: opPutConfigurationSetDeliveryOptions, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &PutConfigurationSetDeliveryOptionsInput{} } output = &PutConfigurationSetDeliveryOptionsOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return }
0.994643
aws/aws-sdk-go
service/pinpointemail/api.go
aws/aws-sdk-go
service/ses/api.go
Apache-2.0
go
PutConfigurationSetDeliveryOptionsRequest generates a "aws/request.Request" representing the client's request for the PutConfigurationSetDeliveryOptions 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 PutConfigurationSetDeliveryOptions for more information on using the PutConfigurationSetDeliveryOptions 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 PutConfigurationSetDeliveryOptionsRequest method. req, resp := client.PutConfigurationSetDeliveryOptionsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-email-2018-07-26/PutConfigurationSetDeliveryOptions
func (c *PinpointEmail) PutConfigurationSetDeliveryOptionsRequest(input *PutConfigurationSetDeliveryOptionsInput) (req *request.Request, output *PutConfigurationSetDeliveryOptionsOutput) { op := &request.Operation{ Name: opPutConfigurationSetDeliveryOptions, HTTPMethod: "PUT", HTTPPath: "/v1/email/configuration-sets/{ConfigurationSetName}/delivery-options", } if input == nil { input = &PutConfigurationSetDeliveryOptionsInput{} } output = &PutConfigurationSetDeliveryOptionsOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return }
func (c *SESV2) PutConfigurationSetDeliveryOptionsRequest(input *PutConfigurationSetDeliveryOptionsInput) (req *request.Request, output *PutConfigurationSetDeliveryOptionsOutput) { op := &request.Operation{ Name: opPutConfigurationSetDeliveryOptions, HTTPMethod: "PUT", HTTPPath: "/v2/email/configuration-sets/{ConfigurationSetName}/delivery-options", } if input == nil { input = &PutConfigurationSetDeliveryOptionsInput{} } output = &PutConfigurationSetDeliveryOptionsOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return }
0.990655
aws/aws-sdk-go
service/pinpointemail/api.go
aws/aws-sdk-go
service/sesv2/api.go
Apache-2.0
go
PutConfigurationSetDeliveryOptionsRequest generates a "aws/request.Request" representing the client's request for the PutConfigurationSetDeliveryOptions 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 PutConfigurationSetDeliveryOptions for more information on using the PutConfigurationSetDeliveryOptions 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 PutConfigurationSetDeliveryOptionsRequest method. req, resp := client.PutConfigurationSetDeliveryOptionsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-email-2018-07-26/PutConfigurationSetDeliveryOptions
func (c *PinpointEmail) PutConfigurationSetDeliveryOptionsRequest(input *PutConfigurationSetDeliveryOptionsInput) (req *request.Request, output *PutConfigurationSetDeliveryOptionsOutput) { op := &request.Operation{ Name: opPutConfigurationSetDeliveryOptions, HTTPMethod: "PUT", HTTPPath: "/v1/email/configuration-sets/{ConfigurationSetName}/delivery-options", } if input == nil { input = &PutConfigurationSetDeliveryOptionsInput{} } output = &PutConfigurationSetDeliveryOptionsOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return }
func (c *PinpointEmail) PutConfigurationSetSendingOptionsRequest(input *PutConfigurationSetSendingOptionsInput) (req *request.Request, output *PutConfigurationSetSendingOptionsOutput) { op := &request.Operation{ Name: opPutConfigurationSetSendingOptions, HTTPMethod: "PUT", HTTPPath: "/v1/email/configuration-sets/{ConfigurationSetName}/sending", } if input == nil { input = &PutConfigurationSetSendingOptionsInput{} } output = &PutConfigurationSetSendingOptionsOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return }
0.852336
aws/aws-sdk-go
service/pinpointemail/api.go
aws/aws-sdk-go
service/pinpointemail/api.go
Apache-2.0
go
PutConfigurationSetDeliveryOptionsRequest generates a "aws/request.Request" representing the client's request for the PutConfigurationSetDeliveryOptions 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 PutConfigurationSetDeliveryOptions for more information on using the PutConfigurationSetDeliveryOptions 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 PutConfigurationSetDeliveryOptionsRequest method. req, resp := client.PutConfigurationSetDeliveryOptionsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-email-2018-07-26/PutConfigurationSetDeliveryOptions
func (c *PinpointEmail) PutConfigurationSetDeliveryOptionsRequest(input *PutConfigurationSetDeliveryOptionsInput) (req *request.Request, output *PutConfigurationSetDeliveryOptionsOutput) { op := &request.Operation{ Name: opPutConfigurationSetDeliveryOptions, HTTPMethod: "PUT", HTTPPath: "/v1/email/configuration-sets/{ConfigurationSetName}/delivery-options", } if input == nil { input = &PutConfigurationSetDeliveryOptionsInput{} } output = &PutConfigurationSetDeliveryOptionsOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return }
func (c *SESV2) PutConfigurationSetSendingOptionsRequest(input *PutConfigurationSetSendingOptionsInput) (req *request.Request, output *PutConfigurationSetSendingOptionsOutput) { op := &request.Operation{ Name: opPutConfigurationSetSendingOptions, HTTPMethod: "PUT", HTTPPath: "/v2/email/configuration-sets/{ConfigurationSetName}/sending", } if input == nil { input = &PutConfigurationSetSendingOptionsInput{} } output = &PutConfigurationSetSendingOptionsOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return }
0.850772
aws/aws-sdk-go
service/pinpointemail/api.go
aws/aws-sdk-go
service/sesv2/api.go
Apache-2.0
go
PutConfigurationSetDeliveryOptionsRequest generates a "aws/request.Request" representing the client's request for the PutConfigurationSetDeliveryOptions 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 PutConfigurationSetDeliveryOptions for more information on using the PutConfigurationSetDeliveryOptions 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 PutConfigurationSetDeliveryOptionsRequest method. req, resp := client.PutConfigurationSetDeliveryOptionsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) } See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-email-2018-07-26/PutConfigurationSetDeliveryOptions
func (c *PinpointEmail) PutConfigurationSetDeliveryOptionsRequest(input *PutConfigurationSetDeliveryOptionsInput) (req *request.Request, output *PutConfigurationSetDeliveryOptionsOutput) { op := &request.Operation{ Name: opPutConfigurationSetDeliveryOptions, HTTPMethod: "PUT", HTTPPath: "/v1/email/configuration-sets/{ConfigurationSetName}/delivery-options", } if input == nil { input = &PutConfigurationSetDeliveryOptionsInput{} } output = &PutConfigurationSetDeliveryOptionsOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return }
func (c *PinpointEmail) PutConfigurationSetDeliveryOptionsWithContext(ctx aws.Context, input *PutConfigurationSetDeliveryOptionsInput, opts ...request.Option) (*PutConfigurationSetDeliveryOptionsOutput, error) { req, out := c.PutConfigurationSetDeliveryOptionsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.833122
aws/aws-sdk-go
service/pinpointemail/api.go
aws/aws-sdk-go
service/pinpointemail/api.go
Apache-2.0
go
SetMaxPendingTxns sets a limit on maximum number of pending transactions while writing batches. This function should be called before using WriteBatch. Default value of MaxPendingTxns is 16 to minimise memory usage.
func (wb *WriteBatch) SetMaxPendingTxns(max int) { wb.throttle = NewThrottle(max) }
func (s *Session) SetPoolLimit(limit int) { s.m.Lock() s.poolLimit = limit s.m.Unlock() }
0.632349
nutsdb/nutsdb
batch.go
qiniu/logkit
vendor/gopkg.in/mgo.v2/session.go
Apache-2.0
go
SetMaxPendingTxns sets a limit on maximum number of pending transactions while writing batches. This function should be called before using WriteBatch. Default value of MaxPendingTxns is 16 to minimise memory usage.
func (wb *WriteBatch) SetMaxPendingTxns(max int) { wb.throttle = NewThrottle(max) }
func SetFilesetOpConcurrencyLimit(limit int) { if filesetOpLimiter != nil { panic(fmt.Sprintf("cannot reset marshal limit to %d (already set at %d)", limit, filesetOpLimiter.Limit())) } if limit <= 0 { return } filesetOpLimit = limit }
0.600582
nutsdb/nutsdb
batch.go
grailbio/reflow
filesetjson.go
Apache-2.0
go
SetMaxPendingTxns sets a limit on maximum number of pending transactions while writing batches. This function should be called before using WriteBatch. Default value of MaxPendingTxns is 16 to minimise memory usage.
func (wb *WriteBatch) SetMaxPendingTxns(max int) { wb.throttle = NewThrottle(max) }
func (c *Conn) SetBufferSize(i uint64) { if c.laddr.Buffered() { c.buf.cond.L.Lock() defer c.buf.cond.L.Unlock() c.buf.max = i } }
0.589121
nutsdb/nutsdb
batch.go
LockGit/gochat
vendor/github.com/akutz/memconn/memconn_conn.go
MIT
go
SetMaxPendingTxns sets a limit on maximum number of pending transactions while writing batches. This function should be called before using WriteBatch. Default value of MaxPendingTxns is 16 to minimise memory usage.
func (wb *WriteBatch) SetMaxPendingTxns(max int) { wb.throttle = NewThrottle(max) }
func MaxBufferedRecords(n int) ProducerOpt { return producerOpt{func(cfg *cfg) { cfg.maxBufferedRecords = int64(n) }} }
0.588315
nutsdb/nutsdb
batch.go
loggie-io/loggie
vendor/github.com/twmb/franz-go/pkg/kgo/config.go
Apache-2.0
go
SetMaxPendingTxns sets a limit on maximum number of pending transactions while writing batches. This function should be called before using WriteBatch. Default value of MaxPendingTxns is 16 to minimise memory usage.
func (wb *WriteBatch) SetMaxPendingTxns(max int) { wb.throttle = NewThrottle(max) }
func MaxConcurrentFetches(n int) ConsumerOpt { return consumerOpt{func(cfg *cfg) { cfg.maxConcurrentFetches = n }} }
0.583216
nutsdb/nutsdb
batch.go
loggie-io/loggie
vendor/github.com/twmb/franz-go/pkg/kgo/config.go
Apache-2.0
go
ParseWindowUTC attempts to parse the given string into a valid Window. It accepts several formats, returning an error if the given string does not match one of the following: - named intervals: "today", "yesterday", "week", "month", "lastweek", "lastmonth" - durations: "24h", "7d", etc. - date ranges: "2020-04-01T00:00:00Z,2020-04-03T00:00:00Z", etc. - timestamp ranges: "1586822400,1586908800", etc.
func ParseWindowUTC(window string) (Window, error) { return parseWindow(window, time.Now().UTC()) }
func ParseTimestamp(loc *time.Location, s string, scale int32) (Timestamp, error) { dt, err := ParseDatetime(s, scale) if err != nil { return -1, moerr.NewInvalidArgNoCtx("parse timestamp", s) } result := dt.ToTimestamp(loc) //for issue5305, do not do this check //according to mysql, timestamp function actually return a datetime value /* if result < TimestampMinValue { return -1, moerr.NewInvalidArgNoCtx("parse timestamp", s) } */ return result, nil }
0.695493
opencost/opencost
core/pkg/opencost/window.go
matrixorigin/matrixone
pkg/container/types/timestamp.go
Apache-2.0
go
ParseWindowUTC attempts to parse the given string into a valid Window. It accepts several formats, returning an error if the given string does not match one of the following: - named intervals: "today", "yesterday", "week", "month", "lastweek", "lastmonth" - durations: "24h", "7d", etc. - date ranges: "2020-04-01T00:00:00Z,2020-04-03T00:00:00Z", etc. - timestamp ranges: "1586822400,1586908800", etc.
func ParseWindowUTC(window string) (Window, error) { return parseWindow(window, time.Now().UTC()) }
func ParseDateTime(value string) (time.Time, error) { return tryParse(value, dateTimeFormatInput, dateTimeFormatInputNoZ, time.RFC3339Nano, time.RFC3339, ) }
0.693982
opencost/opencost
core/pkg/opencost/window.go
tektoncd/cli
vendor/github.com/aws/smithy-go/time/time.go
Apache-2.0
go
ParseWindowUTC attempts to parse the given string into a valid Window. It accepts several formats, returning an error if the given string does not match one of the following: - named intervals: "today", "yesterday", "week", "month", "lastweek", "lastmonth" - durations: "24h", "7d", etc. - date ranges: "2020-04-01T00:00:00Z,2020-04-03T00:00:00Z", etc. - timestamp ranges: "1586822400,1586908800", etc.
func ParseWindowUTC(window string) (Window, error) { return parseWindow(window, time.Now().UTC()) }
func parseTimeBound(raw string, now apiv1.MicroTime) (*apiv1.MicroTime, error) { // Try to parse raw as a duration string var errs []error duration, err := time.ParseDuration(raw) if err == nil { return z.Pointer(apiv1.NewMicroTime(now.Add(-1 * duration))), nil } errs = append(errs, fmt.Errorf("%s is not a valid duration: %w", raw, err)) // Try to parse raw as a time string t, err := parseTime(raw) if err == nil { return t, nil } errs = append(errs, fmt.Errorf("%s is not a valid time: %w", raw, err)) // Try to parse raw as a unix timestamp unix, err := parseUnix(raw) if err == nil { return unix, nil } errs = append(errs, fmt.Errorf("%s is not a valid unix timestamp: %w", raw, err)) return nil, errors.Join(errs...) }
0.693148
opencost/opencost
core/pkg/opencost/window.go
acorn-io/runtime
pkg/server/registry/apigroups/acorn/events/strategy.go
Apache-2.0
go
ParseWindowUTC attempts to parse the given string into a valid Window. It accepts several formats, returning an error if the given string does not match one of the following: - named intervals: "today", "yesterday", "week", "month", "lastweek", "lastmonth" - durations: "24h", "7d", etc. - date ranges: "2020-04-01T00:00:00Z,2020-04-03T00:00:00Z", etc. - timestamp ranges: "1586822400,1586908800", etc.
func ParseWindowUTC(window string) (Window, error) { return parseWindow(window, time.Now().UTC()) }
func ParseTime(s string) (Time, error) { t, err := time.Parse("15:04:05.999999999", s) if err != nil { return Time{}, err } return TimeOf(t), nil }
0.683264
opencost/opencost
core/pkg/opencost/window.go
googleapis/google-cloud-go
civil/civil.go
Apache-2.0
go
ParseWindowUTC attempts to parse the given string into a valid Window. It accepts several formats, returning an error if the given string does not match one of the following: - named intervals: "today", "yesterday", "week", "month", "lastweek", "lastmonth" - durations: "24h", "7d", etc. - date ranges: "2020-04-01T00:00:00Z,2020-04-03T00:00:00Z", etc. - timestamp ranges: "1586822400,1586908800", etc.
func ParseWindowUTC(window string) (Window, error) { return parseWindow(window, time.Now().UTC()) }
func ParseTime(layout, value string) (Time, error) { if layout == "" { for _, layout = range thirdparties.TimeLayouts { t, err := time.Parse(layout, value) if err == nil { return NewTime(t), nil } } return Time{}, fmt.Errorf("parseTime: cannot parse \"%s\"", value) } t, err := time.Parse(layout, value) if err != nil { return Time{}, replacePrefix(err, "time", "parseTime") } return NewTime(t), nil }
0.656455
opencost/opencost
core/pkg/opencost/window.go
open2b/scriggo
builtin/builtin.go
BSD-3-Clause
go
DescribeDeploymentJob API operation for AWS RoboMaker. Describes a deployment job. This API will no longer be supported as of May 2, 2022. Use it to remove resources that were created for Deployment Service. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for AWS RoboMaker's API operation DescribeDeploymentJob for usage and error information. Returned Error Types: - ResourceNotFoundException The specified resource does not exist. - InvalidParameterException A parameter specified in a request is not valid, is unsupported, or cannot be used. The returned message provides an explanation of the error value. - InternalServerException AWS RoboMaker experienced a service issue. Try your call again. - ThrottlingException AWS RoboMaker is temporarily unable to process the request. Try your call again. See also, https://docs.aws.amazon.com/goto/WebAPI/robomaker-2018-06-29/DescribeDeploymentJob Deprecated: Support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html.
func (c *RoboMaker) DescribeDeploymentJob(input *DescribeDeploymentJobInput) (*DescribeDeploymentJobOutput, error) { req, out := c.DescribeDeploymentJobRequest(input) return out, req.Send() }
func (c *RoboMaker) ListDeploymentJobs(input *ListDeploymentJobsInput) (*ListDeploymentJobsOutput, error) { req, out := c.ListDeploymentJobsRequest(input) return out, req.Send() }
0.817115
aws/aws-sdk-go
service/robomaker/api.go
aws/aws-sdk-go
service/robomaker/api.go
Apache-2.0
go
DescribeDeploymentJob API operation for AWS RoboMaker. Describes a deployment job. This API will no longer be supported as of May 2, 2022. Use it to remove resources that were created for Deployment Service. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for AWS RoboMaker's API operation DescribeDeploymentJob for usage and error information. Returned Error Types: - ResourceNotFoundException The specified resource does not exist. - InvalidParameterException A parameter specified in a request is not valid, is unsupported, or cannot be used. The returned message provides an explanation of the error value. - InternalServerException AWS RoboMaker experienced a service issue. Try your call again. - ThrottlingException AWS RoboMaker is temporarily unable to process the request. Try your call again. See also, https://docs.aws.amazon.com/goto/WebAPI/robomaker-2018-06-29/DescribeDeploymentJob Deprecated: Support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html.
func (c *RoboMaker) DescribeDeploymentJob(input *DescribeDeploymentJobInput) (*DescribeDeploymentJobOutput, error) { req, out := c.DescribeDeploymentJobRequest(input) return out, req.Send() }
func (c *RoboMaker) CreateDeploymentJob(input *CreateDeploymentJobInput) (*CreateDeploymentJobOutput, error) { req, out := c.CreateDeploymentJobRequest(input) return out, req.Send() }
0.812684
aws/aws-sdk-go
service/robomaker/api.go
aws/aws-sdk-go
service/robomaker/api.go
Apache-2.0
go
DescribeDeploymentJob API operation for AWS RoboMaker. Describes a deployment job. This API will no longer be supported as of May 2, 2022. Use it to remove resources that were created for Deployment Service. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for AWS RoboMaker's API operation DescribeDeploymentJob for usage and error information. Returned Error Types: - ResourceNotFoundException The specified resource does not exist. - InvalidParameterException A parameter specified in a request is not valid, is unsupported, or cannot be used. The returned message provides an explanation of the error value. - InternalServerException AWS RoboMaker experienced a service issue. Try your call again. - ThrottlingException AWS RoboMaker is temporarily unable to process the request. Try your call again. See also, https://docs.aws.amazon.com/goto/WebAPI/robomaker-2018-06-29/DescribeDeploymentJob Deprecated: Support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html.
func (c *RoboMaker) DescribeDeploymentJob(input *DescribeDeploymentJobInput) (*DescribeDeploymentJobOutput, error) { req, out := c.DescribeDeploymentJobRequest(input) return out, req.Send() }
func (c *RoboMaker) DescribeDeploymentJobRequest(input *DescribeDeploymentJobInput) (req *request.Request, output *DescribeDeploymentJobOutput) { if c.Client.Config.Logger != nil { c.Client.Config.Logger.Log("This operation, DescribeDeploymentJob, has been deprecated") } op := &request.Operation{ Name: opDescribeDeploymentJob, HTTPMethod: "POST", HTTPPath: "/describeDeploymentJob", } if input == nil { input = &DescribeDeploymentJobInput{} } output = &DescribeDeploymentJobOutput{} req = c.newRequest(op, input, output) return }
0.79761
aws/aws-sdk-go
service/robomaker/api.go
aws/aws-sdk-go
service/robomaker/api.go
Apache-2.0
go
DescribeDeploymentJob API operation for AWS RoboMaker. Describes a deployment job. This API will no longer be supported as of May 2, 2022. Use it to remove resources that were created for Deployment Service. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for AWS RoboMaker's API operation DescribeDeploymentJob for usage and error information. Returned Error Types: - ResourceNotFoundException The specified resource does not exist. - InvalidParameterException A parameter specified in a request is not valid, is unsupported, or cannot be used. The returned message provides an explanation of the error value. - InternalServerException AWS RoboMaker experienced a service issue. Try your call again. - ThrottlingException AWS RoboMaker is temporarily unable to process the request. Try your call again. See also, https://docs.aws.amazon.com/goto/WebAPI/robomaker-2018-06-29/DescribeDeploymentJob Deprecated: Support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html.
func (c *RoboMaker) DescribeDeploymentJob(input *DescribeDeploymentJobInput) (*DescribeDeploymentJobOutput, error) { req, out := c.DescribeDeploymentJobRequest(input) return out, req.Send() }
func (c *RoboMaker) DescribeSimulationJob(input *DescribeSimulationJobInput) (*DescribeSimulationJobOutput, error) { req, out := c.DescribeSimulationJobRequest(input) return out, req.Send() }
0.78383
aws/aws-sdk-go
service/robomaker/api.go
aws/aws-sdk-go
service/robomaker/api.go
Apache-2.0
go
DescribeDeploymentJob API operation for AWS RoboMaker. Describes a deployment job. This API will no longer be supported as of May 2, 2022. Use it to remove resources that were created for Deployment Service. Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error. See the AWS API reference guide for AWS RoboMaker's API operation DescribeDeploymentJob for usage and error information. Returned Error Types: - ResourceNotFoundException The specified resource does not exist. - InvalidParameterException A parameter specified in a request is not valid, is unsupported, or cannot be used. The returned message provides an explanation of the error value. - InternalServerException AWS RoboMaker experienced a service issue. Try your call again. - ThrottlingException AWS RoboMaker is temporarily unable to process the request. Try your call again. See also, https://docs.aws.amazon.com/goto/WebAPI/robomaker-2018-06-29/DescribeDeploymentJob Deprecated: Support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html.
func (c *RoboMaker) DescribeDeploymentJob(input *DescribeDeploymentJobInput) (*DescribeDeploymentJobOutput, error) { req, out := c.DescribeDeploymentJobRequest(input) return out, req.Send() }
func (c *APIGateway) GetDeployment(input *GetDeploymentInput) (*Deployment, error) { req, out := c.GetDeploymentRequest(input) return out, req.Send() }
0.765177
aws/aws-sdk-go
service/robomaker/api.go
aws/aws-sdk-go
service/apigateway/api.go
Apache-2.0
go
GetTablesWithContext is the same as GetTables with the addition of the ability to pass a context and additional request options. See GetTables 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 *Glue) GetTablesWithContext(ctx aws.Context, input *GetTablesInput, opts ...request.Option) (*GetTablesOutput, error) { req, out := c.GetTablesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *Glue) GetTablesPagesWithContext(ctx aws.Context, input *GetTablesInput, fn func(*GetTablesOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *GetTablesInput if input != nil { tmp := *input inCpy = &tmp } req, _ := c.GetTablesRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil }, } for p.Next() { if !fn(p.Page().(*GetTablesOutput), !p.HasNextPage()) { break } } return p.Err() }
0.888399
aws/aws-sdk-go
service/glue/api.go
aws/aws-sdk-go
service/glue/api.go
Apache-2.0
go
GetTablesWithContext is the same as GetTables with the addition of the ability to pass a context and additional request options. See GetTables 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 *Glue) GetTablesWithContext(ctx aws.Context, input *GetTablesInput, opts ...request.Option) (*GetTablesOutput, error) { req, out := c.GetTablesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *DynamoDB) ListTablesWithContext(ctx aws.Context, input *ListTablesInput, opts ...request.Option) (*ListTablesOutput, error) { req, out := c.ListTablesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.835434
aws/aws-sdk-go
service/glue/api.go
tektoncd/cli
vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go
Apache-2.0
go
GetTablesWithContext is the same as GetTables with the addition of the ability to pass a context and additional request options. See GetTables 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 *Glue) GetTablesWithContext(ctx aws.Context, input *GetTablesInput, opts ...request.Option) (*GetTablesOutput, error) { req, out := c.GetTablesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *CleanRooms) ListConfiguredTablesWithContext(ctx aws.Context, input *ListConfiguredTablesInput, opts ...request.Option) (*ListConfiguredTablesOutput, error) { req, out := c.ListConfiguredTablesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.814301
aws/aws-sdk-go
service/glue/api.go
aws/aws-sdk-go
service/cleanrooms/api.go
Apache-2.0
go
GetTablesWithContext is the same as GetTables with the addition of the ability to pass a context and additional request options. See GetTables 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 *Glue) GetTablesWithContext(ctx aws.Context, input *GetTablesInput, opts ...request.Option) (*GetTablesOutput, error) { req, out := c.GetTablesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *Keyspaces) GetTableWithContext(ctx aws.Context, input *GetTableInput, opts ...request.Option) (*GetTableOutput, error) { req, out := c.GetTableRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.808941
aws/aws-sdk-go
service/glue/api.go
aws/aws-sdk-go
service/keyspaces/api.go
Apache-2.0
go
GetTablesWithContext is the same as GetTables with the addition of the ability to pass a context and additional request options. See GetTables 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 *Glue) GetTablesWithContext(ctx aws.Context, input *GetTablesInput, opts ...request.Option) (*GetTablesOutput, error) { req, out := c.GetTablesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
func (c *Glue) SearchTablesWithContext(ctx aws.Context, input *SearchTablesInput, opts ...request.Option) (*SearchTablesOutput, error) { req, out := c.SearchTablesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() }
0.788533
aws/aws-sdk-go
service/glue/api.go
aws/aws-sdk-go
service/glue/api.go
Apache-2.0
go
ConfigureRuntime allows the runtime to be configured globally setting things like trace and statistics options. It uses the functional options pattern for go. This is a package global function as it operates on the runtime configuration regardless of the instantiation of anything higher up such as a parser or lexer. Generally this is used for debugging/tracing/statistics options, which are usually used by the runtime maintainers (or rather the only maintainer). However, it is possible that you might want to use this to set a global option concerning the memory allocation type used by the runtime such as sync.Pool or not. The options are applied in the order they are passed in, so the last option will override any previous options. For example, if you want to turn on the collection create point stack flag to true, you can do: antlr.ConfigureRuntime(antlr.WithStatsTraceStacks(true)) If you want to turn it off, you can do: antlr.ConfigureRuntime(antlr.WithStatsTraceStacks(false))
func ConfigureRuntime(options ...runtimeOption) error { for _, option := range options { err := option(&runtimeConfig) if err != nil { return err } } return nil }
func WithStatsTraceStacks(trace bool) runtimeOption { return func(config *runtimeConfiguration) error { config.statsTraceStacks = trace return nil } }
0.722
google/cel-go
vendor/github.com/antlr4-go/antlr/v4/configuration.go
google/cel-go
vendor/github.com/antlr4-go/antlr/v4/configuration.go
Apache-2.0
go
ConfigureRuntime allows the runtime to be configured globally setting things like trace and statistics options. It uses the functional options pattern for go. This is a package global function as it operates on the runtime configuration regardless of the instantiation of anything higher up such as a parser or lexer. Generally this is used for debugging/tracing/statistics options, which are usually used by the runtime maintainers (or rather the only maintainer). However, it is possible that you might want to use this to set a global option concerning the memory allocation type used by the runtime such as sync.Pool or not. The options are applied in the order they are passed in, so the last option will override any previous options. For example, if you want to turn on the collection create point stack flag to true, you can do: antlr.ConfigureRuntime(antlr.WithStatsTraceStacks(true)) If you want to turn it off, you can do: antlr.ConfigureRuntime(antlr.WithStatsTraceStacks(false))
func ConfigureRuntime(options ...runtimeOption) error { for _, option := range options { err := option(&runtimeConfig) if err != nil { return err } } return nil }
func WithLexerATNSimulatorDebug(debug bool) runtimeOption { return func(config *runtimeConfiguration) error { config.lexerATNSimulatorDebug = debug return nil } }
0.612405
google/cel-go
vendor/github.com/antlr4-go/antlr/v4/configuration.go
google/cel-go
vendor/github.com/antlr4-go/antlr/v4/configuration.go
Apache-2.0
go
ConfigureRuntime allows the runtime to be configured globally setting things like trace and statistics options. It uses the functional options pattern for go. This is a package global function as it operates on the runtime configuration regardless of the instantiation of anything higher up such as a parser or lexer. Generally this is used for debugging/tracing/statistics options, which are usually used by the runtime maintainers (or rather the only maintainer). However, it is possible that you might want to use this to set a global option concerning the memory allocation type used by the runtime such as sync.Pool or not. The options are applied in the order they are passed in, so the last option will override any previous options. For example, if you want to turn on the collection create point stack flag to true, you can do: antlr.ConfigureRuntime(antlr.WithStatsTraceStacks(true)) If you want to turn it off, you can do: antlr.ConfigureRuntime(antlr.WithStatsTraceStacks(false))
func ConfigureRuntime(options ...runtimeOption) error { for _, option := range options { err := option(&runtimeConfig) if err != nil { return err } } return nil }
func WithParserATNSimulatorDebug(debug bool) runtimeOption { return func(config *runtimeConfiguration) error { config.parserATNSimulatorDebug = debug return nil } }
0.588935
google/cel-go
vendor/github.com/antlr4-go/antlr/v4/configuration.go
google/cel-go
vendor/github.com/antlr4-go/antlr/v4/configuration.go
Apache-2.0
go
ConfigureRuntime allows the runtime to be configured globally setting things like trace and statistics options. It uses the functional options pattern for go. This is a package global function as it operates on the runtime configuration regardless of the instantiation of anything higher up such as a parser or lexer. Generally this is used for debugging/tracing/statistics options, which are usually used by the runtime maintainers (or rather the only maintainer). However, it is possible that you might want to use this to set a global option concerning the memory allocation type used by the runtime such as sync.Pool or not. The options are applied in the order they are passed in, so the last option will override any previous options. For example, if you want to turn on the collection create point stack flag to true, you can do: antlr.ConfigureRuntime(antlr.WithStatsTraceStacks(true)) If you want to turn it off, you can do: antlr.ConfigureRuntime(antlr.WithStatsTraceStacks(false))
func ConfigureRuntime(options ...runtimeOption) error { for _, option := range options { err := option(&runtimeConfig) if err != nil { return err } } return nil }
func WithLexerATNSimulatorDFADebug(debug bool) runtimeOption { return func(config *runtimeConfiguration) error { config.lexerATNSimulatorDFADebug = debug return nil } }
0.555919
google/cel-go
vendor/github.com/antlr4-go/antlr/v4/configuration.go
google/cel-go
vendor/github.com/antlr4-go/antlr/v4/configuration.go
Apache-2.0
go
ConfigureRuntime allows the runtime to be configured globally setting things like trace and statistics options. It uses the functional options pattern for go. This is a package global function as it operates on the runtime configuration regardless of the instantiation of anything higher up such as a parser or lexer. Generally this is used for debugging/tracing/statistics options, which are usually used by the runtime maintainers (or rather the only maintainer). However, it is possible that you might want to use this to set a global option concerning the memory allocation type used by the runtime such as sync.Pool or not. The options are applied in the order they are passed in, so the last option will override any previous options. For example, if you want to turn on the collection create point stack flag to true, you can do: antlr.ConfigureRuntime(antlr.WithStatsTraceStacks(true)) If you want to turn it off, you can do: antlr.ConfigureRuntime(antlr.WithStatsTraceStacks(false))
func ConfigureRuntime(options ...runtimeOption) error { for _, option := range options { err := option(&runtimeConfig) if err != nil { return err } } return nil }
func WithParserATNSimulatorDFADebug(debug bool) runtimeOption { return func(config *runtimeConfiguration) error { config.parserATNSimulatorDFADebug = debug return nil } }
0.544106
google/cel-go
vendor/github.com/antlr4-go/antlr/v4/configuration.go
google/cel-go
vendor/github.com/antlr4-go/antlr/v4/configuration.go
Apache-2.0
go