Documentation ¶
Overview ¶
Package options defines standard options and option types usable to provide CLI options used to dynamically orchestrate arbitrary access specifications. These options have a predefined meaning and are shared among various access methods.
The options and types are registered at a global registry. This registry is also used by the plugin adapter to map option requests from plugins to implementations.
Index ¶
- Constants
- Variables
- type OptionType
- func NewBoolOptionType(name, desc string) OptionType
- func NewBytesOptionType(name, desc string) OptionType
- func NewIntOptionType(name, desc string) OptionType
- func NewStringArrayOptionType(name, desc string) OptionType
- func NewStringMapOptionType(name, desc string) OptionType
- func NewStringOptionType(name, desc string) OptionType
- func NewStringSliceMapColonOptionType(name, desc string) OptionType
- func NewStringSliceMapOptionType(name, desc string) OptionType
- func NewValueMapOptionType(name, desc string) OptionType
- func NewValueMapYAMLOptionType(name, desc string) OptionType
- func NewYAMLOptionType(name, desc string) OptionType
- func RegisterOption(o OptionType) OptionType
- type OptionTypeCreator
- type Registry
- type ValueTypeInfo
Constants ¶
const ( TYPE_STRING = "string" TYPE_STRINGARRAY = "[]string" TYPE_STRING2STRING = "string=string" TYPE_INT = "int" TYPE_BOOL = "bool" TYPE_YAML = "YAML" TYPE_STRINGMAPYAML = "map[string]YAML" TYPE_STRING2YAML = "string=YAML" TYPE_STRING2STRINGSLICE = "string=string,string" TYPE_STRINGCOLONSTRINGSLICE = "string:string,string" TYPE_BYTES = "[]byte" )
const ( KIND_OPTIONTYPE = "option type" KIND_OPTION = "option" )
Variables ¶
var ArtifactOption = RegisterOption(NewStringOptionType("artifactId", "maven artifact id"))
ArtifactOption.
var BucketOption = RegisterOption(NewStringOptionType("bucket", "bucket name"))
BucketOption.
var ClassifierOption = RegisterOption(NewStringOptionType("classifier", "maven classifier"))
ClassifierOption the optional classifier of a maven resource.
var CommentOption = RegisterOption(NewStringOptionType("comment", "comment field value"))
CommentOption.
var CommitOption = RegisterOption(NewStringOptionType("commit", "git commit id"))
CommitOption.
var DefaultRegistry = New()
var DigestOption = RegisterOption(NewStringOptionType("digest", "blob digest"))
DigestOption.
var ExtensionOption = RegisterOption(NewStringOptionType("extension", "maven extension name"))
ExtensionOption the optional extension of a maven resource.
var GlobalAccessOption = RegisterOption(NewValueMapYAMLOptionType("globalAccess", "access specification for global access"))
GlobalAccessOption.
var GroupOption = RegisterOption(NewStringOptionType("groupId", "maven group id"))
GroupOption.
var HTTPBodyOption = RegisterOption(NewStringOptionType("body", "body of a http request"))
var HTTPHeaderOption = RegisterOption(NewStringSliceMapColonOptionType("header", "http headers"))
var HTTPRedirectOption = RegisterOption(NewBoolOptionType("noredirect", "http redirect behavior"))
var HTTPVerbOption = RegisterOption(NewStringOptionType("verb", "http request method"))
var HintOption = RegisterOption(NewStringOptionType("hint", "(repository) hint for local artifacts"))
HintOption.
var HostnameOption = RegisterOption(NewStringOptionType("accessHostname", "hostname used for access"))
HostnameOption.
var MediatypeOption = RegisterOption(NewStringOptionType("mediaType", "media type for artifact blob representation"))
MediatypeOption.
var PackageOption = RegisterOption(NewStringOptionType("accessPackage", "package or object name"))
PackageOption.
var ReferenceOption = RegisterOption(NewStringOptionType("reference", "reference name"))
ReferenceOption.
var RegionOption = RegisterOption(NewStringOptionType("region", "region name"))
RegionOption.
var RegistryOption = RegisterOption(NewStringOptionType("accessRegistry", "registry base URL"))
RegistryOption.
var RepositoryOption = RegisterOption(NewStringOptionType("accessRepository", "repository URL"))
RepositoryOption.
var SizeOption = RegisterOption(NewIntOptionType("size", "blob size"))
SizeOption.
var URLOption = RegisterOption(NewStringOptionType("url", "artifact or server url"))
URLOption.
var VersionOption = RegisterOption(NewStringOptionType("accessVersion", "version for access specification"))
VersionOption.
Functions ¶
This section is empty.
Types ¶
type OptionType ¶
type OptionType interface { flagsets.ConfigOptionType ValueType() string GetDescriptionText() string }
func NewBoolOptionType ¶
func NewBoolOptionType(name, desc string) OptionType
func NewBytesOptionType ¶ added in v0.8.0
func NewBytesOptionType(name, desc string) OptionType
func NewIntOptionType ¶
func NewIntOptionType(name, desc string) OptionType
func NewStringArrayOptionType ¶
func NewStringArrayOptionType(name, desc string) OptionType
func NewStringMapOptionType ¶
func NewStringMapOptionType(name, desc string) OptionType
func NewStringOptionType ¶
func NewStringOptionType(name, desc string) OptionType
func NewStringSliceMapColonOptionType ¶ added in v0.8.0
func NewStringSliceMapColonOptionType(name, desc string) OptionType
func NewStringSliceMapOptionType ¶ added in v0.8.0
func NewStringSliceMapOptionType(name, desc string) OptionType
func NewValueMapOptionType ¶
func NewValueMapOptionType(name, desc string) OptionType
func NewValueMapYAMLOptionType ¶
func NewValueMapYAMLOptionType(name, desc string) OptionType
func NewYAMLOptionType ¶
func NewYAMLOptionType(name, desc string) OptionType
func RegisterOption ¶
func RegisterOption(o OptionType) OptionType
type OptionTypeCreator ¶
type OptionTypeCreator func(name string, description string) OptionType
type ValueTypeInfo ¶
type ValueTypeInfo struct { OptionTypeCreator Description string }
func (ValueTypeInfo) GetDescription ¶
func (i ValueTypeInfo) GetDescription() string