Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Provider errors ErrProviderNotFound = errors.New("failed to locate provider") )
Functions ¶
func ErrorEncoder ¶
func ErrorEncoder(_ context.Context, err error, w http.ResponseWriter)
ErrorEncoder translates domain specific errors to HTTP status codes
func MakeHandler ¶
func MakeHandler(svc Service, auth endpoint.Middleware, metrics *o11y.ProviderMetrics, instrumentation o11y.Middleware, options ...httptransport.ServerOption) http.Handler
MakeHandler returns a fully initialized http.Handler.
Types ¶
type Middleware ¶
Middleware is a Service middleware.
func LoggingMiddleware ¶
func LoggingMiddleware() Middleware
LoggingMiddleware is a logging Service middleware.
type Service ¶
type Service interface { GetProvider(ctx context.Context, namespace, name, version, os, arch string) (*core.Provider, error) ListProviderVersions(ctx context.Context, namespace, name string) (*core.ProviderVersions, error) }
Service implements the Provider Registry Protocol. For more information see: https://www.terraform.io/docs/internals/provider-registry-protocol.html.
func NewService ¶
NewService returns a fully initialized Service.
type Storage ¶
type Storage interface { GetProvider(ctx context.Context, namespace, name, version, os, arch string) (*core.Provider, error) ListProviderVersions(ctx context.Context, namespace, name string) (*core.ProviderVersions, error) // UploadProviderReleaseFiles is used to upload all artifacts which make up a provider release // https://developer.hashicorp.com/terraform/registry/providers/publishing#manually-preparing-a-release UploadProviderReleaseFiles(ctx context.Context, namespace, name, filename string, file io.Reader) error // SigningKeys downloads and returns the keys for a given namespace from the configured storage backend SigningKeys(ctx context.Context, namespace string) (*core.SigningKeys, error) }
Storage represents the Storage of Terraform providers.
Click to show internal directories.
Click to hide internal directories.