Documentation
¶
Index ¶
Constants ¶
const ( EnvKusionModuleRegistryHost = "KUSION_MODULE_REGISTRY_HOST" EnvKusionModuleRegistryUsername = "KUSION_MODULE_REGISTRY_USERNAME" EnvKusionModuleRegistryPassword = "KUSION_MODULE_REGISTRY_PASSWORD" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KusionModuleClient ¶
KusionModuleClient is the client of Kusion Module Registry.
func NewKusionModuleClient ¶
func NewKusionModuleClient() (*KusionModuleClient, error)
NewKusionModuleClient returns a new client for Kusion Module Registry.
func NewKusionModuleClientWithCredentials ¶
func NewKusionModuleClientWithCredentials(host, username, password string) (*KusionModuleClient, error)
NewKusionModuleClientWithCredentials returns a new client for a private Kusion Module Registry with the specified registry host, username and password. NOTE: the precedence of credential information is as follows. 1. The input parameters of this helper function. 2. The environment variables of `KUSION_MODULE_REGISTRY_HOST`, `KUSION_MODULE_REGISTRY_USERNAME` and `KUSION_MODULE_REGISTRY_PASSWORD`. 3. The username and password stored in the credential configs, usually in the `$HOME/.kcl/kpm/.kpm/config/config.json`.
func (*KusionModuleClient) DownloadKusionModules ¶
func (c *KusionModuleClient) DownloadKusionModules(dir string) error
DownloadKusionModules downloads the Kusion Module Dependencies declared in the `kcl.mod` file under the specified directory.