web

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 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 Codebook

type Codebook struct {
	Id         int64  `json:"id"`
	Name       string `json:"name"`
	Identifier string `json:"identifier"`
	Code       string `json:"code"`
	Language   string `json:"language"`
	Secret     string `json:"secret"`
}

type CreateCodebookReq

type CreateCodebookReq struct {
	Name       string `json:"name"`
	Code       string `json:"code"`
	Language   string `json:"language"`
	Identifier string `json:"identifier"`
}

type DeleteCodebookReq

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

type DetailCodebookReq

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

type Handler

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

func NewHandler

func NewHandler(svc service.Service) *Handler

func (*Handler) CreateCodebook

func (h *Handler) CreateCodebook(ctx *gin.Context, req CreateCodebookReq) (ginx.Result, error)

func (*Handler) DeleteCodebook

func (h *Handler) DeleteCodebook(ctx *gin.Context, req DeleteCodebookReq) (ginx.Result, error)

func (*Handler) DetailCodebook

func (h *Handler) DetailCodebook(ctx *gin.Context, req DetailCodebookReq) (ginx.Result, error)

func (*Handler) ListCodebook

func (h *Handler) ListCodebook(ctx *gin.Context, req ListCodebookReq) (ginx.Result, error)

func (*Handler) PrivateRoutes added in v1.3.0

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

func (*Handler) UpdateCodebook

func (h *Handler) UpdateCodebook(ctx *gin.Context, req UpdateCodebookReq) (ginx.Result, error)

type ListCodebookReq

type ListCodebookReq struct {
	Page
}

type Page

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

type RetrieveCodebooks

type RetrieveCodebooks struct {
	Total     int64      `json:"total"`
	Codebooks []Codebook `json:"codebooks"`
}

type UpdateCodebookReq

type UpdateCodebookReq struct {
	Id       int64  `json:"id"`
	Name     string `json:"name"`
	Code     string `json:"code"`
	Language string `json:"language"`
}

Jump to

Keyboard shortcuts

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