directory

package
v0.32.41 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 30 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ObjectsStr        = "objects"
	ObjectsFileName   = "objects.json"
	RelationsStr      = "relations"
	RelationsFileName = "relations.json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Model     dsm3.ModelClient
	Reader    dsr3.ReaderClient
	Writer    dsw3.WriterClient
	Importer  dsi3.ImporterClient
	Exporter  dse3.ExporterClient
	Assertion dsa3.AssertionClient
	// contains filtered or unexported fields
}

func New

func New(conn *grpc.ClientConn) *Client

func NewClient

func NewClient(c *cc.CommonCtx, cfg *Config) (*Client, error)

func (*Client) Backup

func (c *Client) Backup(ctx context.Context, file string) error

func (*Client) DeleteManifest

func (c *Client) DeleteManifest(ctx context.Context) error

func (*Client) Export

func (c *Client) Export(ctx context.Context, objectsFile, relationsFile string) error

func (*Client) GetManifest

func (c *Client) GetManifest(ctx context.Context) (io.Reader, error)

func (*Client) Import

func (c *Client) Import(ctx context.Context, files []string) error

func (*Client) Restore

func (c *Client) Restore(ctx context.Context, file string) error

func (*Client) SetManifest

func (c *Client) SetManifest(ctx context.Context, r io.Reader) error

type Config

type Config struct {
	Host      string            `flag:"host" short:"H" default:"${directory_svc}" env:"TOPAZ_DIRECTORY_SVC" help:"directory service address"`
	APIKey    string            `flag:"api-key" short:"k" default:"${directory_key}" env:"TOPAZ_DIRECTORY_KEY" help:"directory API key"`
	Token     string            `flag:"token" default:"${directory_token}" env:"TOPAZ_DIRECTORY_TOKEN" help:"directory OAuth2.0 token" hidden:""`
	Insecure  bool              `flag:"insecure" short:"i" default:"${insecure}" env:"TOPAZ_INSECURE" help:"skip TLS verification"`
	Plaintext bool              `flag:"plaintext" short:"P" default:"${plaintext}" env:"TOPAZ_PLAINTEXT" help:"use plain-text HTTP/2 (no TLS)"`
	TenantID  string            `flag:"tenant-id" help:"" default:"${tenant_id}" env:"ASERTO_TENANT_ID" `
	Headers   map[string]string `flag:"headers" env:"TOPAZ_DIRECTORY_HEADERS" help:"additional headers to send to the directory service"`
	Timeout   time.Duration     `flag:"timeout" short:"T" default:"${timeout}" env:"TOPAZ_TIMEOUT" help:"command timeout"`
}

func (*Config) ClientConfig added in v0.32.35

func (cfg *Config) ClientConfig() *client.Config

func (*Config) CommandTimeout added in v0.32.39

func (cfg *Config) CommandTimeout() time.Duration

func (*Config) Connect added in v0.32.24

func (cfg *Config) Connect(ctx context.Context) (*grpc.ClientConn, error)

type Counter

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

func (*Counter) Objects

func (c *Counter) Objects() *Item

func (*Counter) Print

func (c *Counter) Print(w io.Writer)

func (*Counter) Relations

func (c *Counter) Relations() *Item

type Item

type Item struct {
	Name string
	// contains filtered or unexported fields
}

func (*Item) Incr

func (c *Item) Incr() *Item

func (*Item) Print

func (c *Item) Print(w io.Writer)

func (*Item) Skip

func (c *Item) Skip() *Item

Jump to

Keyboard shortcuts

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