Documentation
¶
Index ¶
- Variables
- func ClearNucleusAuthFile() error
- func DoesNucleusConfigExist() bool
- func GetOrCreateNucleusFolder() (string, error)
- func SetNucleusAuthFile(authConfig NucleusAuthConfig) error
- func SetNucleusConfig(config *NucleusConfig) error
- type NucleusAuthConfig
- type NucleusConfig
- type NucleusSecrets
- type ResourceList
- type ResourceRequirements
- type SpecStruct
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrMustLogin = fmt.Errorf("error retrieving auth information. Try logging in via 'nucleus login'")
)
Functions ¶
func ClearNucleusAuthFile ¶
func ClearNucleusAuthFile() error
func DoesNucleusConfigExist ¶
func DoesNucleusConfigExist() bool
func GetOrCreateNucleusFolder ¶
Get or Creates the Nucleus folder that lives and stores persisted settings.
1. Checks for directory specified by env var NUCLEUS_CONFIG_DIR 2. Checks for existence of XDG_CONFIG_HOME and append "nucleus" to it, if exists 3. Use ~/.nucleus
func SetNucleusAuthFile ¶
func SetNucleusAuthFile(authConfig NucleusAuthConfig) error
func SetNucleusConfig ¶
func SetNucleusConfig(config *NucleusConfig) error
Sets the nucleus config defined by the user
Types ¶
type NucleusAuthConfig ¶
type NucleusAuthConfig struct {
AccessToken string `yaml:"accessToken"`
RefreshToken string `yaml:"refreshToken,omitempty"`
IdToken string `yaml:"idToken,omitempty"`
}
func GetNucleusAuthConfig ¶
func GetNucleusAuthConfig() (*NucleusAuthConfig, error)
Gets the nucleus auth config
type NucleusConfig ¶
type NucleusConfig struct {
CliVersion string `yaml:"cliVersion"`
Spec SpecStruct `yaml:"spec"`
}
func GetNucleusConfig ¶
func GetNucleusConfig() (*NucleusConfig, error)
Retrieves the nucleus config defined by the user
type NucleusSecrets ¶
type ResourceList ¶
type ResourceRequirements ¶
type ResourceRequirements struct {
Minimum ResourceList `yaml:"minimum,omitempty"`
Maximum ResourceList `yaml:"maximum,omitempty"`
}
type SpecStruct ¶
type SpecStruct struct {
ServiceName string `yaml:"serviceName"`
ServiceRunTime string `yaml:"serviceRuntime"`
Image string `yaml:"image,omitempty"`
IsPrivate bool `yaml:"isPrivate"`
Vars map[string]string `yaml:"vars,omitempty"`
Secrets NucleusSecrets `yaml:"secrets,omitempty"`
AllowedServices []string `yaml:"allowedServices,omitempty"`
DisallowedServices []string `yaml:"disallowedServices,omitempty"`
Resources ResourceRequirements `yaml:"resources,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.