server

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthDigest = "digest"
	AuthNone   = "none"
)

Variables

View Source
var Config struct {
	Host          string `env:"API_HOST"`
	Port          uint16 `env:"API_PORT, default=7547"`
	ACSURL        string `env:"ACS_URL, required"`
	SerialNumber  string `env:"SERIAL_NUMBER, required"`
	DataModelPath string `env:"DATAMODEL_PATH, required"`
	StateFilePath string `env:"STATE_PATH, default=state.json"`
	ACSAuth       string `env:"ACS_AUTH, default=none"`
	ACSUsername   string `env:"ACS_USERNAME"`
	ACSPassword   string `env:"ACS_PASSWORD"`
	LogLevel      string `env:"LOG_LEVEL, default=info"`
}
View Source
var ErrNoCreds = errors.New("username/password missing")

Functions

func LoadConfig

func LoadConfig(ctx context.Context) error

Types

type Server

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

func New

func New(dm *datamodel.DataModel) *Server

func (*Server) Inform

func (s *Server) Inform()

func (*Server) ResetInformTimer

func (s *Server) ResetInformTimer()

func (*Server) Start

func (s *Server) Start() error

func (*Server) Stop

func (s *Server) Stop(ctx context.Context) error

func (*Server) URL

func (s *Server) URL() string

Jump to

Keyboard shortcuts

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