programs

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2021 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Controller

type Controller interface {
	CreateProgram(c *gin.Context)
	GetProgram(c *gin.Context)
	GetPrograms(c *gin.Context)
}

func NewController

func NewController(logger *zap.Logger, s Service) Controller

type DefaultController

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

func (*DefaultController) CreateProgram

func (pc *DefaultController) CreateProgram(c *gin.Context)

func (*DefaultController) GetProgram

func (pc *DefaultController) GetProgram(c *gin.Context)

func (*DefaultController) GetPrograms

func (pc *DefaultController) GetPrograms(c *gin.Context)

type InitProgramGroupFn

type InitProgramGroupFn func(r *gin.RouterGroup)

func CreateInitControllersFn

func CreateInitControllersFn(pc Controller) InitProgramGroupFn

type Repository

type Repository interface {
	CreateProgram(definition string) (p *models.Program, err error)
	GetProgram(id uint64) (*models.Program, error)
	GetPrograms() ([]*models.Program, error)
}

func NewRepository

func NewRepository(logger *zap.Logger, db *gorm.DB) Repository

type Service

type Service interface {
	CreateProgram(definition string) (p *models.Program, err error)
	GetProgram(id uint64) (p *models.Program, err error)
	GetPrograms() (p []*models.Program, err error)
}

func NewService

func NewService(logger *zap.Logger, Repository Repository) Service

Jump to

Keyboard shortcuts

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