rcon

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2018 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VerifySignature

func VerifySignature(key *rsa.PublicKey, message proto.Message, signature []byte) error

Types

type AutoRefClient

type AutoRefClient struct {
	*Client
}

type AutoRefServer

type AutoRefServer struct {
	ProcessRequest func(string, refproto.AutoRefToController) error
	*Server
}

func NewAutoRefServer

func NewAutoRefServer() (s *AutoRefServer)

type Client

type Client struct {
	Id                 string
	Conn               net.Conn
	Token              string
	PubKey             *rsa.PublicKey
	VerifiedConnection bool
}

func (*Client) Ok

func (c *Client) Ok() (reply refproto.ControllerReply)

func (*Client) Reject

func (c *Client) Reject(reason string) (reply refproto.ControllerReply)

func (*Client) SendRequest

func (c *Client) SendRequest(request refproto.ControllerToTeam) error

type Server

type Server struct {
	Clients           map[string]*Client
	TrustedKeys       map[string]*rsa.PublicKey
	ConnectionHandler func(net.Conn)
}

func NewServer

func NewServer() (s *Server)

func (*Server) CloseConnection

func (s *Server) CloseConnection(conn net.Conn, id string)

func (*Server) Listen

func (s *Server) Listen(address string)

func (*Server) ListenTls added in v0.22.0

func (s *Server) ListenTls(address string)

func (*Server) LoadTrustedKeys

func (s *Server) LoadTrustedKeys(trustedKeysDir string)

type TeamClient

type TeamClient struct {
	*Client
}

type TeamServer

type TeamServer struct {
	ProcessTeamRequest func(teamName string, request refproto.TeamToController) error
	AllowedTeamNames   []string
	*Server
}

func NewTeamServer

func NewTeamServer() (s *TeamServer)

func (*TeamServer) SendRequest

func (s *TeamServer) SendRequest(teamName string, request refproto.ControllerToTeam) error

Jump to

Keyboard shortcuts

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