config

package
v0.38.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: MPL-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ConfigFileName       = "weave-gitops-config.json"
	WrongConfigFormatMsg = `` /* 169-byte string literal not displayed */

)

Variables

This section is empty.

Functions

func GenerateUserID

func GenerateUserID(numChars int, seed int64) string

GenerateUserID generates a string of specified length made of random characters and encodes it in base64 format

func SaveConfig

func SaveConfig(config *GitopsCLIConfig) error

SaveConfig saves the CLI configuration for Weave GitOps to the config file

func SetConfig added in v0.11.0

func SetConfig(config *GitopsCLIConfig)

SetConfig sets global config to the provided value

Types

type GitopsCLIConfig

type GitopsCLIConfig struct {
	Analytics bool   `json:"analytics"`
	UserID    string `json:"userId"`
}

func GetConfig

func GetConfig(shouldCreate bool) (*GitopsCLIConfig, error)

GetConfig reads the CLI configuration for Weave GitOps from the config file

func (*GitopsCLIConfig) String

func (config *GitopsCLIConfig) String() (string, error)

Jump to

Keyboard shortcuts

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