config

package
v2.8.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version      string = "dev"
	KsctlCoreVer string = "dev"
	BuildDate    string
)

change this using ldflags

View Source
var DefaultUpdateCache = &UpdateCache{
	UpdateCheckInterval: time.Hour * 24,
}

Functions

func InDevMode added in v2.1.0

func InDevMode() bool

func LoadConfig

func LoadConfig(c *Config) (errC error)

func LoadStorageCreds

func LoadStorageCreds[T statefile.CredentialsMongodb](c *T, s consts.KsctlStore) (errC error)

func LoadUpdateCache added in v2.5.5

func LoadUpdateCache(c *UpdateCache) (errC error)

func SaveConfig

func SaveConfig(c *Config) error

func SaveStorageCreds

func SaveStorageCreds[T statefile.CredentialsMongodb](c *T, s consts.KsctlStore) error

func SaveUpdateCache added in v2.5.5

func SaveUpdateCache(c *UpdateCache) error

Types

type Config

type Config struct {
	PreferedStateStore consts.KsctlStore `json:"preferedStateStore"`
	Telemetry          *bool             `json:"telemetry,omitempty"`
}

type UpdateCache added in v2.5.5

type UpdateCache struct {
	LastChecked         time.Time     `json:"lastChecked"`
	AvailableVersions   bool          `json:"availableVersions"`
	UpdateCheckInterval time.Duration `json:"updateCheckInterval"`
}

Jump to

Keyboard shortcuts

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