config

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2021 License: MIT Imports: 6 Imported by: 4

Documentation

Overview

Package config provides all the config management

Index

Constants

This section is empty.

Variables

View Source
var ErrUnknownUser = errors.New("unknown user")

ErrUnknownUser is returned when the provided user cannot be identified through our authentication mechanism

Functions

This section is empty.

Types

type Config

type Config struct {
	Content *confpar.Content
	// contains filtered or unexported fields
}

Config provides the general server config

func NewConfig

func NewConfig(fileName string, logger log.Logger) (*Config, error)

NewConfig creates a new config instance

func (*Config) CheckAccesses

func (c *Config) CheckAccesses() error

CheckAccesses checks all accesses

func (*Config) GetAccess

func (c *Config) GetAccess(user string, pass string) (*confpar.Access, error)

GetAccess return a file system access given some credentials

func (*Config) Load

func (c *Config) Load() error

Load the config

func (*Config) Prepare

func (c *Config) Prepare() error

Prepare the config before using it

Directories

Path Synopsis
Package confpar provide the core parameters of the config
Package confpar provide the core parameters of the config

Jump to

Keyboard shortcuts

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