internal

package
v0.0.0-...-b813b93 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAlreadyExists = errors.New("resource already exists")
View Source
var ErrInvalidInput = errors.New("invalid input")
View Source
var ErrNoResource = errors.New("no resource found")

Functions

This section is empty.

Types

type CreateTravellerPayload

type CreateTravellerPayload struct {
	FirstName string
	LastName  string
	Age       int
}

type Traveller

type Traveller struct {
	ID        uuid.UUID
	FirstName string
	LastName  string
	Age       int
}

type TravellerStorage

type TravellerStorage interface {
	Get(ctx context.Context, id uuid.UUID) (Traveller, error)
	Create(ctx context.Context, params CreateTravellerPayload) (uuid.UUID, error)
}

type Travellers

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

func NewTravellers

func NewTravellers(db TravellerStorage) Travellers

func (Travellers) CreateTraveller

func (t Travellers) CreateTraveller(ctx context.Context, traveller CreateTravellerPayload) (uuid.UUID, error)

func (Travellers) DeleteTraveller

func (t Travellers) DeleteTraveller()

func (Travellers) GetTraveller

func (t Travellers) GetTraveller(ctx context.Context, id uuid.UUID) (Traveller, error)

Directories

Path Synopsis
adapters
cmd
app command
term command
ports
ftp

Jump to

Keyboard shortcuts

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