repository

package
v0.0.0-...-0b02c18 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CartItemRepository

type CartItemRepository interface {
	Create(*model.CartItem) error
	FindOneByID(*string) (model.CartItem, error)
	FindOneByIDAndUserID(id *string, userID *string) (model.CartItem, error)
	FindAll() ([]model.CartItem, error)
	FindManyByUserID(*string) ([]model.CartItem, error)
	UpdateOneByID(*string, *model.CartItem) error
	DeleteOneByID(*string) error
}

func NewCartItemRepository

func NewCartItemRepository(database *gorm.DB) CartItemRepository

type CheckoutRepository

type CheckoutRepository interface {
	Create(*model.Checkout) error
	FindOneByID(*string) (model.Checkout, error)
	FindOneByIDAndUserID(id *string, userID *string) (model.Checkout, error)
	FindAll() ([]model.Checkout, error)
	FindManyByUserID(*string) ([]model.Checkout, error)
	UpdateOneByID(*string, *model.Checkout) error
	DeleteOneByID(*string) error
}

func NewCheckoutRepository

func NewCheckoutRepository(database *gorm.DB) CheckoutRepository

type ProductRepository

type ProductRepository interface {
	Create(*model.Product) error
	FindOneByID(*string) (model.Product, error)
	FindAll() ([]model.Product, error)
	UpdateOneByID(*string, *model.Product) error
	DeleteOneByID(*string) error
}

func NewProductRepository

func NewProductRepository(database *gorm.DB) ProductRepository

type UserRepository

type UserRepository interface {
	Create(*model.User) error
	FindOne(*string) (model.User, error)
}

func NewUserRepository

func NewUserRepository(database *gorm.DB) UserRepository

Jump to

Keyboard shortcuts

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