server

package
v0.0.0-...-7e023e1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: GPL-3.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TimeoutDuration = time.Second * 5

Functions

This section is empty.

Types

type AdminLockUserCreationReq

type AdminLockUserCreationReq struct {
	AdminLockUserCreation bool
}

type AdminLockUserCreationResp

type AdminLockUserCreationResp struct{}

type Config

type Config struct {
	SessionStore sessions.Store
	Templates    *template.Template
	UserStore    store.Factory
	TemplateNames
	ServiceSocket string
	core.Config
}

Config is used to create a Server. It holds all the configuration values. This follows the builder pattern instead of using a function that would take many arguments.

func (*Config) New

func (c *Config) New() (*Server, error)

New Server using the values from the Config.

type CreateUserReq

type CreateUserReq struct {
	Name, Password string
}

type CreateUserResp

type CreateUserResp struct {
	Error error
}

type GroupReq

type GroupReq struct {
	Name string
}

type GroupResp

type GroupResp struct {
	Error error
}

type ListGroupsReq

type ListGroupsReq struct{}

type ListGroupsResp

type ListGroupsResp []string

type ListUsersReq

type ListUsersReq struct{}

type ListUsersResp

type ListUsersResp []string

type RoutesReq

type RoutesReq struct {
}

type RoutesResp

type RoutesResp string

type Server

type Server struct {
	Users         *lusess.Store
	Settings      Settings
	Templates     *template.Template
	ServiceSocket string
	TemplateNames

	lerr.ErrHandler
	// contains filtered or unexported fields
}

Server runs a webserver.

func (*Server) Close

func (s *Server) Close() error

func (*Server) Run

func (s *Server) Run()

Run the server. If Socket or ServiceSocket is defined, they will be run as well.

func (*Server) RunServiceSocket

func (s *Server) RunServiceSocket() error

func (*Server) RunStdIO

func (s *Server) RunStdIO()

type SetPortReq

type SetPortReq struct {
	Port string
}

type SetPortResp

type SetPortResp struct{}

type Settings

type Settings struct {
	AdminLockUserCreation bool
}

type SettingsReq

type SettingsReq struct{}

type TemplateNames

type TemplateNames struct {
	SignIn       string
	Home         string
	HomeSignedIn string
}

type UserGroupReq

type UserGroupReq struct {
	User, Group string
}

type UserGroupResp

type UserGroupResp struct {
	Error error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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