Documentation ¶
Index ¶
- Constants
- type AzureStorage
- func (s *AzureStorage) GetMirroredProvider(ctx context.Context, provider *core.Provider) (*core.Provider, error)
- func (s *AzureStorage) GetModule(ctx context.Context, namespace, name, provider, version string) (core.Module, error)
- func (s *AzureStorage) GetProvider(ctx context.Context, namespace, name, version, os, arch string) (*core.Provider, error)
- func (s *AzureStorage) ListMirroredProviders(ctx context.Context, provider *core.Provider) ([]*core.Provider, error)
- func (s *AzureStorage) ListModuleVersions(ctx context.Context, namespace, name, provider string) ([]core.Module, error)
- func (s *AzureStorage) ListProviderVersions(ctx context.Context, namespace, name string) (*core.ProviderVersions, error)
- func (s *AzureStorage) MirroredSha256Sum(ctx context.Context, provider *core.Provider) (*core.Sha256Sums, error)
- func (s *AzureStorage) MirroredSigningKeys(ctx context.Context, hostname, namespace string) (*core.SigningKeys, error)
- func (s *AzureStorage) SigningKeys(ctx context.Context, namespace string) (*core.SigningKeys, error)
- func (s *AzureStorage) UploadMirroredFile(ctx context.Context, provider *core.Provider, fileName string, ...) error
- func (s *AzureStorage) UploadMirroredSigningKeys(ctx context.Context, hostname, namespace string, signingKeys *core.SigningKeys) error
- func (s *AzureStorage) UploadModule(ctx context.Context, namespace, name, provider, version string, body io.Reader) (core.Module, error)
- func (s *AzureStorage) UploadProviderReleaseFiles(ctx context.Context, namespace, name, filename string, file io.Reader) error
- type AzureStorageOption
- type Collection
- type GCSStorage
- func (s *GCSStorage) GetMirroredProvider(ctx context.Context, provider *core.Provider) (*core.Provider, error)
- func (s *GCSStorage) GetModule(ctx context.Context, namespace, name, provider, version string) (core.Module, error)
- func (s *GCSStorage) GetProvider(ctx context.Context, namespace, name, version, os, arch string) (*core.Provider, error)
- func (s *GCSStorage) ListMirroredProviders(ctx context.Context, provider *core.Provider) ([]*core.Provider, error)
- func (s *GCSStorage) ListModuleVersions(ctx context.Context, namespace, name, provider string) ([]core.Module, error)
- func (s *GCSStorage) ListProviderVersions(ctx context.Context, namespace, name string) (*core.ProviderVersions, error)
- func (s *GCSStorage) MirroredSha256Sum(ctx context.Context, provider *core.Provider) (*core.Sha256Sums, error)
- func (s *GCSStorage) MirroredSigningKeys(ctx context.Context, hostname, namespace string) (*core.SigningKeys, error)
- func (s *GCSStorage) SigningKeys(ctx context.Context, namespace string) (*core.SigningKeys, error)
- func (s *GCSStorage) UploadMirroredFile(ctx context.Context, provider *core.Provider, fileName string, ...) error
- func (s *GCSStorage) UploadMirroredSigningKeys(ctx context.Context, hostname, namespace string, signingKeys *core.SigningKeys) error
- func (s *GCSStorage) UploadModule(ctx context.Context, namespace, name, provider, version string, body io.Reader) (core.Module, error)
- func (s *GCSStorage) UploadProviderReleaseFiles(ctx context.Context, namespace, name, filename string, file io.Reader) error
- type GCSStorageOption
- type S3Storage
- func (s *S3Storage) GetMirroredProvider(ctx context.Context, provider *core.Provider) (*core.Provider, error)
- func (s *S3Storage) GetModule(ctx context.Context, namespace, name, provider, version string) (core.Module, error)
- func (s *S3Storage) GetProvider(ctx context.Context, namespace, name, version, os, arch string) (*core.Provider, error)
- func (s *S3Storage) ListMirroredProviders(ctx context.Context, provider *core.Provider) ([]*core.Provider, error)
- func (s *S3Storage) ListModuleVersions(ctx context.Context, namespace, name, provider string) ([]core.Module, error)
- func (s *S3Storage) ListProviderVersions(ctx context.Context, namespace, name string) (*core.ProviderVersions, error)
- func (s *S3Storage) MirroredSha256Sum(ctx context.Context, provider *core.Provider) (*core.Sha256Sums, error)
- func (s *S3Storage) MirroredSigningKeys(ctx context.Context, hostname, namespace string) (*core.SigningKeys, error)
- func (s *S3Storage) SigningKeys(ctx context.Context, namespace string) (*core.SigningKeys, error)
- func (s *S3Storage) UploadMirroredFile(ctx context.Context, provider *core.Provider, fileName string, ...) error
- func (s *S3Storage) UploadMirroredSigningKeys(ctx context.Context, hostname, namespace string, signingKeys *core.SigningKeys) error
- func (s *S3Storage) UploadModule(ctx context.Context, namespace, name, provider, version string, body io.Reader) (core.Module, error)
- func (s *S3Storage) UploadProviderReleaseFiles(ctx context.Context, namespace, name, filename string, file io.Reader) error
- type S3StorageOption
- func WithS3ArchiveFormat(archiveFormat string) S3StorageOption
- func WithS3StorageBucketEndpoint(endpoint string) S3StorageOption
- func WithS3StorageBucketPrefix(prefix string) S3StorageOption
- func WithS3StorageBucketRegion(region string) S3StorageOption
- func WithS3StoragePathStyle(forcePathStyle bool) S3StorageOption
- func WithS3StorageSignedUrlExpiry(t time.Duration) S3StorageOption
- type Storage
Constants ¶
const (
DefaultModuleArchiveFormat = "tar.gz"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AzureStorage ¶ added in v0.14.0
type AzureStorage struct {
// contains filtered or unexported fields
}
AzureStorage is a Storage implementation backed by Azure Blob Storage. AzureStorage implements module.Storage, provider.Storage, and mirror.Storage
func (*AzureStorage) GetMirroredProvider ¶ added in v0.14.0
func (*AzureStorage) GetModule ¶ added in v0.14.0
func (s *AzureStorage) GetModule(ctx context.Context, namespace, name, provider, version string) (core.Module, error)
GetModule retrieves information about a module from the Azure Storage.
func (*AzureStorage) GetProvider ¶ added in v0.14.0
func (*AzureStorage) ListMirroredProviders ¶ added in v0.14.0
func (*AzureStorage) ListModuleVersions ¶ added in v0.14.0
func (*AzureStorage) ListProviderVersions ¶ added in v0.14.0
func (s *AzureStorage) ListProviderVersions(ctx context.Context, namespace, name string) (*core.ProviderVersions, error)
func (*AzureStorage) MirroredSha256Sum ¶ added in v0.14.0
func (s *AzureStorage) MirroredSha256Sum(ctx context.Context, provider *core.Provider) (*core.Sha256Sums, error)
func (*AzureStorage) MirroredSigningKeys ¶ added in v0.14.0
func (s *AzureStorage) MirroredSigningKeys(ctx context.Context, hostname, namespace string) (*core.SigningKeys, error)
func (*AzureStorage) SigningKeys ¶ added in v0.14.0
func (s *AzureStorage) SigningKeys(ctx context.Context, namespace string) (*core.SigningKeys, error)
SigningKeys downloads the JSON placed in the namespace in Azure Blob Storage and unmarshals it into a core.SigningKeys
func (*AzureStorage) UploadMirroredFile ¶ added in v0.14.0
func (*AzureStorage) UploadMirroredSigningKeys ¶ added in v0.14.0
func (s *AzureStorage) UploadMirroredSigningKeys(ctx context.Context, hostname, namespace string, signingKeys *core.SigningKeys) error
func (*AzureStorage) UploadModule ¶ added in v0.14.0
func (*AzureStorage) UploadProviderReleaseFiles ¶ added in v0.14.0
type AzureStorageOption ¶ added in v0.14.0
type AzureStorageOption func(*AzureStorage)
AzureStorageOption provides additional options for the AzureStorage.
func WithAzureStorageArchiveFormat ¶ added in v0.14.0
func WithAzureStorageArchiveFormat(archiveFormat string) AzureStorageOption
WithAzureStorageArchiveFormat configures the module archive format (zip, tar, tgz, etc.)
func WithAzureStoragePrefix ¶ added in v0.14.0
func WithAzureStoragePrefix(prefix string) AzureStorageOption
WithAzureStoragePrefix configures the azure storage to work under a given prefix.
func WithAzureStorageSignedUrlExpiry ¶ added in v0.14.0
func WithAzureStorageSignedUrlExpiry(t time.Duration) AzureStorageOption
WithAzureStorageSignedUrlExpiry configures the duration until the signed url expires
type Collection ¶
type Collection struct {
// contains filtered or unexported fields
}
func NewCollection ¶
func NewCollection() *Collection
func (*Collection) Add ¶
func (s *Collection) Add(provider *core.Provider)
func (*Collection) List ¶
func (s *Collection) List() *core.ProviderVersions
type GCSStorage ¶
type GCSStorage struct {
// contains filtered or unexported fields
}
GCSStorage is a Storage implementation backed by GCS. GCSStorage implements module.Storage, provider.Storage, and mirror.Storage
func NewGCSStorage ¶
func NewGCSStorage(bucket string, options ...GCSStorageOption) (*GCSStorage, error)
func (*GCSStorage) GetMirroredProvider ¶
func (*GCSStorage) GetProvider ¶
func (*GCSStorage) ListMirroredProviders ¶
func (*GCSStorage) ListModuleVersions ¶
func (*GCSStorage) ListProviderVersions ¶
func (s *GCSStorage) ListProviderVersions(ctx context.Context, namespace, name string) (*core.ProviderVersions, error)
func (*GCSStorage) MirroredSha256Sum ¶
func (s *GCSStorage) MirroredSha256Sum(ctx context.Context, provider *core.Provider) (*core.Sha256Sums, error)
func (*GCSStorage) MirroredSigningKeys ¶
func (s *GCSStorage) MirroredSigningKeys(ctx context.Context, hostname, namespace string) (*core.SigningKeys, error)
func (*GCSStorage) SigningKeys ¶
func (s *GCSStorage) SigningKeys(ctx context.Context, namespace string) (*core.SigningKeys, error)
SigningKeys downloads the JSON placed in the namespace in GCS and unmarshals it into a core.SigningKeys
func (*GCSStorage) UploadMirroredFile ¶
func (*GCSStorage) UploadMirroredSigningKeys ¶
func (s *GCSStorage) UploadMirroredSigningKeys(ctx context.Context, hostname, namespace string, signingKeys *core.SigningKeys) error
func (*GCSStorage) UploadModule ¶
func (*GCSStorage) UploadProviderReleaseFiles ¶
type GCSStorageOption ¶
type GCSStorageOption func(*GCSStorage)
GCSStorageOption provides additional options for the GCSStorage.
func WithGCSArchiveFormat ¶
func WithGCSArchiveFormat(archiveFormat string) GCSStorageOption
WithGCSArchiveFormat configures the module archive format (zip, tar, tgz, etc.)
func WithGCSServiceAccount ¶
func WithGCSServiceAccount(sa string) GCSStorageOption
WithGCSServiceAccount configures Application Default Credentials (ADC) service account email.
func WithGCSSignedUrlExpiry ¶
func WithGCSSignedUrlExpiry(t time.Duration) GCSStorageOption
WithGCSSignedUrlExpiry configures the duration until the signed url expires
func WithGCSStorageBucketPrefix ¶
func WithGCSStorageBucketPrefix(prefix string) GCSStorageOption
WithGCSStorageBucketPrefix configures the s3 storage to work under a given prefix.
type S3Storage ¶
type S3Storage struct {
// contains filtered or unexported fields
}
S3Storage is a Storage implementation backed by S3. S3Storage implements module.Storage, provider.Storage, and mirror.Storage
func (*S3Storage) GetMirroredProvider ¶
func (*S3Storage) GetModule ¶
func (s *S3Storage) GetModule(ctx context.Context, namespace, name, provider, version string) (core.Module, error)
GetModule retrieves information about a module from the S3 storage.
func (*S3Storage) GetProvider ¶
func (*S3Storage) ListMirroredProviders ¶
func (*S3Storage) ListModuleVersions ¶
func (*S3Storage) ListProviderVersions ¶
func (*S3Storage) MirroredSha256Sum ¶
func (*S3Storage) MirroredSigningKeys ¶
func (*S3Storage) SigningKeys ¶
SigningKeys downloads the JSON placed in the namespace in S3 and unmarshals it into a core.SigningKeys
func (*S3Storage) UploadMirroredFile ¶
func (*S3Storage) UploadMirroredSigningKeys ¶
type S3StorageOption ¶
type S3StorageOption func(*S3Storage)
S3StorageOption provides additional options for the S3Storage.
func WithS3ArchiveFormat ¶
func WithS3ArchiveFormat(archiveFormat string) S3StorageOption
WithS3ArchiveFormat configures the module archive format (zip, tar, tgz, etc.)
func WithS3StorageBucketEndpoint ¶
func WithS3StorageBucketEndpoint(endpoint string) S3StorageOption
WithS3StorageBucketEndpoint configures the endpoint for a given s3 storage. (needed for MINIO)
func WithS3StorageBucketPrefix ¶
func WithS3StorageBucketPrefix(prefix string) S3StorageOption
WithS3StorageBucketPrefix configures the s3 storage to work under a given prefix.
func WithS3StorageBucketRegion ¶
func WithS3StorageBucketRegion(region string) S3StorageOption
WithS3StorageBucketRegion configures the region for a given s3 storage. TODO: the AWS signing region could be another one as the bucket location
func WithS3StoragePathStyle ¶
func WithS3StoragePathStyle(forcePathStyle bool) S3StorageOption
WithS3StoragePathStyle configures if Path Style is used for a given s3 storage. (needed for MINIO)
func WithS3StorageSignedUrlExpiry ¶
func WithS3StorageSignedUrlExpiry(t time.Duration) S3StorageOption
WithS3StorageSignedUrlExpiry configures the duration until the signed url expires
type Storage ¶
func NewAzureStorage ¶ added in v0.14.0
func NewAzureStorage(account string, container string, options ...AzureStorageOption) (Storage, error)
NewAzureStorage returns a fully initialized Azure Storage.
func NewS3Storage ¶
NewS3Storage returns a fully initialized S3 storage.