config

package
v1.4.9 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FsTypeNFS - to mount NS filesystem over NFS
	FsTypeNFS string = "nfs"

	// FsTypeCIFS - to mount NS filesystem over SMB
	FsTypeCIFS                string = "cifs"
	DefaultInsecureSkipVerify        = true
)

supported mount filesystem types

Variables

View Source
var SuppertedFsTypeList = []string{FsTypeNFS, FsTypeCIFS}

SuppertedFsTypeList - list of supported filesystem types to mount

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 added in v1.4.0

type NsData struct {
	Address               string `yaml:"restIp"`
	Username              string `yaml:"username"`
	Password              string `yaml:"password"`
	Zone                  string `yaml:"zone"`
	DefaultDataset        string `yaml:"defaultDataset,omitempty"`
	DefaultDataIP         string `yaml:"defaultDataIp,omitempty"`
	DefaultMountFsType    string `yaml:"defaultMountFsType,omitempty"`
	DefaultMountOptions   string `yaml:"defaultMountOptions,omitempty"`
	V13Compatibility      bool   `yaml:"v13Compatibility,omitempty"`
	MountPointPermissions string `yaml:"mountPointPermissions"`
	InsecureSkipVerify    *bool  `yaml:"insecureSkipVerify,omitempty"`
}

Jump to

Keyboard shortcuts

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