Documentation
¶
Index ¶
- func CreateKLCacheDir(klfile string) (cacheDir string, err error)
- func GenHash(args GenHashArgs) string
- func NixShell(ctx context.Context, args ShellArgs) error
- func ParseEnvVarsAndMounts(cfg *KLConfig) (envVars []string, mounts map[string][]byte, err error)
- func ParsePackage(pkg string) (*parsedPackage, error)
- func PreCommand() (*KLConfig, *ParsedKLConfig, error)
- type EnvType
- type EnvVars
- type GenHashArgs
- type KLConfig
- func (klc *KLConfig) AddEnvVar(v EnvType) error
- func (klc *KLConfig) AddLibrary(v ...string) error
- func (klc *KLConfig) AddMount(v Mount) error
- func (klc *KLConfig) AddPackage(v ...string) error
- func (klc *KLConfig) RemoveLibrary(v ...string) error
- func (klc *KLConfig) RemovePackage(v ...string) error
- type Mount
- type Mounts
- type ParsedKLConfig
- type ShellArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateKLCacheDir ¶
func GenHash ¶
func GenHash(args GenHashArgs) string
func ParseEnvVarsAndMounts ¶
func ParsePackage ¶
func PreCommand ¶
func PreCommand() (*KLConfig, *ParsedKLConfig, error)
Types ¶
type EnvType ¶
type EnvType struct {
Key string `json:"key" yaml:"key"`
Value *string `json:"value,omitempty" yaml:"value,omitempty"`
ConfigRef *string `json:"configRef,omitempty" yaml:"configRef,omitempty"`
SecretRef *string `json:"secretRef,omitempty" yaml:"secretRef,omitempty"`
MresRef *string `json:"mresRef,omitempty" yaml:"mresRef,omitempty"`
}
type GenHashArgs ¶
type KLConfig ¶
type KLConfig struct {
ConfigFile string `json:"-"`
Version string `json:"version" yaml:"version"`
DefaultEnv string `json:"defaultEnv,omitempty" yaml:"defaultEnv,omitempty"`
TeamName string `json:"teamName,omitempty" yaml:"teamName,omitempty"`
Packages []string `json:"packages" yaml:"packages"`
Libraries []string `json:"libraries" yaml:"libraries"`
EnvVars EnvVars `json:"envVars" yaml:"envVars"`
Mounts Mounts `json:"mounts" yaml:"mounts"`
Ports []int `json:"ports" yaml:"ports"`
// contains filtered or unexported fields
}
func FindKLFile ¶
func (*KLConfig) AddLibrary ¶
func (*KLConfig) AddPackage ¶
func (*KLConfig) RemoveLibrary ¶
func (*KLConfig) RemovePackage ¶
type ParsedKLConfig ¶
type ParsedKLConfig struct {
ConfigFile string `json:"configFile"`
CacheFile string `json:"cacheFile"`
CacheDir string `json:"cacheDir"`
Packages []string `json:"packages"`
Libraries []string `json:"libraries"`
EnvVars []string `json:"envVars"`
Mounts map[string][]byte `json:"mounts"`
Hash string `json:"hash"`
}
func PullVariables ¶
func PullVariables(klc *KLConfig, cacheDir string) (*ParsedKLConfig, error)
func PullVariablesFromAPI ¶
func PullVariablesFromAPI(klc *KLConfig, cacheDir string) (*ParsedKLConfig, error)
Click to show internal directories.
Click to hide internal directories.