Documentation
¶
Index ¶
- type Artefact
- type ArtefactBlobs
- type ArtefactKey
- type ArtefactRepository
- type Metadata
- type OCIArtefactService
- func (s *OCIArtefactService) Download(ctx context.Context, dg sha256.SHA256) (io.ReadCloser, error)
- func (s *OCIArtefactService) GetDigestsKeys(ctx context.Context, digests []sha256.SHA256) (keys []ArtefactKey, missing []sha256.SHA256, err error)
- func (s *OCIArtefactService) Upload(ctx context.Context, artefact Artefact) (sha256.SHA256, error)
- type RegistryConfig
- type ReleaseArtefact
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArtefactKey ¶
type ArtefactRepository ¶
type OCIArtefactService ¶
type OCIArtefactService struct {
// contains filtered or unexported fields
}
func NewForTesting ¶
func NewForTesting() *OCIArtefactService
func NewOCIRegistryStorage ¶
func NewOCIRegistryStorage(config RegistryConfig) (*OCIArtefactService, error)
func (*OCIArtefactService) Download ¶
func (s *OCIArtefactService) Download(ctx context.Context, dg sha256.SHA256) (io.ReadCloser, error)
func (*OCIArtefactService) GetDigestsKeys ¶
func (s *OCIArtefactService) GetDigestsKeys(ctx context.Context, digests []sha256.SHA256) (keys []ArtefactKey, missing []sha256.SHA256, err error)
type RegistryConfig ¶
type RegistryConfig struct {
Registry string `help:"OCI container registry, in the form host[:port]/repository" env:"FTL_ARTEFACT_REGISTRY" required:""`
Username string `help:"OCI container registry username" env:"FTL_ARTEFACT_REGISTRY_USERNAME"`
Password string `help:"OCI container registry password" env:"FTL_ARTEFACT_REGISTRY_PASSWORD"`
AllowInsecure bool `help:"Allows the use of insecure HTTP based registries." env:"FTL_ARTEFACT_REGISTRY_ALLOW_INSECURE"`
}
type ReleaseArtefact ¶
type ReleaseArtefact struct {
Artefact ArtefactKey
Path string
Executable bool
}
type Service ¶
type Service interface {
// GetDigestsKeys locates the `digests` corresponding `ArtefactKey`s and identifies the missing ones
GetDigestsKeys(ctx context.Context, digests []sha256.SHA256) (keys []ArtefactKey, missing []sha256.SHA256, err error)
// Upload pushes the specified media, and metadata, to the registry and returns the computed digest
Upload(context context.Context, artefact Artefact) (sha256.SHA256, error)
// Download performs a streaming download of the artefact identified by the supplied digest
Download(context context.Context, digest sha256.SHA256) (io.ReadCloser, error)
}
Click to show internal directories.
Click to hide internal directories.