route

package
v0.0.0-...-857c71f Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Register bulkly

Functions

This section is empty.

Types

type RouteController

type RouteController struct {
	// contains filtered or unexported fields
}

func NewRouteController

func NewRouteController(
	route_s *RouteService,
	jwt_s *service.JwtService,
	log *zerolog.Logger,
) *RouteController

func (*RouteController) CreateRoute

func (con *RouteController) CreateRoute(m *echoc.RouteMeta) echoc.MetaHandler

@Tags Route @Summary Create a Route @Description Create a Route @ID create-a-route @Accept json @Produce json @Success 200 {object} response.Response{data=dto.RouteResponse} "Successfully created Routes" @Router /routes [post] @Security Bearer @Param info body dto.RouteRequest true "Route Info"

func (*RouteController) DeleteRoute

func (con *RouteController) DeleteRoute(meta *echoc.RouteMeta) echoc.MetaHandler

@Tags Route @Summary Delete a Route @Description Delete a Route @ID Delete-a-route @Accept json @Produce json @Success 200 {object} response.Response{} "Successfully Delete Routes" @Router /routes/{id} [delete] @Security Bearer @Param id path int true "Route ID"

func (*RouteController) GetRoute

func (con *RouteController) GetRoute(meta *echoc.RouteMeta) echoc.MetaHandler

@Tags Route @Summary Get a Route @Description Get a Route @ID Get-a-route @Accept json @Produce json @Success 200 {object} response.Response{data=dto.RouteResponse} "Successfully Getd Routes" @Router /routes/{id} [put] @Security Bearer @Param info body dto.RouteRequest true "Route Info" @Param id path int true "Route ID"

func (*RouteController) Init

func (con *RouteController) Init(r *echo.Group) *echo.Group

func (*RouteController) Routes

@Tags Route @Summary List all Routes @Description Get a list of all Routes @ID list-all-routes @Produce json @Success 200 {object} response.Response{data=map[string]dto.RouteResponse{list=[]dto.RouteResponse}} "Successfully retrieved Routes" @Router /routes [get] @Security Bearer @Param limit query int false "string default" default(A)

func (*RouteController) UpdateRoute

func (con *RouteController) UpdateRoute(meta *echoc.RouteMeta) echoc.MetaHandler

@Tags Route @Summary Update a Route @Description Update a Route @ID Update-a-route @Accept json @Produce json @Success 200 {object} response.Response{data=dto.RouteResponse} "Successfully updated Routes" @Router /routes/{id} [put] @Security Bearer @Param info body dto.RouteRequest true "Route Info" @Param id path int true "Route ID"

type RouteService

type RouteService struct {
	// contains filtered or unexported fields
}

func NewRouteService

func NewRouteService(route_r *dbr.RouteRepository) *RouteService

func (*RouteService) CreateRoute

func (s *RouteService) CreateRoute(ctx context.Context, r *dto.RouteRequest) (*dto.RouteResponse, error)

func (*RouteService) DeleteRoute

func (s *RouteService) DeleteRoute(ctx context.Context, id int) error

func (*RouteService) GetRouteByID

func (s *RouteService) GetRouteByID(ctx context.Context, id int) (*dto.RouteResponse, error)

func (*RouteService) Paginate

func (*RouteService) UpdateRoute

func (s *RouteService) UpdateRoute(ctx context.Context, id int, r *dto.RouteRequest) (*dto.RouteResponse, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