client

package
v0.20.13 Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: Apache-2.0 Imports: 25 Imported by: 2

Documentation

Index

Constants

View Source
const (
	ObjectsStr            = "objects"
	ObjectsFileName       = "objects.json"
	RelationsStr          = "relations"
	RelationsFileName     = "relations.json"
	ObjectTypesStr        = "object_types"
	ObjectTypesFileName   = "object_types.json"
	PermissionsStr        = "permissions"
	PermissionsFileName   = "permissions.json"
	RelationTypesStr      = "relation_types"
	RelationTypesFileName = "relation_types.json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Writer   dsw.WriterClient
	Exporter dse.ExporterClient
	Importer dsi.ImporterClient
	Reader   dsr.ReaderClient
	UI       *clui.UI
	// contains filtered or unexported fields
}

func New

func New(conn grpc.ClientConnInterface, ui *clui.UI) (*Client, error)

func (*Client) Backup

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

func (*Client) Export added in v0.20.3

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

func (*Client) Import

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

func (*Client) Load

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

func (*Client) Restore

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

func (*Client) Save added in v0.20.2

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

type Manifest

type Manifest map[string]ObjectRelation

type ObjectRelation

type ObjectRelation map[string]Relation

type Relation

type Relation map[string][]string

Jump to

Keyboard shortcuts

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