todo

package
v0.0.0-...-8d44b86 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2020 License: MIT Imports: 6 Imported by: 0

README

todo

待办事项的API处理

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(req *AddRequest) (err error)

Add 增加待办事项

func Del

func Del(req *DelRequest) (err error)

Del 删除待办事项

func Delay

func Delay(req *DelayRequest) (err error)

Delay 延期待办

func Done

func Done(req *DoneRequest) (err error)

Done 完成待办事项

func SetAuthorizeHandle

func SetAuthorizeHandle(auh *asapi.AuthorizeHandle)

SetAuthorizeHandle 设置授权处理

func SetMQTTClient

func SetMQTTClient(mqcfg *MQTTConfig)

SetMQTTClient 设置MQTT客户端

func SetMQTTClienter

func SetMQTTClienter(cli client.MqttClienter)

SetMQTTClienter 设置MQTT客户端

Types

type AddRequest

type AddRequest struct {
	UIDs         []string
	BuID         string
	TodoType     string
	ContentValue map[string]string
	URIValue     map[string]string
	PushValue    map[string]string
	PubTime      time.Time
	EndTime      time.Time
	Status       int
	Service      string
}

AddRequest 增加待办事项请求参数

type DelRequest

type DelRequest struct {
	UID      string
	BuID     string
	TodoType string
}

DelRequest 删除待办事项请求参数

type DelayRequest

type DelayRequest struct {
	BuID     string
	TodoType string
	EndTime  time.Time
}

DelayRequest 延期待办请求参数

type DoneRequest

type DoneRequest struct {
	UID      string
	BuID     string
	TodoType string
}

DoneRequest 完成待办事项请求参数

type Handle

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

Handle 待办事项处理

func NewHandle

func NewHandle(auh *asapi.AuthorizeHandle, mqcli client.MqttClienter) *Handle

NewHandle 创建待办事项处理

func (*Handle) Add

func (h *Handle) Add(req *AddRequest) (err error)

Add 增加待办事项

func (*Handle) Del

func (h *Handle) Del(req *DelRequest) (err error)

Del 删除待办事项

func (*Handle) Delay

func (h *Handle) Delay(req *DelayRequest) (err error)

Del 延期待办

func (*Handle) Done

func (h *Handle) Done(req *DoneRequest) (err error)

Done 完成待办事项

type MQTTConfig

type MQTTConfig struct {
	BrokerAddress     string
	ClientID          string
	Timeout           uint16
	CleanSession      bool
	ReconnectInterval int
	Username          string
	PasswordHandler   func() string
	EnableTLS         bool
}

MQTTConfig mqtt配置参数

Jump to

Keyboard shortcuts

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