controller

package
v0.0.0-...-01347ba Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupRouter

func SetupRouter(serviceRepository service.Repository, logger *zap.SugaredLogger) *gin.Engine

SetupRouter sets up the Gin router

Types

type Service

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

Service is a controller for /service endpoints

func NewService

func NewService(serviceRepository service.Repository) Service

NewService instantiates a Service controller

func (*Service) Create

func (sc *Service) Create(c *gin.Context)

Create creates a new service.Service POST /services { ... service DTO ... }

func (*Service) GetByCode

func (sc *Service) GetByCode(c *gin.Context)

GetByCode gets a service.Service by the service's code GET /services/:code { ... service DTO ... }

Jump to

Keyboard shortcuts

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