config

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddNodeToken

type AddNodeToken struct {
	Token      string `yaml:"token"`
	Server     string `yaml:"server"`
	KubeConfig string `yaml:"kubeConfig"`
}

type ClusterConfig

type ClusterConfig struct {
}

func LoadClusterConfig

func LoadClusterConfig(serverHome string) (*ClusterConfig, error)

func ReadClusterConfig

func ReadClusterConfig(content io.ReadCloser) (*ClusterConfig, error)

func (*ClusterConfig) Save

func (clusterConfig *ClusterConfig) Save(serverHome string, packageConfig *PackageConfig, localConfig *LocalConfig) error

type LocalConfig

type LocalConfig struct {
	AdminGroup           string `yaml:"adminGroup"`
	BindAddress          string `yaml:"bindAddress"`
	BindAddressInterface string
	Join                 struct {
		Server string `yaml:"server"`
		Token  string `yaml:"token"`
	} `yaml:"join"`

	AdminGroupId int64
}

func LoadLocalConfig

func LoadLocalConfig(serverHome string) (*LocalConfig, error)

func ReadLocalConfig

func ReadLocalConfig(content io.ReadCloser) (*LocalConfig, error)

func (*LocalConfig) Save

func (localConfig *LocalConfig) Save(serverHome string, packageConfig *PackageConfig) error

type PackageConfig

type PackageConfig struct {
	Id              string
	Name            string
	Version         string
	BuildTime       int64  `yaml:"buildTime"`
	ManagerFilename string `yaml:"managerFilename"`

	FilePermissions map[string]PackagedFileConfig `yaml:"filePermissions"`
	Files           map[string]string
}

func LoadPackageConfig

func LoadPackageConfig(serverHome string) (*PackageConfig, error)

func ReadPackageConfig

func ReadPackageConfig(content io.ReadCloser) (*PackageConfig, error)

func (*PackageConfig) CheckFilePermissions

func (packageConfig *PackageConfig) CheckFilePermissions(filePath string, localConfig *LocalConfig, serverHome string) error

func (*PackageConfig) Save

func (packageConfig *PackageConfig) Save(serverHome string, localConfig *LocalConfig) error

type PackagedFileConfig

type PackagedFileConfig struct {
	AdminGroupReadable bool `yaml:"adminGroupReadable"`
	AdminGroupWritable bool `yaml:"adminGroupWritable"`
	Executable         bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL