Documentation ¶
Index ¶
- type Booking
- type BookingType
- type CreateBookingParams
- type CreateUserParams
- type DBTX
- type GetBookingsParams
- type NullBookingType
- type Queries
- func (q *Queries) CreateBooking(ctx context.Context, arg CreateBookingParams) (Booking, error)
- func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (User, error)
- func (q *Queries) DeleteBooking(ctx context.Context, id int64) error
- func (q *Queries) DeleteUser(ctx context.Context, id int64) error
- func (q *Queries) GetBooking(ctx context.Context, id int64) (Booking, error)
- func (q *Queries) GetBookingStatus(ctx context.Context, id int64) (BookingType, error)
- func (q *Queries) GetBookings(ctx context.Context, arg GetBookingsParams) ([]Booking, error)
- func (q *Queries) GetUser(ctx context.Context, id int64) (User, error)
- func (q *Queries) GetUserByEmail(ctx context.Context, email string) (User, error)
- func (q *Queries) Ping(ctx context.Context) error
- func (q *Queries) TestCreateBooking(ctx context.Context, arg TestCreateBookingParams) (Booking, error)
- func (q *Queries) TestCreateUser(ctx context.Context, arg TestCreateUserParams) (User, error)
- func (q *Queries) TestDeleteBooking(ctx context.Context, id int64) error
- func (q *Queries) TestDeleteUser(ctx context.Context, id int64) error
- func (q *Queries) UpdateBookingStatus(ctx context.Context, arg UpdateBookingStatusParams) (Booking, error)
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type TestCreateBookingParams
- type TestCreateUserParams
- type UpdateBookingStatusParams
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Booking ¶
type Booking struct { ID int64 `json:"id"` Name string `json:"name"` StartTime pgtype.Timestamp `json:"start_time"` EndTime pgtype.Timestamp `json:"end_time"` UserID int64 `json:"user_id"` Status BookingType `json:"status"` CreatedAt pgtype.Timestamp `json:"created_at"` UpdatedAt pgtype.Timestamp `json:"updated_at"` }
type BookingType ¶
type BookingType string
const ( BookingTypePending BookingType = "pending" BookingTypeApproved BookingType = "approved" BookingTypeCanceled BookingType = "canceled" BookingTypeRejected BookingType = "rejected" )
func (*BookingType) Scan ¶
func (e *BookingType) Scan(src interface{}) error
type CreateBookingParams ¶
type CreateUserParams ¶
type GetBookingsParams ¶
type NullBookingType ¶
type NullBookingType struct { BookingType BookingType `json:"booking_type"` Valid bool `json:"valid"` // Valid is true if BookingType is not NULL }
func (*NullBookingType) Scan ¶
func (ns *NullBookingType) Scan(value interface{}) error
Scan implements the Scanner interface.
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) CreateBooking ¶
func (*Queries) CreateUser ¶
func (*Queries) DeleteBooking ¶
func (*Queries) GetBooking ¶
func (*Queries) GetBookingStatus ¶
func (*Queries) GetBookings ¶
func (*Queries) GetUserByEmail ¶
func (*Queries) TestCreateBooking ¶
func (*Queries) TestCreateUser ¶
func (*Queries) TestDeleteBooking ¶
func (*Queries) TestDeleteUser ¶
func (*Queries) UpdateBookingStatus ¶
type TestCreateBookingParams ¶
type TestCreateUserParams ¶
type UpdateBookingStatusParams ¶
type UpdateBookingStatusParams struct { Status BookingType `json:"status"` ID int64 `json:"id"` }
Click to show internal directories.
Click to hide internal directories.