Documentation
¶
Index ¶
- type CreateRequest
- type Handler
- func (h *Handler) Create(c *app.Context, req CreateRequest) (api.Created[models.AgentRoute], error)
- func (h *Handler) Delete(c *app.Context, req api.IDPathRequest) (api.StatusResponse, error)
- func (h *Handler) Get(c *app.Context, req api.IDPathRequest) (models.AgentRoute, error)
- func (h *Handler) List(c *app.Context, req ListRequest) (api.PaginatedResponse[models.AgentRoute], error)
- func (h *Handler) Overview(c *app.Context, req OverviewRequest) (api.PaginatedResponse[OverviewItem], error)
- func (h *Handler) Update(c *app.Context, req UpdateRequest) (models.AgentRoute, error)
- type ListRequest
- type OverviewItem
- type OverviewRequest
- type UpdateRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateRequest ¶
type Handler ¶
type Handler struct{}
func (*Handler) Create ¶
func (h *Handler) Create(c *app.Context, req CreateRequest) (api.Created[models.AgentRoute], error)
func (*Handler) Delete ¶
func (h *Handler) Delete(c *app.Context, req api.IDPathRequest) (api.StatusResponse, error)
func (*Handler) Get ¶
func (h *Handler) Get(c *app.Context, req api.IDPathRequest) (models.AgentRoute, error)
func (*Handler) List ¶
func (h *Handler) List(c *app.Context, req ListRequest) (api.PaginatedResponse[models.AgentRoute], error)
func (*Handler) Overview ¶
func (h *Handler) Overview(c *app.Context, req OverviewRequest) (api.PaginatedResponse[OverviewItem], error)
func (*Handler) Update ¶
func (h *Handler) Update(c *app.Context, req UpdateRequest) (models.AgentRoute, error)
type ListRequest ¶
type ListRequest struct {
api.PaginationQuery
SourceType string `form:"source_type"`
SourceID string `form:"source_id"`
}
type OverviewItem ¶
type OverviewItem struct {
ID uint `json:"id"`
SourceType string `json:"source_type"`
SourceID uint `json:"source_id"`
SourceName string `json:"source_name"`
Model string `json:"model"`
AgentID string `json:"agent_id"`
AgentName string `json:"agent_name"`
AgentTag string `json:"agent_tag"`
Priority int `json:"priority"`
CreatedAt int64 `json:"created_at"`
UpdatedAt int64 `json:"updated_at"`
}
type OverviewRequest ¶
type OverviewRequest struct {
api.PaginationQuery
SourceType string `form:"source_type"`
}
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.