Documentation
¶
Index ¶
- type CreateRequest
- type DeleteRequest
- type GetRequest
- type Handler
- func (h *Handler) Create(c *app.Context, req CreateRequest) (api.Created[models.UserGroup], error)
- func (h *Handler) Delete(c *app.Context, req DeleteRequest) (api.StatusResponse, error)
- func (h *Handler) Get(c *app.Context, req GetRequest) (Item, error)
- func (h *Handler) List(c *app.Context, req ListRequest) (api.PaginatedResponse[Item], error)
- func (h *Handler) Update(c *app.Context, req UpdateRequest) (api.StatusResponse, error)
- type Item
- type ListRequest
- type UpdateRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateRequest ¶
type CreateRequest struct {
Name string `json:"name" binding:"required,max=64"`
Description string `json:"description" binding:"max=255"`
Status int `json:"status"`
AllowedChannelIDs *[]uint `json:"allowed_channel_ids"`
Models string `json:"models"`
BYOKEnabled *bool `json:"byok_enabled"`
BYOKMaxChannels *int `json:"byok_max_channels"`
}
type DeleteRequest ¶
type DeleteRequest struct {
ID string `uri:"id" binding:"required"`
}
type GetRequest ¶
type GetRequest struct {
ID string `uri:"id" binding:"required"`
}
type Handler ¶
func (*Handler) Delete ¶
func (h *Handler) Delete(c *app.Context, req DeleteRequest) (api.StatusResponse, error)
func (*Handler) List ¶
func (h *Handler) List(c *app.Context, req ListRequest) (api.PaginatedResponse[Item], error)
func (*Handler) Update ¶
func (h *Handler) Update(c *app.Context, req UpdateRequest) (api.StatusResponse, error)
type ListRequest ¶
type ListRequest struct {
api.PaginationQuery
Search string `form:"search"`
Status string `form:"status"`
}
type UpdateRequest ¶
type UpdateRequest struct {
ID string `uri:"id" binding:"required"`
Fields map[string]any `json:"-"`
}
func (*UpdateRequest) SetBodyMap ¶
func (r *UpdateRequest) SetBodyMap(fields map[string]any)
Click to show internal directories.
Click to hide internal directories.