deviceauthlogic

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AccessMap = map[string]devices.Direction{
		devices.Pub: devices.Up,
		devices.Sub: devices.Down,
	}
	AccessToActionMap = map[string]string{
		devices.Pub: "publish",
		devices.Sub: "subscribe",
	}
)

Functions

This section is empty.

Types

type AccessAuthLogic

type AccessAuthLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewAccessAuthLogic

func NewAccessAuthLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AccessAuthLogic

func (*AccessAuthLogic) AccessAuth

func (l *AccessAuthLogic) AccessAuth(in *dg.AccessAuthReq) (*dg.Response, error)

设备操作认证

func (*AccessAuthLogic) Auth

func (l *AccessAuthLogic) Auth(in *dg.AccessAuthReq) (err error)

func (*AccessAuthLogic) DeviceSelfAuth

func (l *AccessAuthLogic) DeviceSelfAuth(in *dg.AccessAuthReq) (err error)

DeviceSelfAuth 设备自己的topic认证

func (*AccessAuthLogic) SubSetAuth

func (l *AccessAuthLogic) SubSetAuth(in *dg.AccessAuthReq,
	ld *deviceAuth.LoginDevice, ti *devices.TopicInfo) (err error)

SubSetAuth 网关代理子设备topic校验

type DeviceRegisterLogic

type DeviceRegisterLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewDeviceRegisterLogic

func NewDeviceRegisterLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeviceRegisterLogic

func (*DeviceRegisterLogic) DeviceRegister

设备动态注册

type DeviceRegisterPayload

type DeviceRegisterPayload struct {
	EncryptionType int    `json:"encryptionType"` //加密类型,1表示证书认证,2表示签名认证
	Psk            string `json:"psk"`            //设备密钥,当产品认证类型为签名认证时有此参数。
	ClientCert     string `json:"clientCert"`     //设备证书文件字符串格式,当产品认证类型为证书认证时有此参数
	ClientKey      string `json:"clientKey"`      //设备私钥文件字符串格式,当产品认证类型为证书认证时有此参数
}

type LoginAuthLogic

type LoginAuthLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewLoginAuthLogic

func NewLoginAuthLogic(ctx context.Context, svcCtx *svc.ServiceContext) *LoginAuthLogic

func (*LoginAuthLogic) LoginAuth

func (l *LoginAuthLogic) LoginAuth(in *dg.LoginAuthReq) (*dg.Response, error)

设备登录认证

Jump to

Keyboard shortcuts

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