directory

package
v0.32.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	CheckUnknown checkType = iota
	Check
	CheckRelation
	CheckPermission
	CheckDecision
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BackupCmd

type BackupCmd struct {
	File string `arg:""  default:"backup.tar.gz" help:"absolute file path to make backup to"`
	clients.DirectoryConfig
}

func (*BackupCmd) Run

func (cmd *BackupCmd) Run(c *cc.CommonCtx) error

type CheckCmd added in v0.32.4

type CheckCmd struct {
	Request  string `` /* 134-byte string literal not displayed */
	Template bool   `name:"template" short:"t" help:"prints a check permission request template on stdout"`
	Editor   bool   `name:"edit" short:"e" help:"edit request" hidden:"" type:"fflag.Editor"`
	clients.DirectoryConfig
}

func (*CheckCmd) Run added in v0.32.4

func (cmd *CheckCmd) Run(c *cc.CommonCtx) error

type DeleteCmd added in v0.32.4

type DeleteCmd struct {
	Object   DeleteObjectCmd   `cmd:"" help:"delete object"`
	Relation DeleteRelationCmd `cmd:"" help:"delete relation"`
	Manifest DeleteManifestCmd `cmd:"" help:"delete manifest"`
}

type DeleteManifestCmd added in v0.32.2

type DeleteManifestCmd struct {
	Force bool `flag:"" help:"do not ask for conformation to delete manifest"`
	clients.DirectoryConfig
}

func (*DeleteManifestCmd) Run added in v0.32.2

func (cmd *DeleteManifestCmd) Run(c *cc.CommonCtx) error

type DeleteObjectCmd added in v0.32.4

type DeleteObjectCmd struct {
	Request  string `arg:"" type:"string" name:"request" optional:"" help:"file path to delete object request or '-' to read from stdin"`
	Template bool   `name:"template" short:"t" help:"prints a delete object request template on stdout"`
	Editor   bool   `name:"edit" short:"e" help:"edit request" hidden:"" type:"fflag.Editor"`
	clients.DirectoryConfig
}

func (*DeleteObjectCmd) BeforeReset added in v0.32.6

func (cmd *DeleteObjectCmd) BeforeReset(ctx *kong.Context) error

func (*DeleteObjectCmd) Run added in v0.32.4

func (cmd *DeleteObjectCmd) Run(c *cc.CommonCtx) error

type DeleteRelationCmd added in v0.32.4

type DeleteRelationCmd struct {
	Request  string `arg:"" type:"string" name:"request" optional:"" help:"file path to delete relation request or '-' to read from stdin"`
	Template bool   `name:"template" short:"t" help:"prints a delete relation request template on stdout"`
	Editor   bool   `name:"edit" short:"e" help:"edit request" hidden:"" type:"fflag.Editor"`
	clients.DirectoryConfig
}

func (*DeleteRelationCmd) Run added in v0.32.4

func (cmd *DeleteRelationCmd) Run(c *cc.CommonCtx) error

type DirectoryCmd

type DirectoryCmd struct {
	Check   CheckCmd   `cmd:"" help:"check permission"`
	Search  SearchCmd  `cmd:"" help:"search relation graph"`
	Get     GetCmd     `cmd:"" help:"get object|relation|manifest"`
	Set     SetCmd     `cmd:"" help:"set object|relation|manifest"`
	Delete  DeleteCmd  `cmd:"" help:"delete object|relation|manifest"`
	List    ListCmd    `cmd:"" help:"list objects|relations"`
	Import  ImportCmd  `cmd:"" help:"import directory data"`
	Export  ExportCmd  `cmd:"" help:"export directory data"`
	Backup  BackupCmd  `cmd:"" help:"backup directory data"`
	Restore RestoreCmd `cmd:"" help:"restore directory data"`
	Test    TestCmd    `cmd:"" help:"execute directory assertions"`
}

type ExportCmd

