Documentation
¶
Index ¶
- Constants
- Variables
- func AddContextValueSupplier(name string, supplier ContextValueSupplier)
- func GetModelDir(url string) (string, error)
- func Load(source Source) error
- func RegisterAction(name string, action Action)
- type Action
- type ColumnFormatter
- type CommandModel
- type CommandType
- type ContextValueSupplier
- type ContextValues
- type GitSource
- type LocalAction
- type Model
- type ParameterDisposition
- type ParameterModel
- type ResultModel
- type Source
Constants ¶
View Source
const ( TSFormat = "ts" RelativeTSFormat = "relative_ts" )
View Source
const ( GetMethod = "GET" PostMethod = "POST" PatchMethod = "PATCH" DeleteMethod = "DELETE" )
View Source
const ( // Put the parameter value in the context ContextDisposition = ParameterDisposition("context") )
Variables ¶
View Source
var Models []*Model
Functions ¶
func AddContextValueSupplier ¶
func AddContextValueSupplier(name string, supplier ContextValueSupplier)
func GetModelDir ¶
func RegisterAction ¶
Types ¶
type ColumnFormatter ¶
type ColumnFormatter string
type CommandModel ¶
type CommandModel struct {
Type string `hcl:"type,label"`
Name string `hcl:"name,label"`
Use *string `hcl:"use"`
Short string `hcl:"short"`
Aliases *[]string `hcl:"aliases"`
Path *string `hcl:"path"`
Method *string `hcl:"method"`
Parameters []*ParameterModel `hcl:"parameter,block"`
ClusterIDOptional *bool `hcl:"cluster_id_optional"`
AuthNotRequired *bool `hcl:"auth_not_required"`
Unauthenticated *bool `hcl:"unauthenticated"`
Result *ResultModel `hcl:"result,block"`
Commands []*CommandModel `hcl:"command,block"`
// contains filtered or unexported fields
}
func (*CommandModel) GetCommand ¶
func (cm *CommandModel) GetCommand() *cobra.Command
func (*CommandModel) GetCommandType ¶
func (cm *CommandModel) GetCommandType() CommandType
type CommandType ¶
type CommandType string
func (CommandType) IsGroup ¶
func (t CommandType) IsGroup() bool
type ContextValueSupplier ¶
type ContextValues ¶
type ContextValues struct {
// contains filtered or unexported fields
}
func (*ContextValues) Set ¶
func (c *ContextValues) Set(name, value string)
type GitSource ¶
type GitSource struct {
// contains filtered or unexported fields
}
func (*GitSource) GetFileSystem ¶
func (s *GitSource) GetFileSystem() http.FileSystem
type LocalAction ¶
type LocalAction string
type Model ¶
type Model struct {
Command CommandModel `hcl:"command,block"`
APIPrefix string `hcl:"api_prefix"`
MinCLIVersion *string `hcl:"min_cli_version"`
FileName string
Version string
}
type ParameterDisposition ¶
type ParameterDisposition string
What to do with a parameter. By default the parameter is put in the query string (for GET), or in the json body (everything else.)
type ParameterModel ¶
type ResultModel ¶
Click to show internal directories.
Click to hide internal directories.