Documentation ¶
Index ¶
- type AddPaperParams
- type AddPictureParams
- type AddPrintParams
- type AddUserParams
- type Cart
- type CreateOrderParams
- type DBTX
- type GetOrderForUserParams
- type GetUserCartRow
- type Order
- type Paper
- type Picture
- type Print
- type Queries
- func (q *Queries) AddPaper(ctx context.Context, arg AddPaperParams) (Paper, error)
- func (q *Queries) AddPicture(ctx context.Context, arg AddPictureParams) (Picture, error)
- func (q *Queries) AddPrint(ctx context.Context, arg AddPrintParams) (Print, error)
- func (q *Queries) AddUser(ctx context.Context, arg AddUserParams) (User, error)
- func (q *Queries) Close() error
- func (q *Queries) CreateOrder(ctx context.Context, arg CreateOrderParams) (Order, error)
- func (q *Queries) DeleteOrder(ctx context.Context, id int64) error
- func (q *Queries) DeletePaper(ctx context.Context, id int64) error
- func (q *Queries) DeletePicture(ctx context.Context, id int64) error
- func (q *Queries) DeletePrint(ctx context.Context, id int64) error
- func (q *Queries) DeleteUser(ctx context.Context, id int64) error
- func (q *Queries) GetCarts(ctx context.Context) ([]Cart, error)
- func (q *Queries) GetOrderForUser(ctx context.Context, arg GetOrderForUserParams) (Order, error)
- func (q *Queries) GetOrdersForUser(ctx context.Context, userID int64) ([]Order, error)
- func (q *Queries) GetPapers(ctx context.Context) ([]Paper, error)
- func (q *Queries) GetPictures(ctx context.Context) ([]Picture, error)
- func (q *Queries) GetPicturesByUser(ctx context.Context, userID int64) ([]Picture, error)
- func (q *Queries) GetUser(ctx context.Context, id int64) (User, error)
- func (q *Queries) GetUserCart(ctx context.Context, userID int64) (GetUserCartRow, error)
- func (q *Queries) GetUsers(ctx context.Context) ([]User, error)
- func (q *Queries) UpdateOrder(ctx context.Context, arg UpdateOrderParams) error
- func (q *Queries) UpdateOrderStatus(ctx context.Context, arg UpdateOrderStatusParams) error
- func (q *Queries) UpdatePaper(ctx context.Context, arg UpdatePaperParams) error
- func (q *Queries) UpdatePrintQuantity(ctx context.Context, arg UpdatePrintQuantityParams) error
- func (q *Queries) UpdateUser(ctx context.Context, arg UpdateUserParams) error
- func (q *Queries) UpsertCart(ctx context.Context, userID int64) error
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type ShippingDetail
- type ShippingProfile
- type UpdateOrderParams
- type UpdateOrderStatusParams
- type UpdatePaperParams
- type UpdatePrintQuantityParams
- type UpdateUserParams
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddPaperParams ¶
type AddPictureParams ¶
type AddPrintParams ¶
type AddPrintParams struct { PictureID int64 `json:"pictureId"` PaperID int64 `json:"paperId"` OrderID sql.NullInt64 `json:"orderId"` CartID sql.NullInt64 `json:"cartId"` Width float64 `json:"width"` Height float64 `json:"height"` BorderSize float64 `json:"borderSize"` CropX int64 `json:"cropX"` CropY int64 `json:"cropY"` Cost float64 `json:"cost"` Quantity int64 `json:"quantity"` }
type AddUserParams ¶
type CreateOrderParams ¶
type CreateOrderParams struct { UserID int64 `json:"userId"` ShippingDetailID sql.NullInt64 `json:"shippingDetailId"` Created time.Time `json:"created"` ExternalOrderID string `json:"externalOrderId"` PaymentLink string `json:"paymentLink"` IsPaid bool `json:"isPaid"` OrderStatus string `json:"orderStatus"` }
type GetOrderForUserParams ¶
type GetUserCartRow ¶
type Order ¶
type Order struct { ID int64 `json:"id"` UserID int64 `json:"userId"` ShippingDetailID sql.NullInt64 `json:"shippingDetailId"` Created time.Time `json:"created"` ExternalOrderID string `json:"externalOrderId"` PaymentLink string `json:"paymentLink"` IsPaid bool `json:"isPaid"` OrderStatus string `json:"orderStatus"` }
type Print ¶
type Print struct { ID int64 `json:"id"` PictureID int64 `json:"pictureId"` PaperID int64 `json:"paperId"` OrderID sql.NullInt64 `json:"orderId"` CartID sql.NullInt64 `json:"cartId"` Width float64 `json:"width"` Height float64 `json:"height"` BorderSize float64 `json:"borderSize"` CropX int64 `json:"cropX"` CropY int64 `json:"cropY"` Cost float64 `json:"cost"` Quantity int64 `json:"quantity"` }
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) AddPicture ¶
func (*Queries) CreateOrder ¶
func (*Queries) DeletePicture ¶
func (*Queries) GetOrderForUser ¶
func (*Queries) GetOrdersForUser ¶
func (*Queries) GetPicturesByUser ¶
func (*Queries) GetUserCart ¶
func (*Queries) UpdateOrder ¶
func (q *Queries) UpdateOrder(ctx context.Context, arg UpdateOrderParams) error
func (*Queries) UpdateOrderStatus ¶
func (q *Queries) UpdateOrderStatus(ctx context.Context, arg UpdateOrderStatusParams) error
func (*Queries) UpdatePaper ¶
func (q *Queries) UpdatePaper(ctx context.Context, arg UpdatePaperParams) error
func (*Queries) UpdatePrintQuantity ¶
func (q *Queries) UpdatePrintQuantity(ctx context.Context, arg UpdatePrintQuantityParams) error
func (*Queries) UpdateUser ¶
func (q *Queries) UpdateUser(ctx context.Context, arg UpdateUserParams) error
type ShippingDetail ¶
type ShippingDetail struct { ID int64 `json:"id"` ShippingProfileID int64 `json:"shippingProfileId"` TrackNumber sql.NullString `json:"trackNumber"` }
type ShippingProfile ¶
type UpdateOrderParams ¶
type UpdateOrderParams struct { ShippingDetailID sql.NullInt64 `json:"shippingDetailId"` Created time.Time `json:"created"` ExternalOrderID string `json:"externalOrderId"` PaymentLink string `json:"paymentLink"` IsPaid bool `json:"isPaid"` OrderStatus string `json:"orderStatus"` ID int64 `json:"id"` }
type UpdateOrderStatusParams ¶
type UpdatePaperParams ¶
type UpdateUserParams ¶
Click to show internal directories.
Click to hide internal directories.