persist

package
v0.0.0-...-7a4b419 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBusinessRepo

func NewBusinessRepo(db *gorm.DB) *businessRepo

func NewEntrepreneurRepo

func NewEntrepreneurRepo(db *gorm.DB) *entrepreneurRepo

func NewEventRepo

func NewEventRepo(db *gorm.DB) *eventRepo

func NewInstituteRepo

func NewInstituteRepo(db *gorm.DB) *instituteRepo

func NewRewardRepo

func NewRewardRepo(db *gorm.DB) *rewardRepo

func NewSolutionRepo

func NewSolutionRepo(db *gorm.DB) *solutionRepo

func NewTeamRepo

func NewTeamRepo(db *gorm.DB) *teamRepo

func NewTraineeRepo

func NewTraineeRepo(db *gorm.DB) *traineeRepo

func ToEntrepreneurDomain

func ToEntrepreneurDomain(model infra.Entrepreneur) *core.Entrepreneur

func ToEntrepreneurPersistence

func ToEntrepreneurPersistence(model core.Entrepreneur) *infra.Entrepreneur

func ToTraineeDomain

func ToTraineeDomain(model infra.Trainee) *core.Trainee

func ToTraineePersistence

func ToTraineePersistence(model core.Trainee) *infra.Trainee

func ToUserDomain

func ToUserDomain(model infra.User) *core.User

Types

type UserRepo

type UserRepo struct {
	// contains filtered or unexported fields
}

func NewUserRepo

func NewUserRepo(db *gorm.DB) *UserRepo

func (UserRepo) Add

func (u UserRepo) Add(record *core.User) (*core.User, map[string]string)

func (UserRepo) ChangePassword

func (u UserRepo) ChangePassword(record core.User) (*core.User, error)

func (UserRepo) CreatePassword

func (u UserRepo) CreatePassword(record core.User) (*core.User, error)

func (UserRepo) Disable

func (u UserRepo) Disable(id string) (*core.User, error)

func (UserRepo) Edit

func (u UserRepo) Edit(record *core.User) (*core.User, map[string]string)

func (UserRepo) Enable

func (u UserRepo) Enable(id string) (*core.User, error)

func (UserRepo) Login

func (u UserRepo) Login(phone string) (*core.User, error)

func (UserRepo) Remove

func (u UserRepo) Remove(id string) (string, error)

func (UserRepo) ResetPassword

func (u UserRepo) ResetPassword(phone string) (*core.User, error)

func (UserRepo) User

func (u UserRepo) User(id string) (*core.User, error)

func (UserRepo) Users

func (u UserRepo) Users() (*[]core.User, error)

Jump to

Keyboard shortcuts

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