daemon

package
v0.0.0-...-caea6a0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2019 License: GPL-3.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	USERNAME_KEY    = "un"
	SUPERUSER_KEY   = "su"
	VALID_UNTIL_KEY = "vu"
)

Variables

View Source
var (
	InvalidUsernameOrPassErr = errors.New("Invalid username or password")
	InvalidTokenFormatErr    = errors.New("Invalid token format")
	TokenExpiredErr          = errors.New("Token has expired")
	UnknownUserErr           = errors.New("Unknown user")
	EmptyUserErr             = errors.New("Username cannot be empty")
	EmptyPasswdErr           = errors.New("Password cannot be empty")
)
View Source
var (
	DuplicateEventErr   = errors.New("Event with that tag already exists")
	UnknownEventErr     = errors.New("Unable to find event by that tag")
	MissingTokenErr     = errors.New("No security token provided")
	InvalidArgumentsErr = errors.New("Invalid arguments provided")
	UnknownTeamErr      = errors.New("Unable to find team by that id")
	GrpcOptsErr         = errors.New("failed to retrieve server options")

	LetsEncryptEnvs = map[bool]string{
					// contains filtered or unexported fields
	}
)

Functions

func New

func New(conf *Config) (*daemon, error)

func NewEventPool

func NewEventPool(host string) *eventPool

Types

type Authenticator

type Authenticator interface {
	TokenForUser(username, password string) (string, error)
	AuthenticateContext(context.Context) (context.Context, error)
}

func NewAuthenticator

func NewAuthenticator(us store.UserStore, key string) Authenticator

type Config

type Config struct {
	Host struct {
		Http string `yaml:"http,omitempty"`
		Grpc string `yaml:"grpc,omitempty"`
	} `yaml:"host,omitempty"`
	Port struct {
		Secure   uint `yaml:"secure,omitempty"`
		InSecure uint `yaml:"insecure,omitempty"`
	}
	UsersFile          string                           `yaml:"users-file,omitempty"`
	ExercisesFile      string                           `yaml:"exercises-file,omitempty"`
	FrontendsFile      string                           `yaml:"frontends-file,omitempty"`
	OvaDir             string                           `yaml:"ova-directory,omitempty"`
	LogDir             string                           `yaml:"log-directory,omitempty"`
	EventsDir          string                           `yaml:"events-directory,omitempty"`
	DockerRepositories []dockerclient.AuthConfiguration `yaml:"docker-repositories,omitempty"`
	SigningKey         string                           `yaml:"sign-key,omitempty"`
	TLS                struct {
		Enabled   bool   `yaml:"enabled"`
		Directory string `yaml:"directory"`
		ACME      struct {
			Email       string `yaml:"email"`
			ApiKey      string `yaml:"api-key"`
			Development bool   `yaml:"development"`
		} `yaml:"acme"`
	} `yaml:"tls,omitempty"`
}

func NewConfigFromFile

func NewConfigFromFile(path string) (*Config, error)

type MissingConfigErr

type MissingConfigErr struct {
	Option string
}

func (*MissingConfigErr) Error

func (m *MissingConfigErr) Error() string

type MngtPortErr

type MngtPortErr struct {
	// contains filtered or unexported fields
}

func (*MngtPortErr) Error

func (m *MngtPortErr) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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