config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bucket

type Bucket struct {
	URL string `hcl:"url"`
}

type Config

type Config struct {
	MountPoint    string    `hcl:"mountpoint"`
	DefaultVolume string    `hcl:"default_volume"`
	Volumes       []*Volume `hcl:"volume,block"`
	// contains filtered or unexported fields
}

func ParseConfig

func ParseConfig(filename string, src []byte) (*Config, error)

func ReadConfig

func ReadConfig(p string) (*Config, error)

func (*Config) GetDefaultVolume

func (cfg *Config) GetDefaultVolume() *Volume

func (*Config) GetVolume

func (cfg *Config) GetVolume(name string) (_ *Volume, ok bool)

type Volume

type Volume struct {
	Name       string  `hcl:"volume,label"`
	Passphrase string  `hcl:"passphrase"`
	Bucket     *Bucket `hcl:"bucket,block"`
}

Jump to

Keyboard shortcuts

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