directory

package
v0.31.3 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidConfig = errors.New("invalid config")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	// Client for the directory reader service.
	Reader drs.ReaderClient

	// Client for the directory writer service.
	Writer dws.WriterClient

	// Client for the directory importer service.
	Importer dis.ImporterClient

	// Client for the directory exporter service.
	Exporter des.ExporterClient
	// contains filtered or unexported fields
}

Client provides access to the Aserto Directory APIs.

func New

func New(ctx context.Context, opts ...client.ConnectionOption) (*Client, error)

New returns a new Directory with the specified options.

func (*Client) Close added in v0.31.0

func (c *Client) Close() error

Close closes the underlying connections.

type Config

type Config struct {
	// Base configuration. If non-nil, this configuration is used for any client that doesn't have its own configuration.
	// If nil, only clients that have their own configuration will be created.
	*client.Config

	// Reader configuration.
	Reader *client.Config `json:"reader"`

	// Writer configuration.
	Writer *client.Config `json:"writer"`

	// Importer configuration.
	Importer *client.Config `json:"importer"`

	// Exporter configuration.
	Exporter *client.Config `json:"exporter"`
}

Config provides configuration for connecting to the Aserto Directory service.

func (*Config) Connect

func (c *Config) Connect(ctx context.Context) (*Client, error)

Connect create a new directory client from the specified configuration.

func (*Config) Validate

func (c *Config) Validate() error

Validate returns an error if the configuration is invalid.

Jump to

Keyboard shortcuts

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