apis

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthAccepted     = mqttcodec.Accepted
	AuthUnauthorized = mqttcodec.RefusedNotAuthorized
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PublishCallbackFunc

type PublishCallbackFunc func(*PublishRequest, *PublishResponse)

type PublishID

type PublishID interface{}

PublishID is optional identifier for a particular message assigned by broker It can be complete in case of fire and forget delivery

type PublishRequest

type PublishRequest struct {
	Dup       bool
	Qos       byte
	Retain    bool
	TopicName string
	MessageID uint16
	Message   []byte
}

type PublishResponse

type PublishResponse struct {
	ID    PublishID
	Error error
}

type Publisher

type Publisher interface {
	Name() string
	Publish(context.Context, *PublishRequest) (*PublishResponse, error)
	PublishAsync(context.Context, *PublishRequest, PublishCallbackFunc) error
	Serve() error
	Shutdown(err error)
	Close() error
}

type PublisherFactory

type PublisherFactory interface {
	New(params []string) (Publisher, error)
}

type UserPasswordAuthRequest

type UserPasswordAuthRequest struct {
	Username string
	Password string
}

type UserPasswordAuthResponse

type UserPasswordAuthResponse struct {
	ReturnCode byte
}

type UserPasswordAuthenticator

type UserPasswordAuthenticator interface {
	Name() string
	Login(context.Context, *UserPasswordAuthRequest) (*UserPasswordAuthResponse, error)
	Close() error
}

type UserPasswordAuthenticatorFactory

type UserPasswordAuthenticatorFactory interface {
	New(params []string) (UserPasswordAuthenticator, error)
}

Jump to

Keyboard shortcuts

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