component

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Command represents this folder's command

Functions

func GetComponentIDs

func GetComponentIDs(context context.Context, cmd *cobra.Command, currentProfile *profile.Profile) (ids []string)

GetComponentIDs gets the IDs of the components

Types

type Component

type Component struct {
	Type  string       `json:"type"  mapstructure:"type"`
	ID    int          `json:"id"    mapstructure:"id"`
	Name  string       `json:"name"  mapstructure:"name"`
	Links common.Links `json:"links" mapstructure:"links"`
}

func (Component) GetHeader

func (issue Component) GetHeader(short bool) []string

GetHeader gets the header for a table

implements common.Tableable

func (Component) GetRow

func (component Component) GetRow(headers []string) []string

GetRow gets the row for a table

implements common.Tableable

func (Component) String

func (component Component) String() string

String gets a string representation

implements fmt.Stringer

type Components

type Components []Component

func (Components) GetHeader

func (components Components) GetHeader() []string

GetHeader gets the headers for the list command

implements common.Tableables

func (Components) GetRowAt

func (components Components) GetRowAt(index int, headers []string) []string

GetRowAt gets the row for the list command

implements common.Tableables

func (Components) Size

func (components Components) 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