web

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

func NewHandler

func NewHandler(svc service.Service) *Handler

func (*Handler) ListWorker

func (h *Handler) ListWorker(ctx *gin.Context, req ListWorkerReq) (ginx.Result, error)

func (*Handler) PrivateRoutes added in v1.3.0

func (h *Handler) PrivateRoutes(server *gin.Engine)

func (*Handler) PushMessage

func (h *Handler) PushMessage(ctx *gin.Context, req PushMessageReq) (ginx.Result, error)

type ListWorkerReq

type ListWorkerReq struct {
	Page
}

type Page

type Page struct {
	Offset int64 `json:"offset,omitempty"`
	Limit  int64 `json:"limit,omitempty"`
}

type PushMessageReq

type PushMessageReq struct {
	Name     string `json:"name"`
	UUID     string `json:"uuid"`
	Language string `json:"language"`
	Code     string `json:"code"`
	Topic    string `json:"topic"`
}

type RetrieveWorkers

type RetrieveWorkers struct {
	Total   int64    `json:"total"`
	Workers []Worker `json:"workers"`
}

type Status

type Status uint8
const (
	// RUNNING 启用
	RUNNING Status = 1
	// STOPPING 停止
	STOPPING Status = 2
)

func (Status) ToUint8

func (s Status) ToUint8() uint8

type Worker

type Worker struct {
	Id     int64  `json:"id"`
	Name   string `json:"name"`
	Desc   string `json:"desc"`
	Topic  string `json:"topic"`
	Status Status `json:"status"`
}

Jump to

Keyboard shortcuts

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