Documentation ¶
Index ¶
- Constants
- type Checksums
- type Module
- type ModuleGitHubRegistry
- func (x *ModuleGitHubRegistry) CheckUpdate(ctx context.Context, module *Module) (*Module, error)
- func (x *ModuleGitHubRegistry) Download(ctx context.Context, module *Module, options *ModuleRegistryDownloadOptions) (string, error)
- func (x *ModuleGitHubRegistry) GetAllVersion(ctx context.Context, module *Module) ([]*Module, error)
- func (x *ModuleGitHubRegistry) GetLatestVersion(ctx context.Context, module *Module) (*Module, error)
- func (x *ModuleGitHubRegistry) GetMetadata(ctx context.Context, module *Module) (*ModuleMetadata, error)
- func (x *ModuleGitHubRegistry) GetSupplement(ctx context.Context, module *Module) (*ModuleSupplement, error)
- func (x *ModuleGitHubRegistry) List(ctx context.Context) ([]*Module, error)
- func (x *ModuleGitHubRegistry) Search(ctx context.Context, keyword string) ([]*Module, error)
- type ModuleGithubRegistryOptions
- type ModuleLocalRegistry
- func (x *ModuleLocalRegistry) CheckUpdate(ctx context.Context, module *Module) (*Module, error)
- func (x *ModuleLocalRegistry) Download(ctx context.Context, module *Module, options *ModuleRegistryDownloadOptions) (string, error)
- func (x *ModuleLocalRegistry) GetAllVersion(ctx context.Context, module *Module) ([]*Module, error)
- func (x *ModuleLocalRegistry) GetLatestVersion(ctx context.Context, module *Module) (*Module, error)
- func (x *ModuleLocalRegistry) GetMetadata(ctx context.Context, module *Module) (*ModuleMetadata, error)
- func (x *ModuleLocalRegistry) GetSupplement(ctx context.Context, module *Module) (*ModuleSupplement, error)
- func (x *ModuleLocalRegistry) List(ctx context.Context) ([]*Module, error)
- func (x *ModuleLocalRegistry) Search(ctx context.Context, keyword string) ([]*Module, error)
- type ModuleMetadata
- type ModuleRegistry
- type ModuleRegistryDownloadOptions
- type ModuleSupplement
- type Provider
- type ProviderGithubRegistry
- func (x *ProviderGithubRegistry) CheckUpdate(ctx context.Context, provider *Provider) (*Provider, error)
- func (x *ProviderGithubRegistry) Download(ctx context.Context, provider *Provider, ...) (string, error)
- func (x *ProviderGithubRegistry) GetAllVersion(ctx context.Context, provider *Provider) ([]*Provider, error)
- func (x *ProviderGithubRegistry) GetLatestVersion(ctx context.Context, provider *Provider) (*Provider, error)
- func (x *ProviderGithubRegistry) GetMetadata(ctx context.Context, provider *Provider) (*ProviderMetadata, error)
- func (x *ProviderGithubRegistry) GetSupplement(ctx context.Context, provider *Provider) (*ProviderSupplement, error)
- func (x *ProviderGithubRegistry) List(ctx context.Context) ([]*Provider, error)
- func (x *ProviderGithubRegistry) Search(ctx context.Context, keyword string) ([]*Provider, error)
- type ProviderGithubRegistryOptions
- type ProviderLocalRegistry
- func (x *ProviderLocalRegistry) CheckUpdate(ctx context.Context, provider *Provider) (*Provider, error)
- func (x *ProviderLocalRegistry) Download(ctx context.Context, provider *Provider, ...) (string, error)
- func (x *ProviderLocalRegistry) GetAllVersion(ctx context.Context, provider *Provider) ([]*Provider, error)
- func (x *ProviderLocalRegistry) GetLatestVersion(ctx context.Context, provider *Provider) (*Provider, error)
- func (x *ProviderLocalRegistry) GetMetadata(ctx context.Context, provider *Provider) (*ProviderMetadata, error)
- func (x *ProviderLocalRegistry) GetSupplement(ctx context.Context, provider *Provider) (*ProviderSupplement, error)
- func (x *ProviderLocalRegistry) List(ctx context.Context) ([]*Provider, error)
- func (x *ProviderLocalRegistry) Search(ctx context.Context, keyword string) ([]*Provider, error)
- type ProviderMetadata
- type ProviderRegistry
- type ProviderRegistryDownloadOptions
- type ProviderSupplement
Constants ¶
View Source
const ( ProvidersListDirectoryName = "provider" MetaDataFileName = "metadata.yaml" SupplementFileName = "supplement.yaml" )
View Source
const ModuleGithubRegistryDefaultRepoFullName = "selefra/registry"
ModuleGithubRegistryDefaultRepoFullName The default official module registry
View Source
const (
ModulesListDirectoryName = "module"
)
View Source
const ProviderGithubRegistryDefaultRepoFullName = "selefra/registry"
ProviderGithubRegistryDefaultRepoFullName The official registry repository
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checksums ¶
type Checksums struct { LinuxArm64 string `json:"linux_arm64" yaml:"linux_arm64"` LinuxAmd64 string `json:"linux_amd64" yaml:"linux_amd64"` WindowsArm64 string `json:"windows_arm64" yaml:"windows_arm64"` WindowsAmd64 string `json:"windows_amd64" yaml:"windows_amd64"` DarwinArm64 string `json:"darwin_arm64" yaml:"darwin_arm64"` DarwinAmd64 string `json:"darwin_amd64" yaml:"darwin_amd64"` }
type Module ¶ added in v0.0.9
type Module struct {
*version.NameAndVersion
}
func ParseModule ¶ added in v0.0.9
type ModuleGitHubRegistry ¶ added in v0.0.9
type ModuleGitHubRegistry struct {
// contains filtered or unexported fields
}
func NewModuleGitHubRegistry ¶ added in v0.0.9
func NewModuleGitHubRegistry(options *ModuleGithubRegistryOptions) (*ModuleGitHubRegistry, error)
func (*ModuleGitHubRegistry) CheckUpdate ¶ added in v0.0.9
func (*ModuleGitHubRegistry) Download ¶ added in v0.0.9
func (x *ModuleGitHubRegistry) Download(ctx context.Context, module *Module, options *ModuleRegistryDownloadOptions) (string, error)
func (*ModuleGitHubRegistry) GetAllVersion ¶ added in v0.0.9
func (*ModuleGitHubRegistry) GetLatestVersion ¶ added in v0.0.9
func (*ModuleGitHubRegistry) GetMetadata ¶ added in v0.0.9
func (x *ModuleGitHubRegistry) GetMetadata(ctx context.Context, module *Module) (*ModuleMetadata, error)
func (*ModuleGitHubRegistry) GetSupplement ¶ added in v0.0.9
func (x *ModuleGitHubRegistry) GetSupplement(ctx context.Context, module *Module) (*ModuleSupplement, error)
type ModuleGithubRegistryOptions ¶ added in v0.0.9
func NewModuleGithubRegistryOptions ¶ added in v0.0.9
func NewModuleGithubRegistryOptions(downloadWorkspace string, registryRepoFullName ...string) *ModuleGithubRegistryOptions
func (*ModuleGithubRegistryOptions) Check ¶ added in v0.0.9
func (x *ModuleGithubRegistryOptions) Check() *schema.Diagnostics
type ModuleLocalRegistry ¶ added in v0.0.9
type ModuleLocalRegistry struct {
// contains filtered or unexported fields
}
func NewModuleLocalRegistry ¶ added in v0.0.9
func NewModuleLocalRegistry(registryDirectory string, registryGitHubRepoFullName ...string) (*ModuleLocalRegistry, error)
func (*ModuleLocalRegistry) CheckUpdate ¶ added in v0.0.9
func (*ModuleLocalRegistry) Download ¶ added in v0.0.9
func (x *ModuleLocalRegistry) Download(ctx context.Context, module *Module, options *ModuleRegistryDownloadOptions) (string, error)
func (*ModuleLocalRegistry) GetAllVersion ¶ added in v0.0.9
func (*ModuleLocalRegistry) GetLatestVersion ¶ added in v0.0.9
func (*ModuleLocalRegistry) GetMetadata ¶ added in v0.0.9
func (x *ModuleLocalRegistry) GetMetadata(ctx context.Context, module *Module) (*ModuleMetadata, error)
func (*ModuleLocalRegistry) GetSupplement ¶ added in v0.0.9
func (x *ModuleLocalRegistry) GetSupplement(ctx context.Context, module *Module) (*ModuleSupplement, error)
type ModuleMetadata ¶ added in v0.0.9
type ModuleMetadata struct { Name string `json:"name" yaml:"name"` LatestVersion string `json:"latest-version" yaml:"latest-version"` LatestUpdate string `json:"latest-updated" yaml:"latest-updated"` Introduction string `json:"introduction" yaml:"introduction"` Versions []string `json:"versions" yaml:"versions"` }
func (*ModuleMetadata) HasVersion ¶ added in v0.0.9
func (x *ModuleMetadata) HasVersion(version string) bool
type ModuleRegistry ¶ added in v0.0.9
type ModuleRegistry interface { // CheckUpdate Used to check whether a module has a newer version than the current one CheckUpdate(ctx context.Context, module *Module) (*Module, error) // Download the module to a local registryDirectory Download(ctx context.Context, module *Module, options *ModuleRegistryDownloadOptions) (string, error) // GetLatestVersion Gets the latest version of a given module GetLatestVersion(ctx context.Context, module *Module) (*Module, error) // GetAllVersion Gets all versions of a given module GetAllVersion(ctx context.Context, module *Module) ([]*Module, error) GetMetadata(ctx context.Context, module *Module) (*ModuleMetadata, error) GetSupplement(ctx context.Context, module *Module) (*ModuleSupplement, error) // List Lists all modules installed locally List(ctx context.Context) ([]*Module, error) // Search Searches the remote registry for modules containing the given keyword Search(ctx context.Context, keyword string) ([]*Module, error) }
ModuleRegistry Used to represent a registry for a Module repository
type ModuleRegistryDownloadOptions ¶ added in v0.0.9
type ModuleRegistryDownloadOptions struct { // Which directory to save the downloaded module to ModuleDownloadDirectoryPath string // Whether to skip authentication. If the authentication is skipped, the checksum of the downloaded file is not verified SkipVerify *bool // Downloading can be time-consuming, so you can set up a monitor to track progress ProgressTracker getter.ProgressTracker }
type ModuleSupplement ¶ added in v0.0.9
type Provider ¶
type Provider struct {
*version.NameAndVersion
}
func NewProvider ¶ added in v0.0.9
func ParseProvider ¶ added in v0.0.9
ParseProvider example: aws@v0.0.1
type ProviderGithubRegistry ¶ added in v0.0.9
type ProviderGithubRegistry struct {
// contains filtered or unexported fields
}
ProviderGithubRegistry provider registry github implementation
func NewProviderGithubRegistry ¶ added in v0.0.9
func NewProviderGithubRegistry(options *ProviderGithubRegistryOptions) (*ProviderGithubRegistry, error)
func (*ProviderGithubRegistry) CheckUpdate ¶ added in v0.0.9
func (*ProviderGithubRegistry) Download ¶ added in v0.0.9
func (x *ProviderGithubRegistry) Download(ctx context.Context, provider *Provider, options *ProviderRegistryDownloadOptions) (string, error)
func (*ProviderGithubRegistry) GetAllVersion ¶ added in v0.0.9
func (*ProviderGithubRegistry) GetLatestVersion ¶ added in v0.0.9
func (*ProviderGithubRegistry) GetMetadata ¶ added in v0.0.9
func (x *ProviderGithubRegistry) GetMetadata(ctx context.Context, provider *Provider) (*ProviderMetadata, error)
func (*ProviderGithubRegistry) GetSupplement ¶ added in v0.0.9
func (x *ProviderGithubRegistry) GetSupplement(ctx context.Context, provider *Provider) (*ProviderSupplement, error)
type ProviderGithubRegistryOptions ¶ added in v0.0.9
func NewProviderGithubRegistryOptions ¶ added in v0.0.9
func NewProviderGithubRegistryOptions(downloadWorkspace string, registryRepoFullName ...string) *ProviderGithubRegistryOptions
func (*ProviderGithubRegistryOptions) Check ¶ added in v0.0.9
func (x *ProviderGithubRegistryOptions) Check() *schema.Diagnostics
type ProviderLocalRegistry ¶ added in v0.0.9
type ProviderLocalRegistry struct {
// contains filtered or unexported fields
}
ProviderLocalRegistry The local path implementation of the provider repository
func NewProviderLocalRegistry ¶ added in v0.0.9
func NewProviderLocalRegistry(registryDirectory string, registryGitHubRepoFullName ...string) (*ProviderLocalRegistry, error)
func (*ProviderLocalRegistry) CheckUpdate ¶ added in v0.0.9
func (*ProviderLocalRegistry) Download ¶ added in v0.0.9
func (x *ProviderLocalRegistry) Download(ctx context.Context, provider *Provider, options *ProviderRegistryDownloadOptions) (string, error)
func (*ProviderLocalRegistry) GetAllVersion ¶ added in v0.0.9
func (*ProviderLocalRegistry) GetLatestVersion ¶ added in v0.0.9
func (*ProviderLocalRegistry) GetMetadata ¶ added in v0.0.9
func (x *ProviderLocalRegistry) GetMetadata(ctx context.Context, provider *Provider) (*ProviderMetadata, error)
func (*ProviderLocalRegistry) GetSupplement ¶ added in v0.0.9
func (x *ProviderLocalRegistry) GetSupplement(ctx context.Context, provider *Provider) (*ProviderSupplement, error)
type ProviderMetadata ¶
type ProviderMetadata struct { Name string `json:"name" yaml:"name"` LatestVersion string `json:"latest-version" yaml:"latest-version"` LatestUpdate string `json:"latest-updated" yaml:"latest-updated"` Introduction string `json:"introduction" yaml:"introduction"` Versions []string `json:"versions" yaml:"versions"` }
func (*ProviderMetadata) HasVersion ¶ added in v0.0.9
func (x *ProviderMetadata) HasVersion(version string) bool
type ProviderRegistry ¶ added in v0.0.9
type ProviderRegistry interface { // CheckUpdate Check whether the given provider has a newer version CheckUpdate(ctx context.Context, provider *Provider) (*Provider, error) // GetLatestVersion Gets the latest version of the specified provider GetLatestVersion(ctx context.Context, provider *Provider) (*Provider, error) // GetAllVersion Gets all versions of the given provider GetAllVersion(ctx context.Context, provider *Provider) ([]*Provider, error) GetMetadata(ctx context.Context, provider *Provider) (*ProviderMetadata, error) GetSupplement(ctx context.Context, provider *Provider) (*ProviderSupplement, error) // Download the provider of the given version Download(ctx context.Context, provider *Provider, options *ProviderRegistryDownloadOptions) (string, error) // Search for providers in registry by keyword Search(ctx context.Context, keyword string) ([]*Provider, error) // List Lists all providers on registry List(ctx context.Context) ([]*Provider, error) }
ProviderRegistry Used to represent the registry of a provider
type ProviderRegistryDownloadOptions ¶ added in v0.0.9
type ProviderRegistryDownloadOptions struct { // Which directory to save the downloaded provider to ProviderDownloadDirectoryPath string // Whether to skip authentication. If the authentication is skipped, the checksum of the downloaded file is not verified SkipVerify *bool // Downloading can be time-consuming, so you can set up a monitor to track progress ProgressTracker getter.ProgressTracker }
ProviderRegistryDownloadOptions Some options when downloading the provider
type ProviderSupplement ¶
Click to show internal directories.
Click to hide internal directories.