clients

package
v0.32.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AsertoFactory

type AsertoFactory struct {
	// contains filtered or unexported fields
}

func NewClientFactory

func NewClientFactory(
	services *x.Services,
	token *tok.CachedToken,
) (*AsertoFactory, error)

func (*AsertoFactory) ControlPlaneClient added in v0.8.10

func (c *AsertoFactory) ControlPlaneClient(ctx context.Context) (*cp.Client, error)

func (*AsertoFactory) DecisionLogsClient

func (c *AsertoFactory) DecisionLogsClient(ctx context.Context) (*dl.Client, error)

func (*AsertoFactory) TenantClient

func (c *AsertoFactory) TenantClient(ctx context.Context) (*tenant.Client, error)

type Factory

type Factory interface {
	TenantClient(ctx context.Context) (*tenant.Client, error)
	DecisionLogsClient(ctx context.Context) (*dl.Client, error)
	ControlPlaneClient(ctx context.Context) (*cp.Client, error)
}

type OptionsBuilder

type OptionsBuilder func() ([]client.ConnectionOption, error)

type Overrides

type Overrides interface {
	// Address overrides the default address used to connect to a service.
	Address() string

	// Key provides an API key to be used instead of the default access token.
	Key() string

	// IsAnonymous means no credentials are sent to the service.
	IsAnonymous() bool

	// IsInsecure indicates that no TLS verification is performed.
	IsInsecure() bool
}

Overrides are options that modify the default behavior of connections to aserto services.

type ServiceOptions

type ServiceOptions struct {
	// contains filtered or unexported fields
}

func NewServiceOptions

func NewServiceOptions() *ServiceOptions

func (*ServiceOptions) ConfigOverrider added in v0.8.8

func (b *ServiceOptions) ConfigOverrider(cfg *config.Config)

func (*ServiceOptions) Override

func (b *ServiceOptions) Override(svc x.Service, overrides Overrides)

func (*ServiceOptions) RequireToken

func (b *ServiceOptions) RequireToken()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL