Documentation
¶
Index ¶
- Constants
- Variables
- func FileInfo(ctx clictx.Context, path string, inputFilePath string) (os.FileInfo, string, error)
- func GetBaseDir(fs vfs.FileSystem, filePath string) (string, error)
- func GetPath(ctx clictx.Context, path string, inputFilePath string) (string, error)
- func RegisterInputType(name string, atype InputType)
- func SetFor(ctx datacontext.Context, scheme InputTypeScheme)
- func Usage(scheme InputTypeScheme) string
- type Context
- type DefaultInputType
- type GenericInputSpec
- func (s *GenericInputSpec) Evaluate(scheme InputTypeScheme) (InputSpec, error)
- func (s *GenericInputSpec) GetBlob(ctx Context, nv common.NameVersion, inputFilePath string) (accessio.TemporaryBlobAccess, string, error)
- func (s *GenericInputSpec) GetKind() string
- func (s *GenericInputSpec) GetRaw() ([]byte, error)
- func (s *GenericInputSpec) GetType() string
- func (s *GenericInputSpec) GetVersion() string
- func (s GenericInputSpec) MarshalJSON() ([]byte, error)
- func (s *GenericInputSpec) UnmarshalJSON(data []byte) error
- func (s *GenericInputSpec) Validate(fldPath *field.Path, ctx Context, inputFilePath string) field.ErrorList
- type InputSpec
- type InputType
- type InputTypeScheme
- type UnknownInputSpec
Constants ¶
View Source
const ATTR_INPUT_TYPES = "github.com/open-component-model/ocm/cmds/ocm/common/inputs"
View Source
const KIND_INPUTTYPE = "input type"
Variables ¶
View Source
var DefaultInputTypeScheme = NewInputTypeScheme(nil)
DefaultInputTypeScheme contains all globally known access serializer.
Functions ¶
func GetBaseDir ¶
func GetBaseDir(fs vfs.FileSystem, filePath string) (string, error)
func RegisterInputType ¶
func SetFor ¶
func SetFor(ctx datacontext.Context, scheme InputTypeScheme)
func Usage ¶
func Usage(scheme InputTypeScheme) string
Types ¶
type Context ¶
type DefaultInputType ¶
type DefaultInputType struct { runtime.ObjectVersionedType runtime.TypedObjectDecoder // contains filtered or unexported fields }
func (*DefaultInputType) ApplyConfig ¶
func (t *DefaultInputType) ApplyConfig(opts flagsets.ConfigOptions, config flagsets.Config) error
func (*DefaultInputType) ConfigOptionTypeSetHandler ¶
func (t *DefaultInputType) ConfigOptionTypeSetHandler() flagsets.ConfigOptionTypeSetHandler
func (*DefaultInputType) Usage ¶
func (t *DefaultInputType) Usage() string
type GenericInputSpec ¶
type GenericInputSpec struct {
// contains filtered or unexported fields
}
func ToGenericInputSpec ¶
func ToGenericInputSpec(spec InputSpec) (*GenericInputSpec, error)
func (*GenericInputSpec) Evaluate ¶
func (s *GenericInputSpec) Evaluate(scheme InputTypeScheme) (InputSpec, error)
func (*GenericInputSpec) GetBlob ¶
func (s *GenericInputSpec) GetBlob(ctx Context, nv common.NameVersion, inputFilePath string) (accessio.TemporaryBlobAccess, string, error)
func (*GenericInputSpec) GetKind ¶
func (s *GenericInputSpec) GetKind() string
func (*GenericInputSpec) GetRaw ¶
func (s *GenericInputSpec) GetRaw() ([]byte, error)
func (*GenericInputSpec) GetType ¶
func (s *GenericInputSpec) GetType() string
func (*GenericInputSpec) GetVersion ¶
func (s *GenericInputSpec) GetVersion() string
func (GenericInputSpec) MarshalJSON ¶
func (s GenericInputSpec) MarshalJSON() ([]byte, error)
func (*GenericInputSpec) UnmarshalJSON ¶
func (s *GenericInputSpec) UnmarshalJSON(data []byte) error
type InputSpec ¶
type InputSpec interface { runtime.VersionedTypedObject Validate(fldPath *field.Path, ctx Context, inputFilePath string) field.ErrorList GetBlob(ctx Context, nv common.NameVersion, inputFilePath string) (accessio.TemporaryBlobAccess, string, error) }
func CreateRepositorySpec ¶
func CreateRepositorySpec(t runtime.TypedObject) (InputSpec, error)
func NewGenericInputSpec ¶
func NewGenericInputSpec(data []byte, unmarshaler runtime.Unmarshaler) (InputSpec, error)
type InputType ¶
type InputType interface { runtime.TypedObjectDecoder runtime.VersionedTypedObject ConfigOptionTypeSetHandler() flagsets.ConfigOptionTypeSetHandler Usage() string }
func NewInputType ¶
type InputTypeScheme ¶
type InputTypeScheme interface { runtime.Scheme ConfigTypeSetConfigProvider() flagsets.ConfigTypeOptionSetConfigProvider flagsets.ConfigProvider GetInputType(name string) InputType Register(name string, atype InputType) DecodeInputSpec(data []byte, unmarshaler runtime.Unmarshaler) (InputSpec, error) CreateInputSpec(obj runtime.TypedObject) (InputSpec, error) }
func For ¶
func For(ctx datacontext.Context) InputTypeScheme
func NewInputTypeScheme ¶
func NewInputTypeScheme(defaultRepoDecoder runtime.TypedObjectDecoder) InputTypeScheme
type UnknownInputSpec ¶
type UnknownInputSpec struct {
runtime.UnstructuredVersionedTypedObject `json:",inline"`
}
func (*UnknownInputSpec) GetBlob ¶
func (r *UnknownInputSpec) GetBlob(ctx Context, nv common.NameVersion, inputFilePath string) (accessio.TemporaryBlobAccess, string, error)
Click to show internal directories.
Click to hide internal directories.