type ExportCmd struct {
	Directory string `short:"d" required:"" help:"directory to write .json data"`
	clients.DirectoryConfig
}

func (*ExportCmd) Run

func (cmd *ExportCmd) Run(c *cc.CommonCtx) error

type FormatVersion

type FormatVersion int
const (
	V2 FormatVersion = 2
	V3 FormatVersion = 3
)

type GetCmd added in v0.32.4

type GetCmd struct {
	Object   GetObjectCmd   `cmd:"" help:"get object"`
	Relation GetRelationCmd `cmd:"" help:"get relation"`
	Manifest GetManifestCmd `cmd:"" help:"get manifest"`
}

type GetManifestCmd added in v0.32.2

type GetManifestCmd struct {
	Path   string `arg:"path" help:"filepath to manifest file" type:"path" optional:""`
	Stdout bool   `flag:"" help:"output manifest to --stdout"`
	clients.DirectoryConfig
}

func (*GetManifestCmd) Run added in v0.32.2

func (cmd *GetManifestCmd) Run(c *cc.CommonCtx) error

type GetObjectCmd added in v0.32.4

type GetObjectCmd struct {
	Request  string `` /* 128-byte string literal not displayed */
	Template bool   `name:"template" short:"t" help:"prints a get object request template on stdout"`
	Editor   bool   `name:"edit" short:"e" help:"edit request" hidden:"" type:"fflag.Editor"`
	clients.DirectoryConfig
}

func (*GetObjectCmd) BeforeReset added in v0.32.6

func (cmd *GetObjectCmd) BeforeReset(ctx *kong.Context) error

func (*GetObjectCmd) Run added in v0.32.4

func (cmd *GetObjectCmd) Run(c *cc.CommonCtx) error

type GetRelationCmd added in v0.32.4

type GetRelationCmd struct {
	Request  string `` /* 130-byte string literal not displayed */
	Template bool   `name:"template" short:"t" help:"prints a get relation request template on stdout"`
	Editor   bool   `name:"edit" short:"e" help:"edit request" hidden:"" type:"fflag.Editor"`
	clients.DirectoryConfig
}

func (*GetRelationCmd) Run added in v0.32.4

func (cmd *GetRelationCmd) Run(c *cc.CommonCtx) error

type ImportCmd

type ImportCmd struct {
	Directory string `short:"d" required:"" help:"directory containing .json data"`
	clients.DirectoryConfig
}

func (*ImportCmd) Run

func (cmd *ImportCmd) Run(c *cc.CommonCtx) error

type ListCmd added in v0.32.4

type ListCmd struct {
	Objects   ListObjectsCmd   `cmd:"" help:"list objects"`
	Relations ListRelationsCmd `cmd:"" help:"list relations"`
}

type ListObjectsCmd added in v0.32.4

type ListObjectsCmd struct {
	Request  string `arg:"" type:"string" name:"request" optional:"" help:"file path to list objects request or '-' to read from stdin"`
	Template bool   `name:"template" short:"t" help:"prints a list objects request template on stdout"`
	Editor   bool   `name:"edit" short:"e" help:"edit request" hidden:"" type:"fflag.Editor"`
	clients.DirectoryConfig
}

func (*ListObjectsCmd) BeforeReset added in v0.32.6

func (cmd *ListObjectsCmd) BeforeReset(ctx *kong.Context) error

func (*ListObjectsCmd) Run added in v0.32.4

func (cmd *ListObjectsCmd) Run(c *cc.CommonCtx) error

type ListRelationsCmd added in v0.32.4

type ListRelationsCmd struct {
	Request  string `arg:"" type:"s" name:"request" optional:"" help:"file path to list relations request or '-' to read from stdin"`
	Template bool   `name:"template" short:"t" help:"prints a list relations request template on stdout"`
	Editor   bool   `name:"edit" short:"e" help:"edit request" hidden:"" type:"fflag.Editor"`
	clients.DirectoryConfig
}

func (*ListRelationsCmd) Run added in v0.32.4

