web

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action uint8
const (
	// REGISTER 注册
	REGISTER Action = 1
	// UNREGISTER 注销
	UNREGISTER Action = 2
)

func (Action) ToUint8

func (s Action) ToUint8() uint8

type DeleteRunnerReq

type DeleteRunnerReq struct {
	Id int64 `json:"id"`
}

type Handler

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

func NewHandler

func NewHandler(svc service.Service, workerSvc worker.Service, codebookSvc codebook.Service) *Handler

func (*Handler) DeleteRunner

func (h *Handler) DeleteRunner(ctx *gin.Context, req DeleteRunnerReq) (ginx.Result, error)

func (*Handler) ListRunner

func (h *Handler) ListRunner(ctx *gin.Context, req ListRunnerReq) (ginx.Result, error)

func (*Handler) ListTags

func (h *Handler) ListTags(ctx *gin.Context) (ginx.Result, error)

func (*Handler) PrivateRoutes added in v1.3.0

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

func (*Handler) Register

func (h *Handler) Register(ctx *gin.Context, req RegisterRunnerReq) (ginx.Result, error)

func (*Handler) UpdateRunner

func (h *Handler) UpdateRunner(ctx *gin.Context, req UpdateRunnerReq) (ginx.Result, error)

type ListRunnerReq

type ListRunnerReq struct {
	Page
}

type Page

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

type RegisterRunnerReq

type RegisterRunnerReq struct {
	Name           string      `json:"name"`
	CodebookUid    string      `json:"codebook_uid"`
	CodebookSecret string      `json:"codebook_secret"`
	WorkerName     string      `json:"worker_name"`
	Tags           []string    `json:"tags"`
	Desc           string      `json:"desc"`
	Variables      []Variables `json:"variables"`
}

type RetrieveRunnerTags

type RetrieveRunnerTags struct {
	RunnerTags []RunnerTags `json:"runner_tags"`
}

type RetrieveWorkers

type RetrieveWorkers struct {
	Total   int64    `json:"total"`
	Runners []Runner `json:"runners"`
}

type Runner

type Runner struct {
	Id          int64       `json:"id"`
	Name        string      `json:"name"`
	CodebookUid string      `json:"codebook_uid"`
	WorkerName  string      `json:"worker_name"`
	Tags        []string    `json:"tags"`
	Variables   []Variables `json:"variables"`
	Desc        string      `json:"desc"`
}

type RunnerTags

type RunnerTags struct {
	CodebookUid string   `json:"codebook_uid"`
	Tags        []string `json:"tags"`
}

type UpdateRunnerReq

type UpdateRunnerReq struct {
	Id             int64       `json:"id"`
	Name           string      `json:"name"`
	CodebookUid    string      `json:"codebook_uid"`
	CodebookSecret string      `json:"codebook_secret"`
	WorkerName     string      `json:"worker_name"`
	Tags           []string    `json:"tags"`
	Desc           string      `json:"desc"`
	Variables      []Variables `json:"variables"`
}

type Variables

type Variables struct {
	Key    string `json:"key"`
	Value  any    `json:"value"`
	Secret bool   `json:"secret"`
}

Jump to

Keyboard shortcuts

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