operations

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CarRepository

type CarRepository interface {
	Get(context.Context) (models.CarList, error)
	GetByID(context.Context, uuid.UUID) (*models.Car, error)
}

type Cars

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

func NewCars

func NewCars(dao *data.AccessObject, repo CarRepository) *Cars

func (*Cars) Get

func (o *Cars) Get(ctx context.Context) (models.CarList, error)

func (*Cars) GetByID

func (o *Cars) GetByID(ctx context.Context, id uuid.UUID) (*models.Car, error)

type Setup

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

func NewSetup

func NewSetup(
	log *zerolog.Logger,
	dao *data.AccessObject,
	repo SetupRepository,
	validator *validators.Setup,
) *Setup

func (*Setup) Create

func (r *Setup) Create(ctx context.Context, setup *models.Setup) error

func (*Setup) GetAll

func (r *Setup) GetAll(ctx context.Context, userID uuid.UUID, qf infraHttp.QueryFilter) (models.SetupList, error)

func (*Setup) GetByID

func (r *Setup) GetByID(ctx context.Context, userID, id uuid.UUID) (*models.Setup, error)

func (*Setup) GetSetupFile

func (r *Setup) GetSetupFile(ctx context.Context, id uuid.UUID) (*models.SetupFile, error)

func (*Setup) RecordVote

func (r *Setup) RecordVote(ctx context.Context, setupID, userID uuid.UUID, upvote bool) (int64, error)

func (*Setup) Update

func (r *Setup) Update(ctx context.Context, setup *models.Setup, user *models.User) error

type Strategy

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

func NewStrategy

func NewStrategy(log *zerolog.Logger) *Strategy

func (*Strategy) CalculatePitRequirement

func (s *Strategy) CalculatePitRequirement(
	_ context.Context,
	info models.PitReqCarInfo,
) (*models.PitRequirement, error)

type TrackRepository

type TrackRepository interface {
	Get(context.Context) (models.TrackList, error)
	GetByID(context.Context, uuid.UUID) (*models.Track, error)
}

type Tracks

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

func NewTracks

func NewTracks(dao *data.AccessObject, repo TrackRepository) *Tracks

func (*Tracks) Get

func (o *Tracks) Get(ctx context.Context) (models.TrackList, error)

func (*Tracks) GetByID

func (o *Tracks) GetByID(ctx context.Context, id uuid.UUID) (*models.Track, error)

Jump to

Keyboard shortcuts

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