handler

package
v0.0.0-...-11e3e77 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package internal Save some status during system initialization only for handler paclage use.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Metrics

func Metrics(ctx context.Context, c *app.RequestContext)

Metrics .

func Ping

func Ping(ctx context.Context, c *app.RequestContext)

Ping .

Types

type BaseMsg

type BaseMsg struct {
	Message string `json:"message"`
}

type Controller

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

Controller app global variable controller. Dependency injection instead of global variables

func NewController

func NewController() (*Controller, error)

func (*Controller) AccessLog

func (ctrl *Controller) AccessLog(ctx context.Context, c *app.RequestContext)

func (*Controller) CreateAction

func (ctrl *Controller) CreateAction(ctx context.Context, c *app.RequestContext)

CreateAction create new action request.

func (*Controller) DeleteAction

func (ctrl *Controller) DeleteAction(ctx context.Context, c *app.RequestContext)

DeleteAction

func (*Controller) DeleteActions

func (ctrl *Controller) DeleteActions(ctx context.Context, c *app.RequestContext)

DeleteActions

func (*Controller) FindAction

func (ctrl *Controller) FindAction(ctx context.Context, c *app.RequestContext)

GetAction

func (*Controller) ListActions

func (ctrl *Controller) ListActions(ctx context.Context, c *app.RequestContext)

ListActions list some actions.

func (*Controller) Porxy

func (ctrl *Controller) Porxy(ctx context.Context, c *app.RequestContext)

func (*Controller) RetaLimit

func (ctrl *Controller) RetaLimit(ctx context.Context, c *app.RequestContext)

RetaLimit 全局速率中间件.

func (*Controller) SetLogID

func (ctrl *Controller) SetLogID(ctx context.Context, c *app.RequestContext)

func (*Controller) UpdateAction

func (ctrl *Controller) UpdateAction(ctx context.Context, c *app.RequestContext)

UpdateAction

type CreateActionRequest

type CreateActionRequest struct {
	*dal.Action
}

type CreateActionResponse

type CreateActionResponse struct {
	BaseMsg
}

type DeleteActionResponse

type DeleteActionResponse struct {
	BaseMsg
}

type DeleteActionsRequest

type DeleteActionsRequest struct {
	IDs []primitive.ObjectID `json:"ids"`
}

type DeleteActionsResponse

type DeleteActionsResponse struct {
	BaseMsg
}

type Error

type Error struct {
	Code int `json:"code"`
	BaseMsg
}

type GetActionResponse

type GetActionResponse struct {
	*dal.Action
}

type ListActionsRequest

type ListActionsRequest struct {
	PapeSize int64 `query:"page_size"`
	PageNum  int64 `query:"page_num"`
}

type ListActionsResponse

type ListActionsResponse struct {
	Actions *[]dal.Action `json:"actions"`
	Totals  int           `json:"totals"`
}

type ResponseMetadata

type ResponseMetadata struct {
	RequestID string `json:"request_id"`
	Error     *Error `json:"error,omitempty"`
}

type UpdateActionRequest

type UpdateActionRequest struct {
	*dal.Action
}

type UpdateActionResponse

type UpdateActionResponse struct {
	BaseMsg
}

Jump to

Keyboard shortcuts

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