operation

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommandExec added in v0.7.0

func CommandExec() *cli.Command

func CommandExport added in v0.7.0

func CommandExport() *cli.Command

func CommandInit added in v0.10.0

func CommandInit() *cli.Command

func CommandList added in v0.7.0

func CommandList() *cli.Command

func CommandNew added in v0.9.0

func CommandNew() *cli.Command

func CommandShow added in v0.7.0

func CommandShow() *cli.Command

func CommandUpdate added in v0.7.0

func CommandUpdate() *cli.Command

func DoExec added in v0.7.0

func DoExec(c *cli.Context) error

func DoExport added in v0.7.0

func DoExport(c *cli.Context) error

func DoInit added in v0.10.0

func DoInit(c *cli.Context) error

func DoList added in v0.7.0

func DoList(c *cli.Context) error

func DoNew added in v0.9.0

func DoNew(c *cli.Context) error

func DoShow added in v0.7.0

func DoShow(c *cli.Context) error

func DoUpdate added in v0.7.0

func DoUpdate(c *cli.Context) error

func PrintList added in v0.4.0

func PrintList(out []ListOutput) error

func Write

func Write(data map[string]parse.File) error

Types

type ExportOpt

type ExportOpt struct {
	Path          string
	OutputDirPath string
	Data          map[string]string
}

type ExportOut

type ExportOut struct {
	Files map[string]parse.File
}

type ListOutput

type ListOutput struct {
	Path        string
	Name        string
	Description string
}

type Operation added in v0.4.0

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

func New added in v0.4.0

func New(g global.SnipConfig) (Operation, error)

func (Operation) Exec added in v0.7.0

func (op Operation) Exec(path string, data map[string]string, dryRun, quiet bool) error

func (Operation) Export added in v0.4.0

func (op Operation) Export(opt ExportOpt) (ExportOut, error)

func (Operation) List added in v0.4.0

func (op Operation) List() ([]ListOutput, error)

func (Operation) Show added in v0.4.0

func (op Operation) Show(path string) (string, error)

func (Operation) Update added in v0.5.0

func (op Operation) Update() error

Jump to

Keyboard shortcuts

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