service

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: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Train

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

func New

func New(store storage.Storage, jwtIssuer issuer.JWTIssuer, jwtValidator validator.JWTValidator, capture cdc.CDC) (*Train, error)

func NewFromEnvironment

func NewFromEnvironment() (*Train, error)

func (*Train) BuyTicket

func (t *Train) BuyTicket(ctx context.Context, payloadd types.BuyTicket) (*types.Ticket, error)

func (*Train) ChangeTicket

func (t *Train) ChangeTicket(ctx context.Context, payload types.ChangeTicket) (*types.Ticket, error)

func (*Train) GetValidator

func (t *Train) GetValidator() validator.JWTValidator

func (*Train) Login

func (t *Train) Login(ctx context.Context, email, password string) (*types.LoginResponse, error)

func (*Train) RemoveTicket

func (t *Train) RemoveTicket(ctx context.Context, payload types.RemoveTicket) error

func (*Train) TicketByID

func (t *Train) TicketByID(ctx context.Context, ticketID string) (*types.Ticket, error)

func (*Train) TrainDetails

func (t *Train) TrainDetails(ctx context.Context) (*types.TrainDetails, error)

func (*Train) TrainNextOpenSeat

func (t *Train) TrainNextOpenSeat(ctx context.Context) (*types.TrainOpenSeatsResp, error)

Jump to

Keyboard shortcuts

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