config

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Profiles map[string]Profile `json:"profiles,omitempty"`
}

A Config represents the on-disk configuration of a menmos client.

func LoadOrCreateDefault

func LoadOrCreateDefault() (*Config, error)

LoadDefault loads a config from the default path.

type Profile

type Profile struct {
	Host     string `json:"host,omitempty"`
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
}

A Profile contains all information for connecting to a menmos cluster.

func LoadProfileFromDefaultConfig

func LoadProfileFromDefaultConfig(profileName string) (*Profile, error)

LoadProfileFromDefaultConfig is a utility method for loading a single profile from the default config location.

Jump to

Keyboard shortcuts

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