tickets

package
v0.0.0-...-f02a2e5 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository struct {
	DB  *sql.DB
	Log *zap.Logger
}

Repository is a struct to store DB and logger connection

func (*Repository) Create

func (r *Repository) Create(ctx context.Context, i internal.Identifiable, tx *sql.Tx) (int64, error)

Create new entity in storage

func (*Repository) Delete

func (r *Repository) Delete(id int64, ctx context.Context) error

Delete entity in storage

func (*Repository) HallSeatNumber

func (r *Repository) HallSeatNumber(id int64, ctx context.Context, tx *sql.Tx) (internal.Identifiable, error)

func (*Repository) Retrieve

func (r *Repository) Retrieve(id int64, ctx context.Context) (internal.Identifiable, error)

Retrieve entity from storage

func (*Repository) RetrieveAll

func (r *Repository) RetrieveAll(ctx context.Context) ([]internal.Identifiable, error)

RetrieveAll entity from storage

func (*Repository) SeatNumber

func (r *Repository) SeatNumber(id int64, ctx context.Context, tx *sql.Tx) (internal.Identifiable, error)

type Resource

type Resource struct {
	Starts_at  string `json:"Starts_at"`
	Price      float64
	Seat       int64
	ID         int64
	Title      string
	User_ID    int64
	Session_ID int64
}

Resource is a struct to store data about entity

func (*Resource) GID

func (r *Resource) GID() int64

Jump to

Keyboard shortcuts

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