Documentation ¶
Index ¶
- Variables
- func ConfigDirectoryExists() bool
- func CreateAllDirectories() error
- func CreateConfigDirectory() error
- func CreateLogDirectory() error
- func Directories() (string, string)
- func FileExists() bool
- func FilePath() string
- func GetConfigDirectory() string
- func GetConfigPath() string
- func GetCurrentProfile() string
- func GetDataDirectory() string
- func GetLogPath() string
- func LogDirectoryExists() bool
- func Write(p *Profiles) error
- type Profile
- type Profiles
- func (p *Profiles) Available() []string
- func (p *Profiles) CreateDefaultProfile() (*Profile, error)
- func (p *Profiles) CurrentConfigExists() bool
- func (p *Profiles) CurrentExists() bool
- func (p *Profiles) CurrentProfile() (*Profile, error)
- func (p *Profiles) GetProfile(name string) (*Profile, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoCurrentProfile = errors.New("No current profile is set, run 'sdpctl profile set'")
View Source
var ErrNoProfileAvailable = errors.New("No profiles are available. run 'sdpctl profile set'")
Functions ¶
func ConfigDirectoryExists ¶
func ConfigDirectoryExists() bool
func CreateAllDirectories ¶
func CreateAllDirectories() error
func CreateConfigDirectory ¶
func CreateConfigDirectory() error
func CreateLogDirectory ¶
func CreateLogDirectory() error
func Directories ¶
func FileExists ¶
func FileExists() bool
func GetConfigDirectory ¶
func GetConfigDirectory() string
func GetConfigPath ¶
func GetConfigPath() string
func GetCurrentProfile ¶
func GetCurrentProfile() string
func GetDataDirectory ¶
func GetDataDirectory() string
func GetLogPath ¶
func GetLogPath() string
func LogDirectoryExists ¶
func LogDirectoryExists() bool
Types ¶
type Profile ¶
type Profile struct { Directory string `json:"directory"` LogPath string `json:"logs"` Name string `json:"name"` }
func (*Profile) GetConfigurationPath ¶
func (*Profile) GetLogPath ¶
type Profiles ¶
type Profiles struct { Current *string `json:"current,omitempty"` List []Profile `json:"list,omitempty"` }
var ReadProfiles *Profiles
func (*Profiles) CreateDefaultProfile ¶
func (*Profiles) CurrentConfigExists ¶
func (*Profiles) CurrentExists ¶
func (*Profiles) CurrentProfile ¶
Click to show internal directories.
Click to hide internal directories.