Documentation ¶
Overview ¶
Package module is reponsible for registry modules
Index ¶
- Constants
- Variables
- func NewService(opts Options) *service
- type CreateModuleVersionOptions
- type CreateOptions
- type GetModuleOptions
- type ListModulesOptions
- type Module
- type ModuleList
- type ModuleService
- type ModuleStatus
- type ModuleVersion
- type ModuleVersionStatus
- type Options
- type PublishOptions
- type PublishVersionOptions
- type Publisher
- type Repo
- type Service
- type TerraformModule
- type UpdateModuleVersionStatusOptions
Constants ¶
View Source
const ( ModuleStatusPending ModuleStatus = "pending" ModuleStatusNoVersionTags ModuleStatus = "no_version_tags" ModuleStatusSetupFailed ModuleStatus = "setup_failed" ModuleStatusSetupComplete ModuleStatus = "setup_complete" ModuleVersionStatusPending ModuleVersionStatus = "pending" ModuleVersionStatusCloning ModuleVersionStatus = "cloning" ModuleVersionStatusCloneFailed ModuleVersionStatus = "clone_failed" ModuleVersionStatusRegIngressReqFailed ModuleVersionStatus = "reg_ingress_req_failed" ModuleVersionStatusRegIngressing ModuleVersionStatus = "reg_ingressing" ModuleVersionStatusRegIngressFailed ModuleVersionStatus = "reg_ingress_failed" ModuleVersionStatusOK ModuleVersionStatus = "ok" )
Variables ¶
View Source
var ErrInvalidModuleRepo = errors.New("invalid repository name for module")
Functions ¶
func NewService ¶
func NewService(opts Options) *service
Types ¶
type CreateOptions ¶
type GetModuleOptions ¶
type ListModulesOptions ¶
type ListModulesOptions struct {
Organization string `schema:"organization_name,required"` // filter by organization name
}
type Module ¶
type Module struct { ID string CreatedAt time.Time UpdatedAt time.Time Name string Provider string Organization string // Module belongs to an organization Status ModuleStatus Versions []ModuleVersion // versions sorted in descending order Connection *repo.Connection // optional vcs repo connection }
func NewModule ¶
func NewModule(opts CreateOptions) *Module
func (*Module) AvailableVersions ¶
func (m *Module) AvailableVersions() (avail []ModuleVersion)
func (*Module) Latest ¶
func (m *Module) Latest() *ModuleVersion
Latest retrieves the latest version, which is the greatest version with an ok status. If there is such version, nil is returned.
func (*Module) Version ¶
func (m *Module) Version(v string) *ModuleVersion
type ModuleList ¶
type ModuleList struct { *internal.Pagination Items []*Module }
type ModuleService ¶
type ModuleService = Service
type ModuleStatus ¶
type ModuleStatus string
type ModuleVersion ¶
type ModuleVersion struct { ID string ModuleID string Version string CreatedAt time.Time UpdatedAt time.Time Status ModuleVersionStatus StatusError string }
func NewModuleVersion ¶
func NewModuleVersion(opts CreateModuleVersionOptions) *ModuleVersion
type ModuleVersionStatus ¶
type ModuleVersionStatus string
type Options ¶
type Options struct { logr.Logger internal.DB internal.HostnameService vcsprovider.VCSProviderService *surl.Signer html.Renderer repo.RepoService }
type PublishOptions ¶
type PublishVersionOptions ¶
type Publisher ¶
type Publisher struct { logr.Logger pubsub.Subscriber vcsprovider.VCSProviderService ModuleService }
Publisher publishes new versions of terraform modules from VCS tags
type Repo ¶
type Repo string
Repo is the path of repository for a module. It is expected to follow a certain format, which varies according to the cloud providing the Repo, but it should always end with '/<identifier>-<name>-<provider>', with name and provider being used to set the name and provider of the module.
type Service ¶
type Service interface { // PublishModule publishes a module from a VCS repository. PublishModule(context.Context, PublishOptions) (*Module, error) PublishVersion(context.Context, PublishVersionOptions) error // CreateModule creates a module without a connection to a VCS repository. CreateModule(context.Context, CreateOptions) (*Module, error) ListModules(context.Context, ListModulesOptions) ([]*Module, error) GetModule(ctx context.Context, opts GetModuleOptions) (*Module, error) GetModuleByID(ctx context.Context, id string) (*Module, error) GetModuleByRepoID(ctx context.Context, repoID uuid.UUID) (*Module, error) DeleteModule(ctx context.Context, id string) (*Module, error) GetModuleInfo(ctx context.Context, versionID string) (*TerraformModule, error) CreateVersion(context.Context, CreateModuleVersionOptions) (*ModuleVersion, error) // contains filtered or unexported methods }
type TerraformModule ¶
TerraformModule is a module of terraform configuration
type UpdateModuleVersionStatusOptions ¶
type UpdateModuleVersionStatusOptions struct { ID string Status ModuleVersionStatus Error string }
Click to show internal directories.
Click to hide internal directories.