repository

package
v0.0.0-...-e9d0f3f Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Company = NewCompanyRepository()
)
View Source
var DB *gorm.DB

Functions

func Connect

func Connect() (*gorm.DB, error)

Types

type CompanyCategoryRepository

type CompanyCategoryRepository interface {
	Save(companyCategory models.CompanyCategory) (uint, error)
	Update(models.CompanyCategory) error
	Delete(models.CompanyCategory) error
	FindAll() []*models.CompanyCategory
	FindByID(companyCategoryID uint) (*models.CompanyCategory, error)
	DeleteByID(companyCategoryID uint) error
	FindByName(name string) (*models.CompanyCategory, error)
	FindByField(fieldName, fieldValue string) (*models.CompanyCategory, error)
	UpdateSingleField(companyCategory models.CompanyCategory, fieldName, fieldValue string) error
}

func NewCompanyCategoryRepository

func NewCompanyCategoryRepository() CompanyCategoryRepository

type CompanyRepository

type CompanyRepository interface {
	Save(company models.Company) (uint, error)
	Update(models.Company) error
	Delete(models.Company) error
	FindAll() []*models.Company
	FindByID(companyID uint) (*models.Company, error)
	DeleteByID(companyID uint) error
	FindByName(name string) (*models.Company, error)
	FindByField(fieldName, fieldValue string) (*models.Company, error)
	UpdateSingleField(company models.Company, fieldName, fieldValue string) error
}

func NewCompanyRepository

func NewCompanyRepository() CompanyRepository

type UserRepository

type UserRepository interface {
	Save(user models.User) (uint, error)
	Update(models.User) error
	Delete(models.User) error
	FindAll() []*models.User
	FindByID(userID uint) (*models.User, error)
	DeleteByID(userID uint) error
	FindByName(name string) (*models.User, error)
	FindByField(fieldName, fieldValue string) (*models.User, error)
	UpdateSingleField(user models.User, fieldName, fieldValue string) error
}

func NewUserRepository

func NewUserRepository() UserRepository

Jump to

Keyboard shortcuts

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