Documentation ¶
Overview ¶
Package providermirror implements the Terraform's Provider Network Mirror Protocol.
Index ¶
- type CreateProviderVersionMirrorInput
- type DeleteProviderPlatformMirrorInput
- type DeleteProviderVersionMirrorInput
- type GetAvailableInstallationPackagesInput
- type GetAvailableProviderVersionsInput
- type GetProviderPlatformMirrorsInput
- type GetProviderVersionMirrorByAddressInput
- type GetProviderVersionMirrorsInput
- type MockTerraformProviderMirrorStore
- type Service
- type TerraformProviderMirrorStore
- type UploadInstallationPackageInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateProviderVersionMirrorInput ¶
type CreateProviderVersionMirrorInput struct { Type string RegistryNamespace string RegistryHostname string SemanticVersion string GroupPath string }
CreateProviderVersionMirrorInput is the input for CreateProviderVersionMirror.
type DeleteProviderPlatformMirrorInput ¶
type DeleteProviderPlatformMirrorInput struct {
PlatformMirror *models.TerraformProviderPlatformMirror
}
DeleteProviderPlatformMirrorInput is the input for DeleteProviderPlatformMirror.
type DeleteProviderVersionMirrorInput ¶
type DeleteProviderVersionMirrorInput struct { VersionMirror *models.TerraformProviderVersionMirror Force bool }
DeleteProviderVersionMirrorInput is the input for DeleteTerraformProviderVersionMirror.
type GetAvailableInstallationPackagesInput ¶
type GetAvailableInstallationPackagesInput struct { Type string RegistryNamespace string RegistryHostname string SemanticVersion string GroupPath string }
GetAvailableInstallationPackagesInput represents the input for GetAvailableInstallationPackages.
type GetAvailableProviderVersionsInput ¶
type GetAvailableProviderVersionsInput struct { Type string RegistryNamespace string RegistryHostname string GroupPath string }
GetAvailableProviderVersionsInput represents the input for GetAvailableProviderVersions.
type GetProviderPlatformMirrorsInput ¶
type GetProviderPlatformMirrorsInput struct { // Sort specifies the field to sort on and direction Sort *db.TerraformProviderPlatformMirrorSortableField // PaginationOptions supports cursor based pagination PaginationOptions *pagination.Options // OS is the OS to filter on. OS *string // Architecture is the architecture to filter on. Architecture *string // VersionMirrorID is the ID of the version mirror to filter on. Always required. VersionMirrorID string }
GetProviderPlatformMirrorsInput is the input listing provider platform mirrors.
type GetProviderVersionMirrorByAddressInput ¶
type GetProviderVersionMirrorByAddressInput struct { RegistryHostname string RegistryNamespace string Type string SemanticVersion string GroupPath string }
GetProviderVersionMirrorByAddressInput is the input for GetProviderVersionMirrorByAddress.
type GetProviderVersionMirrorsInput ¶
type GetProviderVersionMirrorsInput struct { // Sort specifies the field to sort on and direction Sort *db.TerraformProviderVersionMirrorSortableField // PaginationOptions supports cursor based pagination PaginationOptions *pagination.Options // NamespacePath is the namespace to return provider version mirrors for. NamespacePath string // IncludeInherited includes inherited provider version mirrors in the result. IncludeInherited bool }
GetProviderVersionMirrorsInput is the input for listing TerraformProviderVersionMirrors.
type MockTerraformProviderMirrorStore ¶
MockTerraformProviderMirrorStore is an autogenerated mock type for the TerraformProviderMirrorStore type
func NewMockTerraformProviderMirrorStore ¶
func NewMockTerraformProviderMirrorStore(t mockConstructorTestingTNewMockTerraformProviderMirrorStore) *MockTerraformProviderMirrorStore
NewMockTerraformProviderMirrorStore creates a new instance of MockTerraformProviderMirrorStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MockTerraformProviderMirrorStore) GetProviderPlatformPackagePresignedURL ¶
func (_m *MockTerraformProviderMirrorStore) GetProviderPlatformPackagePresignedURL(ctx context.Context, checksum []byte) (string, error)
GetProviderPlatformPackagePresignedURL provides a mock function with given fields: ctx, checksum
func (*MockTerraformProviderMirrorStore) UploadProviderPlatformPackage ¶
func (_m *MockTerraformProviderMirrorStore) UploadProviderPlatformPackage(ctx context.Context, checksum []byte, body io.Reader) error
UploadProviderPlatformPackage provides a mock function with given fields: ctx, checksum, body
type Service ¶
type Service interface { GetProviderVersionMirrorByID(ctx context.Context, id string) (*models.TerraformProviderVersionMirror, error) GetProviderVersionMirrorByAddress(ctx context.Context, input *GetProviderVersionMirrorByAddressInput) (*models.TerraformProviderVersionMirror, error) GetProviderVersionMirrorsByIDs(ctx context.Context, idList []string) ([]models.TerraformProviderVersionMirror, error) GetProviderVersionMirrors(ctx context.Context, input *GetProviderVersionMirrorsInput) (*db.ProviderVersionMirrorsResult, error) CreateProviderVersionMirror(ctx context.Context, input *CreateProviderVersionMirrorInput) (*models.TerraformProviderVersionMirror, error) DeleteProviderVersionMirror(ctx context.Context, input *DeleteProviderVersionMirrorInput) error GetProviderPlatformMirrorByID(ctx context.Context, id string) (*models.TerraformProviderPlatformMirror, error) GetProviderPlatformMirrors(ctx context.Context, input *GetProviderPlatformMirrorsInput) (*db.ProviderPlatformMirrorsResult, error) DeleteProviderPlatformMirror(ctx context.Context, input *DeleteProviderPlatformMirrorInput) error UploadInstallationPackage(ctx context.Context, input *UploadInstallationPackageInput) error GetAvailableProviderVersions(ctx context.Context, input *GetAvailableProviderVersionsInput) (map[string]struct{}, error) GetAvailableInstallationPackages(ctx context.Context, input *GetAvailableInstallationPackagesInput) (map[string]any, error) }
Service implements all the Terraform provider mirror functionality.
func NewService ¶
func NewService( logger logger.Logger, dbClient *db.Client, httpClient *http.Client, limitChecker limits.LimitChecker, activityService activityevent.Service, mirrorStore TerraformProviderMirrorStore, ) Service
NewService creates a new Service.
type TerraformProviderMirrorStore ¶
type TerraformProviderMirrorStore interface { GetProviderPlatformPackagePresignedURL(ctx context.Context, checksum []byte) (string, error) UploadProviderPlatformPackage(ctx context.Context, checksum []byte, body io.Reader) error }
TerraformProviderMirrorStore is the interface for the terraform provider mirror store
func NewProviderMirrorStore ¶
func NewProviderMirrorStore(objectStore objectstore.ObjectStore) TerraformProviderMirrorStore
NewProviderMirrorStore creates an instance of the TerraformProviderMirrorStore interface