clients

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: MIT Imports: 11 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(
	ctx context.Context,
	opts *ServiceOptions,
	services *x.Services,
	tenantID TenantID,
	token token_.CachedToken,
) (*AsertoFactory, error)

func (*AsertoFactory) AuthorizerClient

func (c *AsertoFactory) AuthorizerClient() (*authorizer.Client, error)

func (*AsertoFactory) DecisionLogsClient

func (c *AsertoFactory) DecisionLogsClient() (dl.DecisionLogsClient, error)

func (*AsertoFactory) TenantClient

func (c *AsertoFactory) TenantClient() (*tenant_.Client, error)

func (*AsertoFactory) TenantID

func (c *AsertoFactory) TenantID() string

type Factory

type Factory interface {
	TenantID() string

	TenantClient() (*tenant_.Client, error)
	AuthorizerClient() (*authorizer.Client, error)
	DecisionLogsClient() (dl.DecisionLogsClient, error)
}

type OptionsBuilder

type OptionsBuilder func() ([]aserto.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) Override

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

func (*ServiceOptions) RequireToken

func (b *ServiceOptions) RequireToken()

type TenantID

type TenantID string

Jump to

Keyboard shortcuts

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