server

package
v0.0.0-...-44dcfa3 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTaskHandler

func NewTaskHandler(service TaskService) *taskHandler

NewTaskHandler Creates a new instance of the task handler

Types

type Server

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

func NewServer

func NewServer(router *gin.Engine, taskService TaskService) *Server

func (*Server) Run

func (s *Server) Run() error

type TaskService

type TaskService interface {
	Get(context.Context, uuid.UUID) (models.Task, error)
	Filter(context.Context, map[string]interface{}, models.Pagination) ([]*models.Task, error)
	Create(context.Context, models.Task) (models.Task, error)
	Patch(context.Context, uuid.UUID, models.Task) (models.Task, error)
	Delete(context.Context, uuid.UUID) error
}

TaskService is the interface that the business layer needs to follow in order for this handler to properly work.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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