repo

package
v0.0.0-...-c9e3aad Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deal

type Deal interface {
	GetAllByID(id int) (*models.Deal, error)
	GetByID(id int) (*models.Deal, error)
	Get() ([]models.Deal, error)
	GetByUserIDAndSecurityID(userID, securityID int) (*models.Deal, error)
	Create(deal *models.Deal) (*models.Deal, error)
	Patch(deal *models.Deal) (*models.Deal, error)
	Delete(id int) error
}

func NewDeal

func NewDeal(db *gorm.DB) Deal

type Inventory

type Inventory interface {
	GetByID(id int) (*models.InventoryItem, error)
	GetByUserID(userID int) ([]models.InventoryItem, error)
	GetUserInventoryBySecurityID(userID int, securityID int) (*models.InventoryItem, error)
	Patch(item *models.InventoryItem) (*models.InventoryItem, error)
	Save(item *models.InventoryItem) error
	Delete(id int) error
}

func NewInventory

func NewInventory(db *gorm.DB) Inventory

type Security

type Security interface {
	Get() ([]models.Security, error)
}

func NewSecurity

func NewSecurity(db *gorm.DB) Security

type Session

type Session interface {
	Create(u *models.User) (*models.Session, error)
	GetByID(id uint) (*models.Session, error)
}

func NewSession

func NewSession(db *gorm.DB) Session

type Transaction

type Transaction interface {
	Get(userID int) ([]models.Transaction, error)
	Add(t *models.Transaction) (*models.Transaction, error)
}

func NewTransaction

func NewTransaction(db *gorm.DB, irepo Inventory) Transaction

type User

type User interface {
	Get() ([]models.User, error)
	GetByID(id int) (*models.User, error)
	GetByEmail(email string) (*models.User, error)
	Create(u *models.User) (*models.User, error)
	Patch(u *models.User) (*models.User, error)
}

func NewStock

func NewStock(db *gorm.DB) User

Jump to

Keyboard shortcuts

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