config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2017 License: GPL-2.0, GPL-3.0 Imports: 10 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

Passwords is used to log into the application

View Source
var Port int

Port is the port which the application listens on

View Source
var Secret []byte

Secret is the crypto secret for the application

Functions

func AddUser

func AddUser(path string, username string, password string) error

AddUser adds a new user to the system

func DeleteUser

func DeleteUser(path string, username string) error

DeleteUser removes a user from the application

func GenerateSecret

func GenerateSecret(path string, length int, force bool) (err error)

GenerateSecret generates a new application secret

func GetUsers

func GetUsers(path string) (htpasswd.HashedPasswords, error)

GetUsers returns the users of the application

func Parse

func Parse(args types.AppArgs)

Parse parses the application configuration file

Types

type Config

type Config struct {
	Port   int    `json:"port"`
	Secret string `json:"secret"`
}

Config is the configuration object for the application

Jump to

Keyboard shortcuts

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