Documentation
¶
Index ¶
- func CreateInTx(ctx dao.Context, apiServiceID uint, input CreateInput) (models.APIBackend, error)
- type CreateInput
- type CreateRequest
- type Handler
- func (h *Handler) Create(c *app.Context, req CreateRequest) (api.Created[ManagementResponse], error)
- func (h *Handler) Delete(c *app.Context, req IDRequest) (api.StatusResponse, error)
- func (h *Handler) Get(c *app.Context, req IDRequest) (ManagementResponse, error)
- func (h *Handler) List(c *app.Context, req ListRequest) (api.PaginatedResponse[ManagementResponse], error)
- func (h *Handler) Update(c *app.Context, req UpdateRequest) (api.StatusResponse, error)
- type IDRequest
- type ListRequest
- type ManagementResponse
- type UpdateRequest
- type UpstreamPublisher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateInTx ¶
func CreateInTx(ctx dao.Context, apiServiceID uint, input CreateInput) (models.APIBackend, error)
Types ¶
type CreateInput ¶
type CreateInput struct {
Name string `json:"name" binding:"required,max=64"`
}
type CreateRequest ¶
type CreateRequest struct {
APIServiceID uint `json:"api_service_id" binding:"required"`
CreateInput
}
type Handler ¶
type Handler struct {
App app.Application
Publisher UpstreamPublisher
}
func (*Handler) Create ¶
func (h *Handler) Create(c *app.Context, req CreateRequest) (api.Created[ManagementResponse], error)
func (*Handler) List ¶
func (h *Handler) List(c *app.Context, req ListRequest) (api.PaginatedResponse[ManagementResponse], error)
func (*Handler) Update ¶
func (h *Handler) Update(c *app.Context, req UpdateRequest) (api.StatusResponse, error)
type ListRequest ¶
type ListRequest struct {
api.PaginationQuery
APIServiceID *uint `form:"api_service_id"`
Search string `form:"search"`
}
type ManagementResponse ¶
type UpdateRequest ¶
type UpdateRequest struct {
ID string `uri:"id" binding:"required"`
Fields map[string]any `json:"-"`
}
func (*UpdateRequest) SetBodyMap ¶
func (r *UpdateRequest) SetBodyMap(v map[string]any)
type UpstreamPublisher ¶
Click to show internal directories.
Click to hide internal directories.