controller

package
v0.0.0-...-08a0e4e Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivityGroup

type ActivityGroup struct {
	Title string `json:"title"`
	Email string `json:"email"`
}

type ActivityGroupController

type ActivityGroupController struct {
	Controller
	DB *gorm.DB
}

func (*ActivityGroupController) All

func (c *ActivityGroupController) All(context *fiber.Ctx) error

func (*ActivityGroupController) Create

func (c *ActivityGroupController) Create(context *fiber.Ctx) error

func (*ActivityGroupController) Delete

func (c *ActivityGroupController) Delete(context *fiber.Ctx) error

func (*ActivityGroupController) GetOne

func (c *ActivityGroupController) GetOne(context *fiber.Ctx) error

func (*ActivityGroupController) Update

func (c *ActivityGroupController) Update(context *fiber.Ctx) error

type Controller

type Controller struct {
	DB *gorm.DB
}

func (*Controller) GetJsonResponse

func (c *Controller) GetJsonResponse(data interface{}) map[string]interface{}

func (*Controller) HandleSendCreated

func (c *Controller) HandleSendCreated(context *fiber.Ctx, data interface{}) error

func (*Controller) HandleSendOK

func (c *Controller) HandleSendOK(context *fiber.Ctx, data interface{}, needLower bool) error

func (*Controller) HandleSendPlaceholder

func (c *Controller) HandleSendPlaceholder(context *fiber.Ctx) error

type CreateTodo

type CreateTodo struct {
	ActivityGroupID *uint   `json:"activity_group_id" validate:"required"`
	Title           string  `json:"title" validate:"required,min=1"`
	IsActive        *bool   `json:"is_active"`
	Priority        *string `json:"priority" validate:"min=1,max=15"`
}

type QueryTodo

type QueryTodo struct {
	ActivityGroupId string `query:"activity_group_id"`
}

type TodoListController

type TodoListController struct {
	Controller
	DB *gorm.DB
}

func (*TodoListController) All

func (c *TodoListController) All(context *fiber.Ctx) error

func (*TodoListController) Create

func (c *TodoListController) Create(context *fiber.Ctx) error

func (*TodoListController) Delete

func (c *TodoListController) Delete(context *fiber.Ctx) error

func (*TodoListController) GetOne

func (c *TodoListController) GetOne(context *fiber.Ctx) error

func (*TodoListController) Update

func (c *TodoListController) Update(context *fiber.Ctx) error

type UpdateTodo

type UpdateTodo struct {
	Title    *string `json:"title" validate:"min=1"`
	IsActive *bool   `json:"is_active"`
	Priority *string `json:"priority" validate:"min=1,max=15"`
}

Jump to

Keyboard shortcuts

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