Versions in this module Expand all Collapse all v1 v1.9.0 Mar 7, 2023 Changes in this version + var ErrInvalidAuthKey = errors.New("Invalid authKey") + var ErrInvalidPassword = errors.New("Invalid password") + type DataRequest struct + Data string + type DataResponse struct + Data string + type InitRequest struct + Name string + Password string + type InitResponse struct + AuthKey string + type LoginRequest struct + AuthKey string + Name string + Password string + type LoginResponse struct + Ok bool + type NameRequest struct + type NameResponse struct + Name string + type PingRequest struct + type PingResponse struct + type RequestProcessor struct + Name string + func NewRequestProcessor(server Server, pingFunc func(), name string) RequestProcessor + func (s *RequestProcessor) Decrypt(req DataRequest, response *DataResponse) error + func (s *RequestProcessor) Encrypt(req DataRequest, response *DataResponse) error + func (s *RequestProcessor) GetName(req NameRequest, response *NameResponse) error + func (s *RequestProcessor) Init(req InitRequest, response *InitResponse) error + func (s *RequestProcessor) Login(req LoginRequest, response *LoginResponse) error + func (s *RequestProcessor) Ping(req PingRequest, response *PingResponse) error + type Server struct + func InitServer(password string) (Server, error) + func NewServer(password, authkey string) (Server, error) + func (s Server) Decrypt(in []byte) ([]byte, error) + func (s Server) Encrypt(in []byte) ([]byte, error) + func (s Server) GetAuthKey() (string, error)