emqx

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Provides = wire.NewSet(
	wire.Struct(new(Controller), "*"),
	wire.Struct(new(Service), "*"),
)

Functions

This section is empty.

Types

type AclDto

type AclDto struct {
	Identity string `json:"identity" vd:"mongodb"`
	Topic    string `json:"topic" vd:"required"`
}

type AuthDto

type AuthDto struct {
	Identity string `json:"identity" vd:"required"`
	Token    string `json:"token" vd:"required"`
}

type BridgeDto

type BridgeDto struct {
	Client  string `json:"client" vd:"required"`
	Topic   string `json:"topic" vd:"required"`
	Payload M      `json:"payload" vd:"required,gt=0"`
}

type Controller

type Controller struct {
	EmqxService *Service
}

func (*Controller) Acl

func (x *Controller) Acl(ctx context.Context, c *app.RequestContext)

func (*Controller) Auth

func (x *Controller) Auth(ctx context.Context, c *app.RequestContext)

func (*Controller) Bridge

func (x *Controller) Bridge(ctx context.Context, c *app.RequestContext)

type M

type M = map[string]interface{}

type Service

type Service struct {
	*common.Inject
}

func (*Service) Acl

func (x *Service) Acl(ctx context.Context, dto AclDto) (err error)

func (*Service) Auth

func (x *Service) Auth(ctx context.Context, dto AuthDto) (err error)

func (*Service) Bridge

func (x *Service) Bridge(ctx context.Context, dto BridgeDto) (err error)

Jump to

Keyboard shortcuts

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