controller

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CategoryController

type CategoryController struct {
	CategoryService *service.CategoryService
}

func (*CategoryController) Index

func (c *CategoryController) Index(ctx *fiber.Ctx) error

ListCategory godoc @Summary List Categories @Description Get list of categories @Tags Categories @Accept json @Produce json @Success 200 {object} utils.JSONResponse{data=[]types.Category} "desc" @Failure 400 {object} utils.JSONResponse @Router /api/v1/categories [get]

type ControllerStruct

type ControllerStruct struct {
	SourceController   *SourceController
	TypesController    *TypesController
	CategoryController *CategoryController
	FastingController  *FastingController
}

func NewController

func NewController(
	sourceService *service.SourceService,
	typesService *service.TypesService,
	categoryService *service.CategoryService,
	fastingService *service.FastingService,
) *ControllerStruct

type FastingController

type FastingController struct {
	FastingService *service.FastingService
}

func (*FastingController) Index

func (c *FastingController) Index(ctx *fiber.Ctx) error

ListFasting godoc @Summary List Sunnah Fastings @Description Get list of sunnah fasting @Tags Fastings @Accept json @Produce json @Param type_id query int false "Type ID" @Param category_id query int false "Category ID" @Param day query int false "Day in month" @Param month query int false "Month" @Param Year query int false "Year" @Success 200 {object} utils.JSONResponse{data=[]types.Fasting} "desc" @Failure 400 {object} utils.JSONResponse @Router /api/v1/fastings [get]

type SourceController

type SourceController struct {
	SourceService *service.SourceService
}

func (*SourceController) Index

func (c *SourceController) Index(ctx *fiber.Ctx) error

ListSource godoc @Summary List Sources @Description Get list of sources @Tags Sources @Accept json @Produce json @Success 200 {object} utils.JSONResponse{data=[]types.Source} "desc" @Failure 400 {object} utils.JSONResponse @Router /api/v1/sources [get]

type TypesController

type TypesController struct {
	TypesService *service.TypesService
}

func (*TypesController) Index

func (c *TypesController) Index(ctx *fiber.Ctx) error

ListTypes godoc @Summary List Types @Description Get list of types @Tags Types @Accept json @Produce json @Success 200 {object} utils.JSONResponse{data=[]types.Type} "desc" @Failure 400 {object} utils.JSONResponse @Router /api/v1/types [get]

Jump to

Keyboard shortcuts

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