BaseService

package
v5.1.19 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateService

func CreateService(args *ArgsCreateService) (id int64, err error)

CreateService 创建Service

func DeleteService

func DeleteService(args *ArgsDeleteService) (err error)

DeleteService 删除Service

func Init

func Init()

Init 初始化

func UpdateService

func UpdateService(args *ArgsUpdateService) (err error)

UpdateService 修改Service

Types

type ArgsCreateService

type ArgsCreateService struct {
	//过期时间
	ExpireAt time.Time `db:"expire_at" json:"expireAt"`
	//名称
	Name string `db:"name" json:"name" check:"des" min:"1" max:"300"`
	//描述
	Description string `db:"description" json:"description" check:"des" min:"1" max:"500" empty:"true"`
	//事件订阅方式
	// server 服务器订阅; client 客户端订阅; all 服务器和客户端都订阅
	EventSubType string `db:"event_sub_type" json:"eventSubType" check:"intThan0"`
	//事件编码
	Code string `db:"code" json:"code" check:"des" min:"1" max:"300"`
	//事件类型
	// nats - NATS事件
	EventType string `db:"event_type" json:"eventType" check:"intThan0"`
	//事件地址
	// nats - 触发的地址
	EventURL string `db:"event_url" json:"eventURL" check:"des" min:"1" max:"600"`
	//事件固定参数
	// nats - 事件附带的固定参数,如果为空则根据流程阶段事件触发填入
	EventParams string `db:"event_params" json:"eventParams" check:"des" min:"1" max:"1000" empty:"true"`
}

ArgsCreateService 创建Service参数

type ArgsDeleteService

type ArgsDeleteService struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
}

ArgsDeleteService 删除Service参数

type ArgsGetServiceByID

type ArgsGetServiceByID struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
}

ArgsGetServiceByID 获取Service数据包参数

type ArgsGetServiceList

type ArgsGetServiceList struct {
	//分页参数
	Pages CoreSQL2.ArgsPages `json:"pages"`
	//事件编码
	Code string `db:"code" json:"code" check:"des" min:"1" max:"300" empty:"true"`
	//是否删除
	IsRemove bool `json:"isRemove" check:"bool"`
	//搜索
	Search string `json:"search" check:"search" empty:"true"`
}

ArgsGetServiceList 获取服务列表参数

type ArgsUpdateService

type ArgsUpdateService struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
	//过期时间
	ExpireAt time.Time `db:"expire_at" json:"expireAt"`
	//名称
	Name string `db:"name" json:"name" check:"des" min:"1" max:"300"`
	//描述
	Description string `db:"description" json:"description" check:"des" min:"1" max:"500" empty:"true"`
	//事件订阅方式
	// server 服务器订阅; client 客户端订阅; all 服务器和客户端都订阅
	EventSubType string `db:"event_sub_type" json:"eventSubType" check:"intThan0"`
	//事件编码
	Code string `db:"code" json:"code" check:"des" min:"1" max:"300"`
	//事件类型
	// nats - NATS事件
	EventType string `db:"event_type" json:"eventType" check:"intThan0"`
	//事件地址
	// nats - 触发的地址
	EventURL string `db:"event_url" json:"eventURL" check:"des" min:"1" max:"600"`
	//事件固定参数
	// nats - 事件附带的固定参数,如果为空则根据流程阶段事件触发填入
	EventParams string `db:"event_params" json:"eventParams" check:"des" min:"1" max:"1000" empty:"true"`
}

ArgsUpdateService 修改Service参数

type FieldsAnalysis

type FieldsAnalysis struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
	//创建时间
	// 每小时创建一次
	CreateAt time.Time `db:"create_at" json:"createAt"`
	//服务ID
	ServiceID int64 `db:"service_id" json:"serviceID" check:"id"`
	//服务端发送消息次数
	SendCount int `db:"send_count" json:"sendCount" check:"intThan0"`
	//服务端接收次数
	ReceiveCount int `db:"receive_count" json:"receiveCount" check:"intThan0"`
}

FieldsAnalysis 服务统计

type FieldsService

type FieldsService struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
	//创建时间
	CreateAt time.Time `db:"create_at" json:"createAt"`
	//更新时间
	UpdateAt time.Time `db:"update_at" json:"updateAt"`
	//删除时间
	DeleteAt time.Time `db:"delete_at" json:"deleteAt"`
	//过期时间
	ExpireAt time.Time `db:"expire_at" json:"expireAt"`
	//名称
	Name string `db:"name" json:"name" check:"des" min:"1" max:"300"`
	//描述
	Description string `db:"description" json:"description" check:"des" min:"1" max:"500" empty:"true"`
	//事件订阅方式
	// server 服务器订阅; client 客户端订阅; all 服务器和客户端都订阅
	EventSubType string `db:"event_sub_type" json:"eventSubType" check:"intThan0"`
	//事件编码
	Code string `db:"code" json:"code" check:"des" min:"1" max:"300"`
	//事件类型
	// nats - NATS事件
	EventType string `db:"event_type" json:"eventType" check:"intThan0"`
	//事件地址
	// nats - 触发的地址
	EventURL string `db:"event_url" json:"eventURL" check:"des" min:"1" max:"600"`
	//事件固定参数
	// nats - 事件附带的固定参数,如果为空则根据流程阶段事件触发填入
	EventParams string `db:"event_params" json:"eventParams" check:"des" min:"1" max:"1000" empty:"true"`
}

FieldsService 服务信息

func GetServiceByID

func GetServiceByID(args *ArgsGetServiceByID) (data FieldsService, err error)

GetServiceByID 获取Service数

func GetServiceList

func GetServiceList(args *ArgsGetServiceList) (dataList []FieldsService, dataCount int64, err error)

GetServiceList 获取服务列表

Jump to

Keyboard shortcuts

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