middleware

package
v0.0.0-...-edd4e79 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

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

func NewAuth

func NewAuth(handler AuthHandler) *Auth

func (*Auth) Handle

func (a *Auth) Handle(client *client.Client, packet *packets.ControlPacket) error

type AuthHandler

type AuthHandler interface {
	Auth(method string, data []byte) error
}

type AuthPassword

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

func NewAuthPassword

func NewAuthPassword(auth PasswordAuth) *AuthPassword

func (*AuthPassword) Handle

func (p *AuthPassword) Handle(client *client.Client, packet *packets.ControlPacket) error

type ConnectHandle

type ConnectHandle = func(client *client.Client, connect *packets.Connect) error

type DisConnectHandle

type DisConnectHandle = func(client *client.Client, disconnect *packets.Disconnect) error

type OnceConnect

type OnceConnect struct {
}

func (*OnceConnect) Handle

func (o *OnceConnect) Handle(c *client.Client, packet *packets.ControlPacket) error

type PacketMiddleware

type PacketMiddleware interface {
	Handle(client *client.Client, packet *packets.ControlPacket) error
}

type PasswordAuth

type PasswordAuth interface {
	Auth(username, password string) bool
}

type ProtocolVersion

type ProtocolVersion struct {
}

func (*ProtocolVersion) Handle

func (p *ProtocolVersion) Handle(client *client.Client, packet *packets.ControlPacket) error

type UserAuth

type UserAuth = func(method string, authData []byte) bool

Jump to

Keyboard shortcuts

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