server

package
v0.0.0-...-0355654 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Server struct {
		Port     string `yaml:"port" env:"PORT" env-default:"2324"`
		Host     string `yaml:"host" env:"HOST" env-default:""`
		LogLevel string `yaml:"loglevel" env:"LOGLEVEL" env-default:"ERROR"`
		LiveURL  string `yaml:"liveURL" env:"LIVEURL" env-default:"https://athle.live"`
	} `yaml:"server"`
	Mode        string `yaml:"mode" env:"LVC_MODE" env-default:"cl"`
	Directories struct {
		CLRootDir string `yaml:"clrootdir" env:"CLROOTDIR" env-default:""`
		CSVDir    string `yaml:"cvsdir" env:"CVSDIR" env-default:""`
	} `yaml:"directories"`
}

Config configuration variables

type JSONBodyChallenge

type JSONBodyChallenge struct {
	Token    string    `json:"token"`
	ChOID    string    `json:"chOID"`
	Date     time.Time `json:"date"`
	Duration int       `json:"duration"`
}

JSONBodyChallenge params

type JSONConfig

type JSONConfig struct {
	LiveURL   string `json:"liveURL"`
	Mode      string `json:"mode"`
	CLRootDir string `json:"clRootDir"`
	CVSDir    string `json:"cvsDir"`
}

JSONConfig config for GUI

type JSONLogs

type JSONLogs struct {
	Logs []shared.JSONLog `json:"logs"`
}

JSONLogs logs

type Server

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

Server server

func New

func New(altLogger *shared.AltLogger, cfg *Config) (*Server, error)

New new

func (*Server) StartServer

func (s *Server) StartServer()

StartServer start server

func (*Server) StopServer

func (s *Server) StopServer()

StopServer stop server

Jump to

Keyboard shortcuts

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