api

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2024 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	// contains filtered or unexported fields
}

func NewAPI

func NewAPI(sessions *session.Registry, logger internal.Logger, authentication Authentication) *API

func (*API) Accept

func (a *API) Accept() error

func (*API) Close

func (a *API) Close() error

func (*API) Listen

func (a *API) Listen(addr string) error

type Authentication added in v0.0.4

type Authentication interface {
	Authenticate(token string) bool
}

type Client added in v0.0.11

type Client struct {
	// contains filtered or unexported fields
}

func NewClient added in v0.0.11

func NewClient(conn net.Conn, pool packet.Pool) *Client

func (*Client) Close added in v0.0.12

func (c *Client) Close() error

func (*Client) ReadPacket added in v0.0.11

func (c *Client) ReadPacket() (pk packet.Packet, err error)

func (*Client) WritePacket added in v0.0.11

func (c *Client) WritePacket(pk packet.Packet) error

type SecretBasedAuthentication added in v0.0.5

type SecretBasedAuthentication struct {
	// contains filtered or unexported fields
}

func NewSecretBasedAuthentication added in v0.0.5

func NewSecretBasedAuthentication(secret string) *SecretBasedAuthentication

func (*SecretBasedAuthentication) Authenticate added in v0.0.5

func (authentication *SecretBasedAuthentication) Authenticate(token string) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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