resources

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PanicIfMissingValue

func PanicIfMissingValue(h interface{})

Types

type Delete

type Delete[T structureSpec.Structure] struct {
	PromptsGetOrSelect func(ctx *cli.Context) (T, error)
	TableConfirm       func(ctx *cli.Context, resource T, prompt string) bool
	PromptsDeleteThis  string
	LibDelete          func(name string) error
	I18nDeleted        func(name string)
}

func (*Delete[T]) Action

func (h *Delete[T]) Action() func(ctx *cli.Context) error

func (*Delete[T]) BasicFlags

func (h *Delete[T]) BasicFlags() []cli.Flag

func (*Delete[T]) Default

func (h *Delete[T]) Default() common.Command

type Edit

type Edit[T structureSpec.Structure] struct {
	PromptsGetOrSelect func(ctx *cli.Context) (T, error)
	PromptsEdit        func(ctx *cli.Context, prev T) error
	TableConfirm       func(ctx *cli.Context, resource T, prompt string) bool
	PromptsEditThis    string
	LibSet             func(resource T) error
	I18nEdited         func(name string)

	UniqueFlags []cli.Flag
}

func (*Edit[T]) Action

func (h *Edit[T]) Action() func(ctx *cli.Context) error

func (*Edit[T]) BasicFlags

func (h *Edit[T]) BasicFlags() []cli.Flag

func (*Edit[T]) Default

func (h *Edit[T]) Default() common.Command

type List

type List[T structureSpec.Structure] struct {
	LibListResources func() ([]T, error)
	TableList        func([]T)
}

func (*List[T]) Default

func (h *List[T]) Default() common.Command

type New

type New[T structureSpec.Structure] struct {
	PromptsNew        func(ctx *cli.Context) (T, error)
	TableConfirm      func(ctx *cli.Context, service T, prompt string) bool
	PromptsCreateThis string
	LibNew            func(service T) error
	I18nCreated       func(name string)

	UniqueFlags []cli.Flag
}

func (*New[T]) Action

func (h *New[T]) Action() func(ctx *cli.Context) error

func (*New[T]) BasicFlags

func (h *New[T]) BasicFlags() []cli.Flag

func (*New[T]) Default

func (h *New[T]) Default() common.Command

type Query

type Query[T structureSpec.Structure] struct {
	LibListResources func() ([]T, error)
	TableList        func([]T)

	PromptsGetOrSelect func(ctx *cli.Context) (T, error)
	TableQuery         func(T)
}

func (*Query[T]) Action

func (h *Query[T]) Action() func(ctx *cli.Context) error

func (*Query[T]) BasicFlags

func (h *Query[T]) BasicFlags() []cli.Flag

func (*Query[T]) Default

func (h *Query[T]) Default() common.Command

Jump to

Keyboard shortcuts

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