-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ef620b4
commit 14402dd
Showing
32 changed files
with
415 additions
and
513 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
package options | ||
|
||
import ( | ||
"ocm.software/ocm/api/utils/cobrautils/flagsets" | ||
) | ||
|
||
const ( | ||
// Deprecated: use package [flagsets]. | ||
TYPE_STRING = flagsets.TYPE_STRING | ||
// Deprecated: use package [flagsets]. | ||
TYPE_STRINGARRAY = flagsets.TYPE_STRINGARRAY | ||
// Deprecated: use package [flagsets]. | ||
TYPE_STRING2STRING = flagsets.TYPE_STRING2STRING | ||
// Deprecated: use package [flagsets]. | ||
TYPE_INT = flagsets.TYPE_INT | ||
// Deprecated: use package [flagsets]. | ||
TYPE_BOOL = flagsets.TYPE_BOOL | ||
// Deprecated: use package [flagsets]. | ||
TYPE_YAML = flagsets.TYPE_YAML | ||
// Deprecated: use package [flagsets]. | ||
TYPE_STRINGMAPYAML = flagsets.TYPE_STRINGMAPYAML | ||
// Deprecated: use package [flagsets]. | ||
TYPE_STRING2YAML = flagsets.TYPE_STRING2YAML | ||
// Deprecated: use package [flagsets]. | ||
TYPE_STRING2STRINGSLICE = flagsets.TYPE_STRING2STRINGSLICE | ||
// Deprecated: use package [flagsets]. | ||
TYPE_STRINGCOLONSTRINGSLICE = flagsets.TYPE_STRINGCOLONSTRINGSLICE | ||
// Deprecated: use package [flagsets]. | ||
TYPE_BYTES = flagsets.TYPE_BYTES | ||
// Deprecated: use package [flagsets]. | ||
TYPE_IDENTITYPATH = flagsets.TYPE_IDENTITYPATH | ||
) | ||
|
||
// Deprecated: use packagge [flagsets]. | ||
type OptionType = flagsets.ConfigOptionType | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
// Deprecated: use packagge [flagsets]. | ||
func NewStringOptionType(name, desc string) OptionType { | ||
return flagsets.NewStringOptionType(name, desc) | ||
} | ||
|
||
// Deprecated: use packagge [flagsets]. | ||
func NewStringArrayOptionType(name, desc string) OptionType { | ||
return flagsets.NewStringArrayOptionType(name, desc) | ||
} | ||
|
||
// Deprecated: use packagge [flagsets]. | ||
func NewIntOptionType(name, desc string) OptionType { | ||
return flagsets.NewIntOptionType(name, desc) | ||
} | ||
|
||
// Deprecated: use packagge [flagsets]. | ||
func NewBoolOptionType(name, desc string) OptionType { | ||
return flagsets.NewBoolOptionType(name, desc) | ||
} | ||
|
||
// Deprecated: use packagge [flagsets]. | ||
func NewYAMLOptionType(name, desc string) OptionType { | ||
return flagsets.NewYAMLOptionType(name, desc) | ||
} | ||
|
||
// Deprecated: use packagge [flagsets]. | ||
func NewValueMapYAMLOptionType(name, desc string) OptionType { | ||
return flagsets.NewValueMapYAMLOptionType(name, desc) | ||
} | ||
|
||
// Deprecated: use packagge [flagsets]. | ||
func NewValueMapOptionType(name, desc string) OptionType { | ||
return flagsets.NewValueMapOptionType(name, desc) | ||
} | ||
|
||
// Deprecated: use packagge [flagsets]. | ||
func NewStringMapOptionType(name, desc string) OptionType { | ||
return flagsets.NewStringMapOptionType(name, desc) | ||
} | ||
|
||
// Deprecated: use packagge [flagsets]. | ||
func NewStringSliceMapOptionType(name, desc string) OptionType { | ||
return flagsets.NewStringSliceMapOptionType(name, desc) | ||
} | ||
|
||
// Deprecated: use packagge [flagsets]. | ||
func NewStringSliceMapColonOptionType(name, desc string) OptionType { | ||
return flagsets.NewStringSliceMapColonOptionType(name, desc) | ||
} | ||
|
||
// Deprecated: use packagge [flagsets]. | ||
func NewBytesOptionType(name, desc string) OptionType { | ||
return flagsets.NewBytesOptionType(name, desc) | ||
} | ||
|
||
// Deprecated: use packagge [flagsets]. | ||
func NewIdentityPathOptionType(name, desc string) OptionType { | ||
return flagsets.NewIdentityPathOptionType(name, desc) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,88 @@ | ||
package options | ||
|
||
import ( | ||
"ocm.software/ocm/api/utils/cobrautils/flagsets" | ||
) | ||
|
||
// HintOption . | ||
var HintOption = RegisterOption(NewStringOptionType("hint", "(repository) hint for local artifacts")) | ||
var HintOption = RegisterOption(flagsets.NewStringOptionType("hint", "(repository) hint for local artifacts")) | ||
|
||
// MediatypeOption . | ||
var MediatypeOption = RegisterOption(NewStringOptionType("mediaType", "media type for artifact blob representation")) | ||
var MediatypeOption = RegisterOption(flagsets.NewStringOptionType("mediaType", "media type for artifact blob representation")) | ||
|
||
// SizeOption . | ||
var SizeOption = RegisterOption(NewIntOptionType("size", "blob size")) | ||
var SizeOption = RegisterOption(flagsets.NewIntOptionType("size", "blob size")) | ||
|
||
// DigestOption . | ||
var DigestOption = RegisterOption(NewStringOptionType("digest", "blob digest")) | ||
var DigestOption = RegisterOption(flagsets.NewStringOptionType("digest", "blob digest")) | ||
|
||
// ReferenceOption . | ||
var ReferenceOption = RegisterOption(NewStringOptionType("reference", "reference name")) | ||
var ReferenceOption = RegisterOption(flagsets.NewStringOptionType("reference", "reference name")) | ||
|
||
// PackageOption . | ||
var PackageOption = RegisterOption(NewStringOptionType("package", "package or object name")) | ||
var PackageOption = RegisterOption(flagsets.NewStringOptionType("package", "package or object name")) | ||
|
||
// ArtifactOption . | ||
var ArtifactOption = RegisterOption(NewStringOptionType("artifactId", "maven artifact id")) | ||
var ArtifactOption = RegisterOption(flagsets.NewStringOptionType("artifactId", "maven artifact id")) | ||
|
||
// GroupOption . | ||
var GroupOption = RegisterOption(NewStringOptionType("groupId", "maven group id")) | ||
var GroupOption = RegisterOption(flagsets.NewStringOptionType("groupId", "maven group id")) | ||
|
||
// RepositoryOption . | ||
var RepositoryOption = RegisterOption(NewStringOptionType("accessRepository", "repository or registry URL")) | ||
var RepositoryOption = RegisterOption(flagsets.NewStringOptionType("accessRepository", "repository or registry URL")) | ||
|
||
// HostnameOption . | ||
var HostnameOption = RegisterOption(NewStringOptionType("accessHostname", "hostname used for access")) | ||
var HostnameOption = RegisterOption(flagsets.NewStringOptionType("accessHostname", "hostname used for access")) | ||
|
||
// CommitOption . | ||
var CommitOption = RegisterOption(NewStringOptionType("commit", "git commit id")) | ||
var CommitOption = RegisterOption(flagsets.NewStringOptionType("commit", "git commit id")) | ||
|
||
// GlobalAccessOption . | ||
var GlobalAccessOption = RegisterOption(NewValueMapYAMLOptionType("globalAccess", "access specification for global access")) | ||
var GlobalAccessOption = RegisterOption(flagsets.NewValueMapYAMLOptionType("globalAccess", "access specification for global access")) | ||
|
||
// RegionOption . | ||
var RegionOption = RegisterOption(NewStringOptionType("region", "region name")) | ||
var RegionOption = RegisterOption(flagsets.NewStringOptionType("region", "region name")) | ||
|
||
// BucketOption . | ||
var BucketOption = RegisterOption(NewStringOptionType("bucket", "bucket name")) | ||
var BucketOption = RegisterOption(flagsets.NewStringOptionType("bucket", "bucket name")) | ||
|
||
// VersionOption . | ||
var VersionOption = RegisterOption(NewStringOptionType("accessVersion", "version for access specification")) | ||
var VersionOption = RegisterOption(flagsets.NewStringOptionType("accessVersion", "version for access specification")) | ||
|
||
// ComponentOption. | ||
var ComponentOption = RegisterOption(NewStringOptionType("accessComponent", "component for access specification")) | ||
var ComponentOption = RegisterOption(flagsets.NewStringOptionType("accessComponent", "component for access specification")) | ||
|
||
// IdentityPathOption. | ||
var IdentityPathOption = RegisterOption(NewIdentityPathOptionType("identityPath", "identity path for specification")) | ||
var IdentityPathOption = RegisterOption(flagsets.NewIdentityPathOptionType("identityPath", "identity path for specification")) | ||
|
||
// URLOption. | ||
var URLOption = RegisterOption(NewStringOptionType("url", "artifact or server url")) | ||
var URLOption = RegisterOption(flagsets.NewStringOptionType("url", "artifact or server url")) | ||
|
||
var HTTPHeaderOption = RegisterOption(NewStringSliceMapColonOptionType("header", "http headers")) | ||
var HTTPHeaderOption = RegisterOption(flagsets.NewStringSliceMapColonOptionType("header", "http headers")) | ||
|
||
var HTTPVerbOption = RegisterOption(NewStringOptionType("verb", "http request method")) | ||
var HTTPVerbOption = RegisterOption(flagsets.NewStringOptionType("verb", "http request method")) | ||
|
||
var HTTPBodyOption = RegisterOption(NewStringOptionType("body", "body of a http request")) | ||
var HTTPBodyOption = RegisterOption(flagsets.NewStringOptionType("body", "body of a http request")) | ||
|
||
var HTTPRedirectOption = RegisterOption(NewBoolOptionType("noredirect", "http redirect behavior")) | ||
var HTTPRedirectOption = RegisterOption(flagsets.NewBoolOptionType("noredirect", "http redirect behavior")) | ||
|
||
// CommentOption . | ||
var CommentOption = RegisterOption(NewStringOptionType("comment", "comment field value")) | ||
var CommentOption = RegisterOption(flagsets.NewStringOptionType("comment", "comment field value")) | ||
|
||
// ClassifierOption the optional classifier of a maven resource. | ||
var ClassifierOption = RegisterOption(NewStringOptionType("classifier", "maven classifier")) | ||
var ClassifierOption = RegisterOption(flagsets.NewStringOptionType("classifier", "maven classifier")) | ||
|
||
// ExtensionOption the optional extension of a maven resource. | ||
var ExtensionOption = RegisterOption(NewStringOptionType("extension", "maven extension name")) | ||
var ExtensionOption = RegisterOption(flagsets.NewStringOptionType("extension", "maven extension name")) | ||
|
||
// NPMRegistryOption sets the registry of the npm resource. | ||
var NPMRegistryOption = RegisterOption(NewStringOptionType("registry", "npm package registry")) | ||
var NPMRegistryOption = RegisterOption(flagsets.NewStringOptionType("registry", "npm package registry")) | ||
|
||
// NPMPackageOption sets what package should be fetched from the npm registry. | ||
var NPMPackageOption = RegisterOption(NewStringOptionType("package", "npm package name")) | ||
var NPMPackageOption = PackageOption | ||
|
||
// NPMVersionOption sets the version of the npm package. | ||
var NPMVersionOption = RegisterOption(NewStringOptionType("version", "npm package version")) | ||
var NPMVersionOption = RegisterOption(flagsets.NewStringOptionType("version", "npm package version")) | ||
|
||
// IdPathOption is a path of identity specs. | ||
var IdPathOption = RegisterOption(NewStringArrayOptionType("idpath", "identity path (attr=value{,attr=value}")) | ||
var IdPathOption = RegisterOption(flagsets.NewStringArrayOptionType("idpath", "identity path (attr=value{,attr=value}")) |
Oops, something went wrong.