config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConfigReqHandler

func NewConfigReqHandler(logger log.Logger, mapping MappingFileHandler) (http.Handler, error)

func NewMappingFileHandler

func NewMappingFileHandler(logger log.Logger) *mappingFileHandler

Types

type MappingFile

type MappingFile struct {
	VolumePrefix string        `yaml:"volumeprefix"`
	Volumes      []VolumeSpecs `yaml: "volumes"`
}

type MappingFileHandler

type MappingFileHandler interface {
	Render() []byte
	Dump()
	Save(path string) error
	Load(path string) error
	Set(content MappingFile)
	UserExist(userName string) bool
	GetUserVolumeNames(userName string) ([]string, error)
	GetVolumePrefix() string
}

type VolumeSpecs

type VolumeSpecs struct {
	VolumeName string   `yaml:volumename`
	Users      []string `yaml:users`
}

Jump to

Keyboard shortcuts

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