store

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Load(context.Context, string, any) error
	LoadOrStore(context.Context, string, any, func() (any, error), time.Duration) (bool, error)
	Store(context.Context, string, any, time.Duration) error
}

type Car

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

func NewCar

func NewCar(cache Cache, pers *persistence.Car) *Car

func (*Car) Get

func (c *Car) Get(ctx context.Context) (entities.CarList, error)

func (*Car) GetByID

func (c *Car) GetByID(ctx context.Context, id uuid.UUID) (*entities.Car, error)

type PitInfo

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

func NewPitInfo

func NewPitInfo(cache Cache, pers repositories.PitParametersPersistence) *PitInfo

func (*PitInfo) GetAllServiceDurations

func (p *PitInfo) GetAllServiceDurations(
	ctx context.Context,
) (map[entities.RaceClass]entities.PitServiceDurations, error)

func (*PitInfo) GetAveragePitTimeLoss

func (p *PitInfo) GetAveragePitTimeLoss(ctx context.Context) (float64, error)

func (*PitInfo) GetPitTimeLoss

func (p *PitInfo) GetPitTimeLoss(
	ctx context.Context,
	raceClass entities.RaceClass,
	trackID uuid.UUID,
	layoutID *uuid.UUID,
) (*entities.PitTimeLoss, error)

func (*PitInfo) GetServiceDurations

func (p *PitInfo) GetServiceDurations(
	ctx context.Context,
	raceClass entities.RaceClass,
) (entities.PitServiceDurations, error)

type Track

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

func NewTrack

func NewTrack(cache Cache, pers *persistence.Track) *Track

func (*Track) Get

func (c *Track) Get(ctx context.Context) (entities.TrackList, error)

func (*Track) GetByID

func (c *Track) GetByID(ctx context.Context, id uuid.UUID) (*entities.Track, error)

type TrackLayout

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

func NewTrackLayout

func NewTrackLayout(cache Cache, pers *persistence.TrackLayout) *TrackLayout

func (*TrackLayout) Get

func (*TrackLayout) GetByID

func (c *TrackLayout) GetByID(ctx context.Context, id uuid.UUID) (*entities.TrackLayout, error)

func (*TrackLayout) GetTrackDefault

func (c *TrackLayout) GetTrackDefault(ctx context.Context, trackID uuid.UUID) (*uuid.UUID, error)

type User

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

func NewUser

func NewUser(
	cache Cache,
	userRepo repositories.User,
) *User

func (*User) GetByID

func (u *User) GetByID(ctx context.Context, id uuid.UUID) (*entities.User, error)

Jump to

Keyboard shortcuts

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