internal

package
v0.1.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KIND_PLUGIN       = "plugin"
	KIND_DOWNLOADER   = "downloader"
	KIND_UPLOADER     = "uploader"
	KIND_ACCESSMETHOD = errors.KIND_ACCESSMETHOD
)
View Source
const VERSION = "v1"

Variables

View Source
var TAG = logging.NewTag("plugins")

Functions

This section is empty.

Types

type AccessMethodDescriptor

type AccessMethodDescriptor struct {
	Name        string      `json:"name"`
	Version     string      `json:"version,omitempty"`
	Description string      `json:"description"`
	Format      string      `json:"format"`
	CLIOptions  []CLIOption `json:"options"`
}

type AccessSpecInfo

type AccessSpecInfo struct {
	Short      string
	MediaType  string
	Hint       string
	ConsumerId credentials.ConsumerIdentity
}

type ArtefactContext

type ArtefactContext struct {
	ArtifactType string `json:"artifactType"`
	MediaType    string `json:"mediaType"`
}

func (ArtefactContext) GetArtefactType

func (k ArtefactContext) GetArtefactType() string

func (ArtefactContext) GetMediaType

func (k ArtefactContext) GetMediaType() string

func (ArtefactContext) IsValid

func (k ArtefactContext) IsValid() bool

func (ArtefactContext) SetArtefact

func (k ArtefactContext) SetArtefact(arttype, mediatype string) ArtefactContext

func (ArtefactContext) String

func (k ArtefactContext) String() string

type CLIOption

type CLIOption struct {
	Name        string `json:"name"`
	Type        string `json:"type,omitempty"`
	Description string `json:"description,omitempty"`
}

type Descriptor

type Descriptor struct {
	Version       string `json:"version,omitempty"`
	PluginName    string `json:"pluginName"`
	PluginVersion string `json:"pluginVersion"`
	Short         string `json:"shortDescription"`
	Long          string `json:"description"`

	AccessMethods []AccessMethodDescriptor   `json:"accessMethods,omitempty"`
	Uploaders     List[UploaderDescriptor]   `json:"uploaders,omitempty"`
	Downloaders   List[DownloaderDescriptor] `json:"downloaders,omitempty"`
}

type DownloaderDescriptor

type DownloaderDescriptor struct {
	Name        string          `json:"name"`
	Description string          `json:"description"`
	Constraints []DownloaderKey `json:"constraints"`
}

func (DownloaderDescriptor) GetConstraints

func (d DownloaderDescriptor) GetConstraints() []DownloaderKey

func (DownloaderDescriptor) GetName

func (d DownloaderDescriptor) GetName() string

type DownloaderKey

type DownloaderKey = ArtefactContext

func NewDownloaderKey

func NewDownloaderKey(arttype, mediatype string) DownloaderKey

type Element

type Element[K registry.Key[K]] interface {
	Named
	GetConstraints() []K
}

type List

type List[T Named] []T

func (List[T]) Get

func (l List[T]) Get(name string) *T

type Named

type Named interface {
	GetName() string
}

type RepositoryContext

type RepositoryContext struct {
	ContextType    string `json:"contextType"`
	RepositoryType string `json:"repositoryType"`
}

func (RepositoryContext) HasRepo

func (k RepositoryContext) HasRepo() bool

func (RepositoryContext) IsValid

func (k RepositoryContext) IsValid() bool

func (RepositoryContext) String

func (k RepositoryContext) String() string

type UploadTargetSpecInfo

type UploadTargetSpecInfo struct {
	ConsumerId credentials.ConsumerIdentity
}

type UploaderDescriptor

type UploaderDescriptor struct {
	Name        string        `json:"name"`
	Description string        `json:"description"`
	Constraints []UploaderKey `json:"constraints"`
}

func (UploaderDescriptor) GetConstraints

func (d UploaderDescriptor) GetConstraints() []UploaderKey

func (UploaderDescriptor) GetName

func (d UploaderDescriptor) GetName() string

type UploaderKey

type UploaderKey struct {
	RepositoryContext `json:",inline"`
	ArtefactContext   `json:",inline"`
}

func (UploaderKey) IsValid

func (k UploaderKey) IsValid() bool

func (UploaderKey) SetArtefact

func (k UploaderKey) SetArtefact(arttype, mediatype string) UploaderKey

func (UploaderKey) SetRepo

func (k UploaderKey) SetRepo(contexttype, repotype string) UploaderKey

func (UploaderKey) String

func (k UploaderKey) String() string

Jump to

Keyboard shortcuts

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