cflag

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IDFlagValue

func IDFlagValue(p interface{}) string

func SetIDFlagValue

func SetIDFlagValue(p interface{}, id string)

func SetZoneFlagValue

func SetZoneFlagValue(p interface{}, zone string)

func ZoneFlagValue

func ZoneFlagValue(p interface{}) string

Types

type CommonParameter

type CommonParameter struct {
	Parameters       string `cli:",category=input,desc=Input parameters in JSON format" json:"-"`
	GenerateSkeleton bool   `cli:",category=input,aliases=skeleton,desc=Output skeleton of parameters with JSON format" json:"-"`
	Example          bool   `cli:",category=example,desc=Output example parameters with JSON format" json:"-"`
}

CommonParameter 全コマンド共通フィールド

func (*CommonParameter) ExampleFlagValue

func (p *CommonParameter) ExampleFlagValue() bool

func (*CommonParameter) GenerateSkeletonFlagValue

func (p *CommonParameter) GenerateSkeletonFlagValue() bool

func (*CommonParameter) ParametersFlagValue

func (p *CommonParameter) ParametersFlagValue() string

type CommonParameterValueHolder

type CommonParameterValueHolder interface {
	ParametersFlagValue() string
	GenerateSkeletonFlagValue() bool
}

type ConfirmParameter

type ConfirmParameter struct {
	AssumeYes bool `cli:"assumeyes,short=y,category=input,desc=Assume that the answer to any question which would be asked is yes" json:"-"`
}

func (*ConfirmParameter) AssumeYesFlagValue

func (p *ConfirmParameter) AssumeYesFlagValue() bool

type ConfirmParameterValueHandler

type ConfirmParameterValueHandler interface {
	AssumeYesFlagValue() bool
}

type DescParameter

type DescParameter struct {
	Description string `cli:",category=common,order=20" validate:"omitempty,description" json:",omitempty"`
}

type DescUpdateParameter

type DescUpdateParameter struct {
	Description *string `cli:",category=common,order=20" validate:"omitempty,description" json:",omitempty"`
}

type ExampleParameterValueHolder

type ExampleParameterValueHolder interface {
	ExampleFlagValue() bool
}

type FailIfNotFoundParameter

type FailIfNotFoundParameter struct {
	FailIfNotFound bool `cli:",category=error"`
}

type FilterByNamesParameter

type FilterByNamesParameter struct {
	Names []string `cli:",category=filter,order=10" validate:"omitempty,unique"`
}

type FilterByScopeParameter

type FilterByScopeParameter struct {
	Scope string `cli:",category=filter,options=scope,order=30" mapconv:",omitempty,filters=scope_to_value" validate:"omitempty,scope"`
}

type FilterByTagsParameter

type FilterByTagsParameter struct {
	Tags []string `cli:",category=filter,order=20" validate:"omitempty,unique"`
}

type ForceDeleteParameter

type ForceDeleteParameter struct {
	Force bool `cli:",short=f,category=delete,order=10"`
}

type IDParameter

type IDParameter struct {
	ID string `cli:"-" json:"-"` // IDは実行時にName or Tagsから検索〜設定されるケースがあるためvalidate:"required"にしない
}

IDParameter IDを指定して操作する必要があるリソースが実装すべきIDパラメータの定義

func (*IDParameter) IDFlagValue

func (p *IDParameter) IDFlagValue() string

func (*IDParameter) SetIDFlagValue

func (p *IDParameter) SetIDFlagValue(id string)

type IDParameterValueHandler

type IDParameterValueHandler interface {
	IDFlagValue() string
	SetIDFlagValue(id string)
}

type IconIDParameter

type IconIDParameter struct {
	IconID types.ID `cli:",category=common,order=40" json:",omitempty"`
}

type IconIDUpdateParameter

type IconIDUpdateParameter struct {
	IconID *types.ID `cli:",category=common,order=40" json:",omitempty"`
}

type LimitOffsetParameter

type LimitOffsetParameter struct {
	Count int `cli:",aliases=max limit,category=limit-offset"`
	From  int `cli:",aliases=offset,category=limit-offset"`
}

type MonitorParameter

type MonitorParameter struct {
	Start string `cli:",category=monitor" mapconv:",omitempty,filters=rfc3339"`
	End   string `cli:",category=monitor" mapconv:",omitempty,filters=rfc3339"`
}

MonitorParameter Monitor系APIで共通のパラメータ

type NameParameter

type NameParameter struct {
	Name string `cli:",category=common,order=10" validate:"required" json:",omitempty"`
}

type NameUpdateParameter

type NameUpdateParameter struct {
	Name *string `cli:",category=common,order=10" validate:"omitempty,min=1" json:",omitempty"`
}

type NoWaitParameter

type NoWaitParameter struct {
	NoWait bool `cli:",category=wait"`
}

type OutputParameter

type OutputParameter struct {
	OutputType  string `` /* 130-byte string literal not displayed */
	Quiet       bool   `cli:",short=q,category=output,desc=Output IDs only" json:"-"`
	Format      string `cli:",aliases=fmt,category=output,desc=Output format in Go templates" json:"-"`
	Query       string `cli:",category=output,desc=Query for JSON output" json:"-"`
	QueryDriver string `` /* 153-byte string literal not displayed */
}

func (*OutputParameter) FormatFlagValue

func (p *OutputParameter) FormatFlagValue() string

func (*OutputParameter) OutputTypeFlagValue

func (p *OutputParameter) OutputTypeFlagValue() string

func (*OutputParameter) QueryDriverFlagValue

func (p *OutputParameter) QueryDriverFlagValue() string

func (*OutputParameter) QueryFlagValue

func (p *OutputParameter) QueryFlagValue() string

func (*OutputParameter) QuietFlagValue

func (p *OutputParameter) QuietFlagValue() bool

type TagsParameter

type TagsParameter struct {
	Tags []string `cli:",category=common,order=30" validate:"omitempty,tags" json:",omitempty"`
}

type TagsUpdateParameter

type TagsUpdateParameter struct {
	Tags *[]string `cli:",category=common,order=30" validate:"omitempty,tags" json:",omitempty"`
}

type WaitForReleaseParameter

type WaitForReleaseParameter struct {
	WaitForRelease        bool `cli:",category=wait,order=10"` // trueの場合、他リソースから参照されている間は削除を待ち合わせし続ける
	WaitForReleaseTimeout int  `cli:",category=wait,order=20"` // WaitForReleaseがtrueの場合の待ち時間タイムアウト(デフォルト:1時間)
	WaitForReleaseTick    int  `cli:",category=wait,order=30"` // WaitForReleaseがtrueの場合の待ち処理のポーリング間隔(デフォルト:5秒)
}

type ZoneParameter

type ZoneParameter struct {
	Zone string `cli:",category=zone" validate:"required,zone"`
}

func (*ZoneParameter) SetZoneFlagValue

func (p *ZoneParameter) SetZoneFlagValue(zone string)

func (*ZoneParameter) ZoneFlagValue

func (p *ZoneParameter) ZoneFlagValue() string

type ZoneParameterValueHandler

type ZoneParameterValueHandler interface {
	ZoneFlagValue() string
	SetZoneFlagValue(zone string)
}

Jump to

Keyboard shortcuts

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