Documentation ¶
Index ¶
- func NewTokenBoardServer(store storage.MessageStoreInterface, tokenService *privacypass.TokenServer) tapir.Application
- type Config
- type Reporting
- type Server
- func (s *Server) CheckStatus() (bool, error)
- func (s *Server) ConfigureAutostart(autostart bool)
- func (s *Server) GetStatistics() Statistics
- func (s *Server) Identity() primitives.Identity
- func (s *Server) KeyBundle() *model.KeyBundle
- func (s *Server) Run(acn connectivity.ACN) error
- func (s *Server) Setup(serverConfig Config)
- func (s *Server) Shutdown()
- type Statistics
- type TokenboardServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTokenBoardServer ¶ added in v0.4.0
func NewTokenBoardServer(store storage.MessageStoreInterface, tokenService *privacypass.TokenServer) tapir.Application
NewTokenBoardServer generates new Server for Token Board
Types ¶
type Config ¶
type Config struct { ConfigDir string `json:"-"` FilePath string `json:"-"` MaxBufferLines int `json:"maxBufferLines"` PublicKey ed25519.PublicKey `json:"publicKey"` PrivateKey ed25519.PrivateKey `json:"privateKey"` TokenServerPublicKey ed25519.PublicKey `json:"tokenServerPublicKey"` TokenServerPrivateKey ed25519.PrivateKey `json:"tokenServerPrivateKey"` ServerReporting Reporting `json:"serverReporting"` AutoStart bool `json:"autostart"` }
Config is a struct for storing basic server configuration
func LoadConfig ¶
LoadConfig loads a Config from a json file specified by filename
func (*Config) Identity ¶
func (config *Config) Identity() primitives.Identity
Identity returns an encapsulation of the servers keys
func (*Config) TokenServiceIdentity ¶ added in v0.4.0
func (config *Config) TokenServiceIdentity() primitives.Identity
TokenServiceIdentity returns an encapsulation of the servers token server (experimental)
type Reporting ¶
type Reporting struct { LogMetricsToFile bool `json:"logMetricsToFile"` ReportingGroupID string `json:"reportingGroupId"` ReportingServerAddr string `json:"reportingServerAddr"` }
Reporting is a struct for storing a the config a server needs to be a peer, and connect to a group to report
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server encapsulates a complete, compliant Cwtch server.
func (*Server) CheckStatus ¶ added in v0.4.7
CheckStatus returns true if the server is running and/or an error if any part of the server needs to be restarted.
func (*Server) ConfigureAutostart ¶ added in v0.4.7
ConfigureAutostart sets whether this server should autostart (in the Cwtch UI/bundling application)
func (*Server) GetStatistics ¶ added in v0.4.7
func (s *Server) GetStatistics() Statistics
GetStatistics is a stub method for providing some high level information about the server operation to bundling applications (e.g. the UI)
func (*Server) Identity ¶ added in v0.4.7
func (s *Server) Identity() primitives.Identity
Identity returns the main onion identity of the server
func (*Server) Run ¶
func (s *Server) Run(acn connectivity.ACN) error
Run starts a server with the given privateKey
type Statistics ¶ added in v0.4.7
type Statistics struct {
TotalMessages int
}
Statistics is an encapsulation of information about the server that an operator might want to know at a glance.
type TokenboardServer ¶ added in v0.4.0
type TokenboardServer struct { applications.AuthApp TokenService *privacypass.TokenServer LegacyMessageStore storage.MessageStoreInterface // contains filtered or unexported fields }
TokenboardServer defines the token board server
func (*TokenboardServer) Init ¶ added in v0.4.0
func (ta *TokenboardServer) Init(connection tapir.Connection)
Init initializes the cryptographic TokenBoardApp
func (*TokenboardServer) Listen ¶ added in v0.4.0
func (ta *TokenboardServer) Listen()
Listen processes the messages for this application
func (*TokenboardServer) NewInstance ¶ added in v0.4.0
func (ta *TokenboardServer) NewInstance() tapir.Application
NewInstance creates a new TokenBoardApp