mattrax

package
v0.0.0-...-baca4c3 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version string = "0.0.0-development"

Version contains the Mattrax server version This varible's correct value is injected at build time

Functions

This section is empty.

Types

type Config

type Config struct {
	Port            int    `arg:"-p" help:"the port for the HTTPS webserver to listen on" placeholder:"443" default:"443"`
	Domain          string `arg:"-d" help:"the domain name the server is accessible on" placeholder:"mdm.example.com"`
	DBPath          string `help:"the path where the file database is stored" placeholder:"/var/mattrax.db" default:"/var/mattrax.db" graphql:"DBPath"`
	CertFile        string `arg:"--cert" help:"the path to the https certificate for the HTTPS webserver" placeholder:"/dont-put-your-cert-file-here.pem"`
	KeyFile         string `` /* 135-byte string literal not displayed */
	DevelopmentMode bool   `arg:"--dev" help:"enables verbose output and loosens security measures to aid developers" default:"false"`
}

Config holds the static server config These values are set by command line flags.

func (*Config) Verify

func (config *Config) Verify(p *arg.Parser)

Verify checks that the recieved values are valid and are what the server is expecting

func (Config) Version

func (config Config) Version() string

Version is used by go-args to show a custom version string.

type Server

type Server struct {
	Version      string // The Mattrax server version
	Config       Config // Config holds static varibles defined through Command Line flags. It is read only!
	Settings     *settings.Service
	Certificates *certificates.Service
	Devices      devices.Service

	// TODO Cleanup below
	UserService   types.UserService
	PolicyService types.PolicyService
}

Server holds the global server state

func NewMockServer

func NewMockServer(t *testing.T) *Server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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