start

package
v0.0.0-...-2a68481 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository interface {
	Writer
}

type Service

type Service interface {
	Writer
}

func NewService

func NewService(repository Repository, locationService location.Service) Service

type Start

type Start struct {
	common.Timestamp
	ID                   uint                `gorm:"primaryKey"`
	OptimalDirections    int                 `gorm:"column:optimaldirection"`
	SuboptimalDirections int                 `gorm:"column:suboptimaldirection;size:64"`
	StartLocationID      uint                `gorm:"column:startlocationid"`
	StartLocation        location.Location   `gorm:"foreignkey:StartLocationID;references:id"`
	Landings             []location.Location `gorm:"many2many:start_landing_locations"`
}

func (Start) TableName

func (Start) TableName() string

TableName - defines which tablename is used in the database

type StartRepository

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

func NewRepository

func NewRepository(context *gorm.DB) (*StartRepository, error)

func (*StartRepository) Create

func (s *StartRepository) Create(start *Start) (uint, error)

func (*StartRepository) Delete

func (s *StartRepository) Delete(id uint) error

func (*StartRepository) Update

func (s *StartRepository) Update(start *Start) error

type StartService

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

func (*StartService) Create

func (s *StartService) Create(start *Start) (uint, error)

func (*StartService) Delete

func (s *StartService) Delete(id uint) error

func (*StartService) Update

func (s *StartService) Update(start *Start) error

type Writer

type Writer interface {
	Create(start *Start) (uint, error)
	Update(start *Start) error
	Delete(id uint) error
}

Jump to

Keyboard shortcuts

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