cmd

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnmarshalEntities added in v0.6.0

func UnmarshalEntities[TEntity any](cli *Cli, args []string, format string) (entities []*TEntity, err error)

Types

type Cli added in v0.6.0

type Cli struct {
	ConfigManager *config.ConfigManager
	BNTPBackend   *backend.Backend
	InFormat      string
	OutFormat     string
	FilterRaw     string
	UpdaterRaw    string
	PathFormat    bool
	ShortFormat   bool
	DebugMode     bool
	StdErr        io.Writer
	DBOverride    *sql.DB
	Logger        *log.Logger
	FsOverride    afero.Fs
	Fs            afero.Fs

	BookmarkAddCmd        *cobra.Command
	BookmarkCmd           *cobra.Command
	BookmarkCountCmd      *cobra.Command
	BookmarkDoesExistCmd  *cobra.Command
	BookmarkEditCmd       *cobra.Command
	BookmarkFindCmd       *cobra.Command
	BookmarkListCmd       *cobra.Command
	BookmarkRemoveCmd     *cobra.Command
	BookmarkReplaceCmd    *cobra.Command
	BookmarkTypeAddCmd    *cobra.Command
	BookmarkTypeCmd       *cobra.Command
	BookmarkTypeEditCmd   *cobra.Command
	BookmarkTypeRemoveCmd *cobra.Command
	BookmarkTypeListCmd   *cobra.Command
	BookmarkUpsertCmd     *cobra.Command

	ConfigCmd             *cobra.Command
	ConfigExtensionsCmd   *cobra.Command
	ConfigPathsCmd        *cobra.Command
	DocumentAddCmd        *cobra.Command
	DocumentCmd           *cobra.Command
	DocumentCountCmd      *cobra.Command
	DocumentDoesExistCmd  *cobra.Command
	DocumentEditCmd       *cobra.Command
	DocumentFindCmd       *cobra.Command
	DocumentListCmd       *cobra.Command
	DocumentRemoveCmd     *cobra.Command
	DocumentReplaceCmd    *cobra.Command
	DocumentTypeAddCmd    *cobra.Command
	DocumentTypeCmd       *cobra.Command
	DocumentTypeEditCmd   *cobra.Command
	DocumentTypeRemoveCmd *cobra.Command
	DocumentTypeListCmd   *cobra.Command
	DocumentUpsertCmd     *cobra.Command

	RootCmd         *cobra.Command
	TagAddCmd       *cobra.Command
	TagAmbiguousCmd *cobra.Command
	TagCmd          *cobra.Command
	TagCountCmd     *cobra.Command
	TagDoesExistCmd *cobra.Command
	TagEditCmd      *cobra.Command
	TagExportCmd    *cobra.Command
	TagFindCmd      *cobra.Command
	TagImportCmd    *cobra.Command
	TagListCmd      *cobra.Command
	TagRemoveCmd    *cobra.Command
	TagReplaceCmd   *cobra.Command
	TagShortCmd     *cobra.Command
	TagUpsertCmd    *cobra.Command
	// contains filtered or unexported fields
}

func NewCli added in v0.6.0

func NewCli(options ...CliOption) *Cli

func (*Cli) Execute added in v0.6.0

func (cli *Cli) Execute() error

func (*Cli) PersistentPreRun added in v0.6.0

func (cli *Cli) PersistentPreRun(cmd *cobra.Command, args []string)

type CliOption added in v0.6.0

type CliOption func(*Cli)

func WithAll added in v0.6.0

func WithAll() CliOption

func WithBNTPBackend added in v0.6.0

func WithBNTPBackend() CliOption

func WithBookmarkCommand added in v0.6.0

func WithBookmarkCommand() CliOption

func WithBookmarkTypeCommand added in v0.6.0

func WithBookmarkTypeCommand() CliOption

func WithConfigCommand added in v0.6.0

func WithConfigCommand() CliOption

func WithConfigManager added in v0.6.0

func WithConfigManager() CliOption

func WithDbOverride added in v0.6.0

func WithDbOverride(dbToUse *sql.DB) CliOption

func WithDocumentCommand added in v0.6.0

func WithDocumentCommand() CliOption

func WithDocumentTypeCommand added in v0.6.0

func WithDocumentTypeCommand() CliOption

func WithFsOverride added in v0.6.0

func WithFsOverride(fsToUse afero.Fs) CliOption

func WithStdErrOverride added in v0.6.0

func WithStdErrOverride(stderrToUse io.Writer) CliOption

func WithTagCommand added in v0.6.0

func WithTagCommand() CliOption

type ConflictingPositionalArgsAndFlagError added in v0.6.0

type ConflictingPositionalArgsAndFlagError struct {
	Flag string
}

func (ConflictingPositionalArgsAndFlagError) As added in v0.6.0

func (ConflictingPositionalArgsAndFlagError) Error added in v0.6.0

func (ConflictingPositionalArgsAndFlagError) Is added in v0.6.0

type Count added in v0.6.0

type Count struct {
	Count int64 `json:"count"`
}

type DoesExist added in v0.6.0

type DoesExist struct {
	DoesExist bool `json:"doesExist"`
}

type EntityMarshallingError added in v0.6.0

type EntityMarshallingError struct {
	Inner error
}

func (EntityMarshallingError) As added in v0.6.0

func (err EntityMarshallingError) As(target any) bool

func (EntityMarshallingError) Error added in v0.6.0

func (err EntityMarshallingError) Error() string

func (EntityMarshallingError) Is added in v0.6.0

func (err EntityMarshallingError) Is(other error) bool

func (EntityMarshallingError) Unwrap added in v0.6.0

func (err EntityMarshallingError) Unwrap() error

type NumAffectedRecords added in v0.6.0

type NumAffectedRecords struct {
	NumAffectedRecords int64 `json:"numAffectedRecords"`
}

Jump to

Keyboard shortcuts

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