func (cmd *ListRelationsCmd) Run(c *cc.CommonCtx) error

type RestoreCmd

type RestoreCmd struct {
	File string `arg:""  default:"backup.tar.gz" help:"absolute file path to local backup tarball"`
	clients.DirectoryConfig
}

func (*RestoreCmd) Run

func (cmd *RestoreCmd) Run(c *cc.CommonCtx) error

type SearchCmd added in v0.32.4

type SearchCmd struct {
	Request  string `` /* 127-byte string literal not displayed */
	Template bool   `name:"template" short:"t" help:"prints a get graph request template on stdout"`
	Editor   bool   `name:"edit" short:"e" help:"edit request" hidden:"" type:"fflag.Editor"`
	clients.DirectoryConfig
}

func (*SearchCmd) Run added in v0.32.4

func (cmd *SearchCmd) Run(c *cc.CommonCtx) error

type SetCmd added in v0.32.4

type SetCmd struct {
	Object   SetObjectCmd   `cmd:"" help:"set object"`
	Relation SetRelationCmd `cmd:"" help:"set relation"`
	Manifest SetManifestCmd `cmd:"" help:"set manifest"`
}

type SetManifestCmd added in v0.32.2

type SetManifestCmd struct {
	Path  string `arg:"" help:"filepath to manifest file" type:"path" optional:""`
	Stdin bool   `flag:"" help:"set manifest from --stdin"`
	clients.DirectoryConfig
}

func (*SetManifestCmd) Run added in v0.32.2

func (cmd *SetManifestCmd) Run(c *cc.CommonCtx) error

type SetObjectCmd added in v0.32.4

type SetObjectCmd struct {
	Request  string `arg:"" type:"string" name:"request" optional:"" help:"file path to set object request or '-' to read from stdin"`
	Template bool   `name:"template" short:"t" help:"prints a set object request template on stdout"`
	Editor   bool   `name:"edit" short:"e" help:"edit request" hidden:"" type:"fflag.Editor"`
	clients.DirectoryConfig
}

func (*SetObjectCmd) BeforeReset added in v0.32.6

func (cmd *SetObjectCmd) BeforeReset(ctx *kong.Context) error

func (*SetObjectCmd) Run added in v0.32.4

func (cmd *SetObjectCmd) Run(c *cc.CommonCtx) error

type SetRelationCmd added in v0.32.4

type SetRelationCmd struct {
	Request  string `arg:"" type:"string" name:"request" optional:"" help:"file path to set relation request or '-' to read from stdin"`
	Template bool   `name:"template" short:"t" help:"prints a set relation request template on stdout"`
	Editor   bool   `name:"edit" short:"e" help:"edit request" hidden:"" type:"fflag.Editor"`
	clients.DirectoryConfig
}

func (*SetRelationCmd) Run added in v0.32.4

func (cmd *SetRelationCmd) Run(c *cc.CommonCtx) error

type TestCmd

type TestCmd struct {
	Exec     TestExecCmd     `cmd:"" help:"execute assertions"`
	Template TestTemplateCmd `cmd:"" help:"output assertions template"`
}

type TestExecCmd

type TestExecCmd struct {
	File    string `arg:""  default:"assertions.json" help:"filepath to assertions file"`
	NoColor bool   `flag:"" default:"false" help:"disable colorized output"`
	Summary bool   `flag:"" default:"false" help:"display test summary"`

	clients.DirectoryConfig
	// contains filtered or unexported fields
}

func (*TestExecCmd) Run

func (cmd *TestExecCmd) Run(c *cc.CommonCtx) error

nolint: funlen,gocyclo

type TestTemplateCmd

type TestTemplateCmd struct {
	Pretty bool `flag:"" default:"false" help:"pretty print JSON"`
}

func (*TestTemplateCmd) Run

func (cmd *TestTemplateCmd) Run(c *cc.CommonCtx) error

Jump to

Keyboard shortcuts

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