artifact

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Command = &cobra.Command{
	Use:   "artifact",
	Short: "Manage artifacts",
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("Artifact requires a subcommand:")
		for _, command := range cmd.Commands() {
			fmt.Println(command.Name())
		}
	},
}

Functions

func GetArtifactNames added in v0.5.0

func GetArtifactNames(context context.Context, cmd *cobra.Command) (names []string)

GetArtifactNames gets the names of the artifacts

Types

type Artifact

type Artifact struct {
	Name      string       `json:"name"      mapstructure:"name"`
	Size      uint64       `json:"size"      mapstructure:"size"`
	Downloads uint64       `json:"downloads" mapstructure:"downloads"`
	User      user.User    `json:"user"      mapstructure:"user"`
	Links     common.Links `json:"links"     mapstructure:"links"`
}

func (Artifact) GetHeader

func (artifact Artifact) GetHeader(short bool) []string

GetHeader gets the header for a table

implements common.Tableable

func (Artifact) GetRow

func (artifact Artifact) GetRow(headers []string) []string

GetRow gets the row for a table

implements common.Tableable

type Artifacts

type Artifacts []Artifact

func (Artifacts) GetHeader

func (artifacts Artifacts) GetHeader() []string

GetHeader gets the headers for the list command

implements common.Tableables

func (Artifacts) GetRowAt

func (artifacts Artifacts) GetRowAt(index int, headers []string) []string

GetRowAt gets the row for the list command

implements common.Tableables

func (Artifacts) Size

func (artifacts Artifacts) Size() int

Size gets the number of elements

implements common.Tableables

Jump to

Keyboard shortcuts

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