options

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

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

View Source
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"
)
View Source
const (
	KIND_OPTIONTYPE = "option type"
	KIND_OPTION     = "option"
)

Variables

View Source
var ArtifactOption = RegisterOption(NewStringOptionType("artifactId", "maven artifact id"))

ArtifactOption.

View Source
var BucketOption = RegisterOption(NewStringOptionType("bucket", "bucket name"))

BucketOption.

View Source
var ClassifierOption = RegisterOption(NewStringOptionType("classifier", "maven classifier"))

ClassifierOption the optional classifier of a maven resource.

View Source
var CommentOption = RegisterOption(NewStringOptionType("comment", "comment field value"))

CommentOption.

View Source
var CommitOption = RegisterOption(NewStringOptionType("commit", "git commit id"))

CommitOption.

View Source
var DefaultRegistry = New()
View Source
var DigestOption = RegisterOption(NewStringOptionType("digest", "blob digest"))

DigestOption.

View Source
var ExtensionOption = RegisterOption(NewStringOptionType("extension", "maven extension name"))

ExtensionOption the optional extension of a maven resource.

View Source
var GlobalAccessOption = RegisterOption(NewValueMapYAMLOptionType("globalAccess", "access specification for global access"))

GlobalAccessOption.

View Source
var GroupOption = RegisterOption(NewStringOptionType("groupId", "maven group id"))

GroupOption.

View Source
var HTTPBodyOption = RegisterOption(NewStringOptionType("body", "body of a http request"))
View Source
var HTTPHeaderOption = RegisterOption(NewStringSliceMapColonOptionType("header", "http headers"))
View Source
var HTTPRedirectOption = RegisterOption(NewBoolOptionType("noredirect", "http redirect behavior"))
View Source
var HTTPVerbOption = RegisterOption(NewStringOptionType("verb", "http request method"))
View Source
var HintOption = RegisterOption(NewStringOptionType("hint", "(repository) hint for local artifacts"))

HintOption.

View Source
var HostnameOption = RegisterOption(NewStringOptionType("accessHostname", "hostname used for access"))

HostnameOption.

View Source
var MediatypeOption = RegisterOption(NewStringOptionType("mediaType", "media type for artifact blob representation"))

MediatypeOption.

View Source
var PackageOption = RegisterOption(NewStringOptionType("accessPackage", "package or object name"))

PackageOption.

View Source
var ReferenceOption = RegisterOption(NewStringOptionType("reference", "reference name"))

ReferenceOption.

View Source
var RegionOption = RegisterOption(NewStringOptionType("region", "region name"))

RegionOption.

View Source
var RegistryOption = RegisterOption(NewStringOptionType("accessRegistry", "registry base URL"))

RegistryOption.

View Source
var RepositoryOption = RegisterOption(NewStringOptionType("accessRepository", "repository URL"))

RepositoryOption.

View Source
var SizeOption = RegisterOption(NewIntOptionType("size", "blob size"))

SizeOption.

View Source
var URLOption = RegisterOption(NewStringOptionType("url", "artifact or server url"))

URLOption.

View Source
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 Registry

type Registry = *registry

func New

func New() Registry

type ValueTypeInfo

type ValueTypeInfo struct {
	OptionTypeCreator
	Description string
}

func (ValueTypeInfo) GetDescription

func (i ValueTypeInfo) GetDescription() string

Jump to

Keyboard shortcuts

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