storage

package
v0.0.0-...-4346918 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage interface {
	Login(email, password string) (*types.User, error)
	GetUserByID(userID string) (*types.User, error)

	TicketCreate(ticket types.Ticket) (*types.Ticket, error)
	TicketDelete(ticket types.Ticket) error
	TicketUpdate(ticket types.Ticket) (*types.Ticket, error)
	TicketSearch(search TicketSearchParams) (types.TicketSet, error)
	TicketByID(ticketID string) (*types.Ticket, error)

	GetTrain() types.Train
	TrainDetails() (types.TicketSet, error)
	TrainCheckSeatTaken(car types.TrainCar, seat int32) (bool, error)
	TrainGetEmptySeats() (types.TicketSet, error)
}

type TicketSearchParams

type TicketSearchParams struct {
	IDs  []string
	Car  *types.TrainCar // needs to be {types.TrainCar, int}
	Seat *int32
	From []string
	To   []string
}

func (TicketSearchParams) Match

func (tsp TicketSearchParams) Match(all bool, ticket types.Ticket) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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