Documentation
¶
Index ¶
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:"-"` 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"` }
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) Run ¶
func (s *Server) Run(acn connectivity.ACN)
Run starts a server with the given privateKey TODO: surface errors TODO: handle HUP/KILL signals to exit and close Tor gracefully TODO: handle user input to exit
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