web

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoint

type Endpoint struct {
	Id           int64  `json:"id"`
	Path         string `json:"path"`
	Method       string `json:"method"`
	Resource     string `json:"resource"`
	Desc         string `json:"desc"`
	IsAuth       bool   `json:"is_auth"`
	IsAudit      bool   `json:"is_audit"`
	IsPermission bool   `json:"is_permission"`
}

type FilterPathReq

type FilterPathReq struct {
	Page
	Path string `json:"path"`
}

type Handler

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

func NewHandler

func NewHandler(svc service.Service) *Handler

func (*Handler) ListEndpoint

func (h *Handler) ListEndpoint(ctx *gin.Context, req FilterPathReq) (ginx.Result, error)

func (*Handler) PrivateRoutes

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

func (*Handler) RegisterEndpoint

func (h *Handler) RegisterEndpoint(ctx *gin.Context, req RegisterEndpointReq) (ginx.Result, error)

func (*Handler) RegisterMutilEndpoint

func (h *Handler) RegisterMutilEndpoint(ctx *gin.Context, req RegisterEndpointsReq) (ginx.Result, error)

type Page

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

type RegisterEndpointReq

type RegisterEndpointReq struct {
	Path         string `bson:"path"`
	Method       string `bson:"method"`
	Resource     string `bson:"resource"`
	Desc         string `bson:"desc"`
	IsAuth       bool   `bson:"is_auth"`
	IsAudit      bool   `bson:"is_audit"`
	IsPermission bool   `bson:"is_permission"`
}

type RegisterEndpointsReq

type RegisterEndpointsReq struct {
	RegisterEndpoint []RegisterEndpointReq `json:"register_endpoint"`
}

type RetrieveEndpoints

type RetrieveEndpoints struct {
	Endpoints []Endpoint `json:"endpoints"`
	Total     int64      `json:"total"`
}

Jump to

Keyboard shortcuts

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