config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2020 License: Apache-2.0 Imports: 8 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 {
	NsMap map[string]NsData `yaml:"nexentastor_map"`
	Debug bool              `yaml:"debug,omitempty"`
	// contains filtered or unexported fields
}

Config - driver config from file

func New

func New(lookUpDir string) (*Config, error)

New - find config file and create config instance

func (*Config) GetFilePath

func (c *Config) GetFilePath() string

GetFilePath - get filepath of found config file

func (*Config) Refresh

func (c *Config) Refresh(secret string) (changed bool, err error)

Refresh - read and validate config, return `true` if config has been changed

func (*Config) Validate

func (c *Config) Validate() error

Validate - validate current config

type NsData

type NsData struct {
	Address            string `yaml:"restIp"`
	Username           string `yaml:"username"`
	Password           string `yaml:"password"`
	Zone               string `yaml: "zone"`
	DefaultVolumeGroup string `yaml:"defaultVolumeGroup,omitempty"`
	DefaultTargetGroup string `yaml:"defaultTargetGroup,omitempty"`
	DefaultTarget      string `yaml:"defaultTarget,omitempty"`
	DefaultHostGroup   string `yaml:"defaultHostGroup,omitempty"`
	DefaultISCSIPort   string `yaml:"defaultiSCSIPort,omitempty"`
	DefaultDataIP      string `yaml:"defaultDataIp,omitempty"`
}

Jump to

Keyboard shortcuts

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