directory

package
v0.32.2 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func UnmarshalRequest

func UnmarshalRequest[T any, M Message[T]](src string, msg M) error

Types

type BackupCmd

type BackupCmd struct {
	File   string        `arg:""  default:"backup.tar.gz" help:"absolute file path to make backup to"`
	Format FormatVersion `flag:"" short:"f" enum:"3,2" name:"format" default:"3" help:"format of json data"`
	clients.DirectoryConfig
}

func (*BackupCmd) Run

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

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 DirectoryCmd

type DirectoryCmd struct {
	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"`
	Format    FormatVersion `flag:"" short:"f" enum:"3,2" name:"format" default:"3" help:"format of 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 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 ImportCmd

type ImportCmd struct {
	Directory string        `short:"d" required:"" help:"directory containing .json data"`
	Format    FormatVersion `flag:"" short:"f" enum:"3,2" name:"format" default:"3" help:"format of json data"`
	clients.DirectoryConfig
}

func (*ImportCmd) Run

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

type ManifestCmd added in v0.32.2

type ManifestCmd struct {
	Get    GetManifestCmd    `cmd:"" help:"get manifest"`
	Set    SetManifestCmd    `cmd:"" help:"set manifest"`
	Delete DeleteManifestCmd `cmd:"" help:"delete manifest"`
}

type Message

type Message[T any] interface {
	proto.Message
	*T
}

type RestoreCmd

type RestoreCmd struct {
	File   string        `arg:""  default:"backup.tar.gz" help:"absolute file path to local backup tarball"`
	Format FormatVersion `flag:"" short:"f" enum:"3,2" name:"format" default:"3" help:"format of json data"`
	clients.DirectoryConfig
}

func (*RestoreCmd) Run

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

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 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 {
	V2     bool `flag:"" default:"false" help:"use v2 template"`
	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