s3

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

README

s3 - Blobs in a Simple Storage System (S3)

Synopsis
type: s3/v1

Provided blobs use the following media type: attribute mediaType

Description

This method implements the access of a blob stored in an S3 bucket.

Specification Versions

Supported specification version is v1

Version v1

The type specific specification fields are:

  • region (optional) string

    OCI repository reference (this artifact name used to store the blob).

  • bucket string

    The name of the S3 bucket containing the blob

  • key string

    The key of the desired blob

Documentation

Index

Constants

View Source
const (
	Type = "s3"

	LegacyType   = "S3"
	LegacyTypeV1 = LegacyType + runtime.VersionSeparator + "v1"
)

Type is the access type of S3 registry.

View Source
const LegacyTypeV2 = LegacyType + runtime.VersionSeparator + "v2"
View Source
const TypeV1 = Type + runtime.VersionSeparator + "v1"
View Source
const TypeV2 = Type + runtime.VersionSeparator + "v2"

Variables

This section is empty.

Functions

func AddConfig

func AddConfig(opts flagsets.ConfigOptions, config flagsets.Config) error

Types

type AccessSpec

type AccessSpec struct {
	runtime.InternalVersionedTypedObject[accspeccpi.AccessSpec]

	// Region needs to be set even though buckets are global.
	// We can't assume that there is a default region setting sitting somewhere.
	// +optional
	Region string
	// Bucket where the s3 object is located.
	Bucket string
	// Key of the object to look for. This value will be used together with Bucket and Version to form an identity.
	Key string
	// Version of the object.
	// +optional
	Version string
	// MediaType defines the mime type of the object to download.
	// +optional
	MediaType string
	// contains filtered or unexported fields
}

AccessSpec describes the access for a S3 registry.

func New

func New(region, bucket, key, version, mediaType string, downloader ...downloader.Downloader) *AccessSpec

New creates a new GitHub registry access spec version v1.

func (*AccessSpec) AccessMethod

func (*AccessSpec) Describe

func (a *AccessSpec) Describe(ctx accspeccpi.Context) string

func (*AccessSpec) GlobalAccessSpec added in v0.3.0

func (a *AccessSpec) GlobalAccessSpec(ctx accspeccpi.Context) accspeccpi.AccessSpec

func (*AccessSpec) IsLocal

func (_ *AccessSpec) IsLocal(accspeccpi.Context) bool

func (AccessSpec) MarshalJSON added in v0.3.0

func (a AccessSpec) MarshalJSON() ([]byte, error)

type AccessSpecV1 added in v0.3.0

type AccessSpecV1 struct {
	runtime.ObjectVersionedType `json:",inline"`

	// Region needs to be set even though buckets are global.
	// We can't assume that there is a default region setting sitting somewhere.
	// +optional
	Region string `json:"region,omitempty"`
	// Bucket where the s3 object is located.
	Bucket string `json:"bucket"`
	// Key of the object to look for. This value will be used together with Bucket and Version to form an identity.
	Key string `json:"key"`
	// Version of the object.
	// +optional
	Version string `json:"version,omitempty"`
	// MediaType defines the mime type of the object to download.
	// +optional
	MediaType string `json:"mediaType,omitempty"`
}

AccessSpecV1 describes the v1 format.

type AccessSpecV2 added in v0.3.0

type AccessSpecV2 struct {
	runtime.ObjectVersionedType `json:",inline"`

	// Region needs to be set even though buckets are global.
	// We can't assume that there is a default region setting sitting somewhere.
	// +optional
	Region string `json:"region,omitempty"`
	// Bucket where the s3 object is located.
	Bucket string `json:"bucketName"`
	// Key of the object to look for. This value will be used together with Bucket and Version to form an identity.
	Key string `json:"objectKey"`
	// Version of the object.
	// +optional
	Version string `json:"version,omitempty"`
	// MediaType defines the mime type of the object to download.
	// +optional
	MediaType string `json:"mediaType,omitempty"`
}

AccessSpecV2 describes the v2 format.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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