commands

package
v0.0.0-...-5f133c6 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SystemArch

func SystemArch() string

func WithNoNesting

func WithNoNesting(f *TableFormatter)

Types

type Arch

type Arch struct {
	*cobra.Command
}

func NewArch

func NewArch(root *Root) *Arch

func (*Arch) Run

func (uc *Arch) Run(cmd *cobra.Command, args []string) error

type Delete

type Delete struct {
	*cobra.Command
	// contains filtered or unexported fields
}

func NewDelete

func NewDelete(root *Root) *Delete

func (*Delete) Run

func (uc *Delete) Run(cmd *cobra.Command, args []string) error

type DeleteCommand

type DeleteCommand struct {
	*cobra.Command
	// contains filtered or unexported fields
}

type Download

type Download struct {
	*cobra.Command

	ForceUid  bool
	ForcePath bool
	Output    string
	Overwrite bool
	Arch      string
	Tag       []string
	// contains filtered or unexported fields
}

func NewDownload

func NewDownload(root *Root) *Download

func (*Download) Run

func (dc *Download) Run(cmd *cobra.Command, args []string) error

type FormatterList

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

A FormatterList contains a squence of astore.Formatter objects

The FormatterList also implements the astore.Formatter interface, allowing one to apply multiple formatters to an input stream.

func NewFormatterList

func NewFormatterList() *FormatterList

Creates an empty FormatterList

func (*FormatterList) Append

func (fl *FormatterList) Append(formatter castore.Formatter)

Appends a astore.Formatter to a FormatterList

func (*FormatterList) Artifact

func (fl *FormatterList) Artifact(af *astore.Artifact)

Implements the astore.Formatter.Artifact() method for FormatterList.

Calls astore.Artifact() on each formatter in the formatters sequence, passing in the input astore.Artifact.

func (*FormatterList) Element

func (fl *FormatterList) Element(el *astore.Element)

Implements the astore.Formatter.Element() method for FormatterList.

Calls astore.Element() on each formatter in the formatters sequence, passing in the input astore.Artifact.

func (*FormatterList) Flush

func (fl *FormatterList) Flush()

Implements the astore.Formatter.Flush() method for FormatterList.

Calls astore.Flush() on each formatter in the formatters sequence.

type Guess

type Guess struct {
	*cobra.Command
}

func NewGuess

func NewGuess(root *Root) *Guess

type List

type List struct {
	*cobra.Command

	Tag []string
	All bool
	// contains filtered or unexported fields
}

func NewList

func NewList(root *Root) *List

func (*List) Run

func (l *List) Run(cmd *cobra.Command, args []string) error

type MarshalData

type MarshalData struct {
	Artifacts []astore.Artifact
	Elements  []astore.Element
}

MarshalData is the collection of Artifacts and Elements from an astore operation.

type Modifier

type Modifier func(*TableFormatter)

func WithHeading

func WithHeading(heading string) Modifier

type NoteCommand

type NoteCommand struct {
	*cobra.Command
	// contains filtered or unexported fields
}

func NewNote

func NewNote(root *Root) *NoteCommand

func (*NoteCommand) Run

func (uc *NoteCommand) Run(cmd *cobra.Command, args []string) error

type OpFile

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

OpFile formats the astore meta based on the outputFile extension.

See also marshal.MarshalFile()

func NewOpFile

func NewOpFile(outputFile string) *OpFile

Creates an empty OpFile

func (*OpFile) Artifact

func (mf *OpFile) Artifact(af *astore.Artifact)

Implements the astore.Formatter.Artifact() method for MarshalFormat.

Stores the input artifact into an internal artifact sequence.

func (*OpFile) Element

func (mf *OpFile) Element(el *astore.Element)

Implements the astore.Formatter.Element() method for MarshalFormat.

Stores the input element into an internal element sequence.

func (*OpFile) Flush

func (mf *OpFile) Flush()

Implements the astore.Formatter.Flush() method for MarshalFormat.

Outputs the artifact and element data to an output file using marshal.MarshalFile(), which marshals the data based on the file extension of the output file.

type Public

type Public struct {
	*cobra.Command
}

func NewPublic

func NewPublic(root *Root) *Public

type PublicAdd

type PublicAdd struct {
	*cobra.Command

	Uid           string
	NonExistentOK bool
	Arch          string
	Tag           []string
	All           bool
	// contains filtered or unexported fields
}

func NewPublicAdd

func NewPublicAdd(root *Root) *PublicAdd

func (*PublicAdd) Run

func (uc *PublicAdd) Run(cmd *cobra.Command, args []string) error

type PublicDel

type PublicDel struct {
	*cobra.Command
	// contains filtered or unexported fields
}

func NewPublicDel

func NewPublicDel(root *Root) *PublicDel

func (*PublicDel) Run

func (uc *PublicDel) Run(cmd *cobra.Command, args []string) error

type Remote

type Remote struct {
	*cobra.Command

	Suggest SuggestFlags
}

func NewRemote

func NewRemote(root *Root) *Remote

func (*Remote) Run

func (uc *Remote) Run(cmd *cobra.Command, args []string) error

type Root

type Root struct {
	*cobra.Command
	*client.BaseFlags
	// contains filtered or unexported fields
}

func New

func New(base *client.BaseFlags) *Root

func NewRoot

func NewRoot(base *client.BaseFlags) *Root

func (*Root) ConfigStore

func (rc *Root) ConfigStore(namespace ...string) (config.Store, error)

func (*Root) Formatter

func (rc *Root) Formatter(mods ...Modifier) astore.Formatter

func (*Root) OutputArtifacts

func (rc *Root) OutputArtifacts(arts []*arpc.Artifact)

func (*Root) StoreClient

func (rc *Root) StoreClient() (*astore.Client, error)

type StructuredStdout

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

func NewStructuredStdout

func NewStructuredStdout(m marshal.Marshaller) *StructuredStdout

func (*StructuredStdout) Artifact

func (s *StructuredStdout) Artifact(af *astore.Artifact)

func (*StructuredStdout) Element

func (s *StructuredStdout) Element(el *astore.Element)

func (*StructuredStdout) Flush

func (s *StructuredStdout) Flush()

type SuggestFlags

type SuggestFlags astore.SuggestOptions

func (*SuggestFlags) Options

func (sf *SuggestFlags) Options() *astore.SuggestOptions

func (*SuggestFlags) Register

func (sf *SuggestFlags) Register(flagset *pflag.FlagSet)

type TableFormatter

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

func NewTableFormatter

func NewTableFormatter(mods ...Modifier) *TableFormatter

func (*TableFormatter) Artifact

func (ff *TableFormatter) Artifact(af *astore.Artifact)

func (*TableFormatter) Element

func (ff *TableFormatter) Element(el *astore.Element)

func (*TableFormatter) Flush

func (ff *TableFormatter) Flush()

type Tag

type Tag struct {
	*cobra.Command
}

func NewTag

func NewTag(root *Root) *Tag

type TagCommand

type TagCommand struct {
	*cobra.Command
	// contains filtered or unexported fields
}

func NewTagCommand

func NewTagCommand(root *Root, name string, op func([]string) astore.TagModifier) *TagCommand

func (*TagCommand) Run

func (uc *TagCommand) Run(cmd *cobra.Command, args []string) error

type Upload

type Upload struct {
	*cobra.Command

	Suggest SuggestFlags
	Arch    string
	Note    string
	Tag     []string
	// contains filtered or unexported fields
}

func NewUpload

func NewUpload(root *Root) *Upload

func (*Upload) Run

func (uc *Upload) Run(cmd *cobra.Command, args []string) error

Jump to

Keyboard shortcuts

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