rcon

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2018 License: GPL-3.0 Imports: 15 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(refproto.AutoRefToControllerRequest) error
	*Server
}

func NewAutoRefServer

func NewAutoRefServer() (s *AutoRefServer)

type Client

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

func (*Client) Ok

func (c *Client) Ok()

func (*Client) Reject

func (c *Client) Reject(reason string)

func (*Client) SendRequest

func (c *Client) SendRequest(request refproto.ControllerToTeamRequest) 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) error

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.TeamToControllerRequest) error
	AllowedTeamNames   []string
	*Server
}

func NewTeamServer

func NewTeamServer() (s *TeamServer)

func (*TeamServer) SendRequest

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

Jump to

Keyboard shortcuts

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