service

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ref

type Ref struct {
	Server     string
	Owner      string
	Repository string
	Ref        string
}

type RefMetadata

type RefMetadata struct {
	Name  string
	Value string
}

type RefMetadataService

type RefMetadataService struct {
	Metadata []RefMetadata
}

func (RefMetadataService) GetMetadata

func (rmf RefMetadataService) GetMetadata() []RefMetadata

type RefResolver

type RefResolver interface {
	ResolveRef(ctx context.Context, ref Ref) (ResolvedRef, error)
}

type ResolvedRef

type ResolvedRef interface {
	ResourceResolver

	GetMetadata() []RefMetadata
}

type ResolvedResource

type ResolvedResource interface {
	GetName() string
	GetSize() int64
	// GetLocation(ctx context.Context) (string, error)
	Open(ctx context.Context) (io.ReadCloser, error)
}

type Resource

type Resource string

type ResourceResolver

type ResourceResolver interface {
	ResolveResource(ctx context.Context, resourceType ResourceType, resource Resource) ([]ResolvedResource, error)
}

type ResourceType

type ResourceType string
const ArchiveResourceType ResourceType = "archive"

ArchiveResourceType is a tar/zip export of the repository from the ref.

const AssetResourceType ResourceType = "asset"

AssetResourceType is a user-provided file associated with the ref.

const BlobResourceType ResourceType = "blob"

BlobResourceType is a blob of the repository at the ref.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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