ds

package
v0.33.5 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 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

	// Client for the directory model service.
	Model dms.ModelClient
	// contains filtered or unexported fields
}

Client provides access to the Aserto Directory APIs.

func FromConnection added in v0.33.2

func FromConnection(conn *grpc.ClientConn) *Client

FromConnection returns a new Client using an existing connection.

func New

func New(opts ...aserto.ConnectionOption) (*Client, error)

New returns a new Client with the specified options.

func (*Client) Close

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.
	*aserto.Config

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

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

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

	// Exporter configuration.
	Exporter *aserto.Config `json:"exporter"`

	// Model configuration.
	Model *aserto.Config `json:"model"`
}

Config provides configuration for connecting to the Aserto Directory service.

func (*Config) Connect

func (c *Config) Connect() (*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