project

package
v0.6.10 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultConfig = &Config{
		Filter: filters.DefaultFilter,
	}
)
View Source
var DefaultProjectConfig = &ConfigProject{
	Description: "",
	Labels:      map[string]string{},
}

Functions

This section is empty.

Types

type Config

type Config struct {
	Filter filters.Filters `json:"filter" pflag:","`
}

Config holds the flag for get project

func (Config) GetPFlagSet

func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet

GetPFlagSet will return strongly types pflags for all fields in Config and its nested types. The format of the flags is json-name.json-sub-name... etc.

type ConfigProject added in v0.4.17

type ConfigProject struct {
	ID              string            `json:"id" pflag:",id for the project specified as argument."`
	ActivateProject bool              `json:"activateProject" pflag:",(Deprecated) Activates the project specified as argument. Only used in update"`
	ArchiveProject  bool              `json:"archiveProject" pflag:",(Deprecated) Archives the project specified as argument. Only used in update"`
	Activate        bool              `json:"activate" pflag:",Activates the project specified as argument. Only used in update"`
	Archive         bool              `json:"archive" pflag:",Archives the project specified as argument. Only used in update"`
	Name            string            `json:"name" pflag:",name for the project specified as argument."`
	DryRun          bool              `json:"dryRun" pflag:",execute command without making any modifications."`
	Description     string            `json:"description" pflag:",description for the project specified as argument."`
	Labels          map[string]string `json:"labels" pflag:",labels for the project specified as argument."`
	File            string            `json:"file" pflag:",file for the project definition."`
}

ConfigProject hold configuration for project update flags.

func (ConfigProject) GetPFlagSet added in v0.4.17

func (cfg ConfigProject) GetPFlagSet(prefix string) *pflag.FlagSet

GetPFlagSet will return strongly types pflags for all fields in ConfigProject and its nested types. The format of the flags is json-name.json-sub-name... etc.

func (*ConfigProject) GetProjectSpec added in v0.4.17

func (c *ConfigProject) GetProjectSpec(id string) (*admin.Project, error)

GetProjectSpec return project spec from a file/flags

func (*ConfigProject) MapToAdminState added in v0.4.17

func (c *ConfigProject) MapToAdminState() (admin.Project_ProjectState, error)

MapToAdminState return project spec from a file/flags

Jump to

Keyboard shortcuts

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