config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VERSION = "v0.0.1"
	STAGE   = "beta"
)

Variables

View Source
var (
      __        __            __
     /\__\     /\  \         /\__\
    /:/  /    /::\  \       /:/  /
   /:/  /    /:/\:\  \     /:/  / 
  /:/  /    /::\ \:\  \   /:/  /  
 /:/__/    /:/\:\_\:\__\ /:/__/   @iNvist
 \:\  \    \:\ \/_/\/__/ \:\  \   https://editor.l3l.lol
  \:\  \    \:\  \        \:\  \  version: %s
   \:\__\    \:\__\        \:\__\ 
    \/__/     \/__/         \/__/	

`, VERSION)
)
View Source
var (
	ErrNoAuth = errors.New("No Auth specified")
)

Errors regarding configs

View Source
var (
	ErrNoDirSpecified = errors.New("No Dir specified")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Server  ServerConfig
	Project ProjectConfig

	// name of the operator necessary for instructions
	// TODO currently not used
	Operator string
}

Config contains all information which are used by LEL

type ProjectConfig

type ProjectConfig struct {
	NotesDir string

	ImageDir  string
	VideoDir  string
	MisatoDir string
	GraphDir  string
}

Project contains all information about the project paths this includes paths, where project relevant information are stored

func NewProjectConfig

func NewProjectConfig(notesDir string) *ProjectConfig

NewProjectConfig creates a new ProjectConfig, with a minimum requirements of specifying the notesDir

func (*ProjectConfig) Prepare

func (p *ProjectConfig) Prepare() (err error)

Prepare the path

func (*ProjectConfig) Valid

func (p *ProjectConfig) Valid() (err error)

Valid checks if the config is valid

type ServerConfig

type ServerConfig struct {
	ListenURL string
	StaticDir string
	Editor    string

	Debug        bool
	EnableUpload bool

	TLS      bool
	CertPath string
	Hostname string

	// TODO not implemented
	Auth map[string]string `yaml`

	// Mode of the ServerConfig
	// single, team
	Mode string
}

Server contains all information for the LEL server and API configuration

func (*ServerConfig) Prepare

func (s *ServerConfig) Prepare() (err error)

Prepare the ServerConfig

func (*ServerConfig) Valid

func (s *ServerConfig) Valid() error

Valid checks if the config is valid

Jump to

Keyboard shortcuts

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