models

package
v0.0.0-...-abdcf8d Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2019 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GormTransaction

func GormTransaction(db *gorm.DB, txFunc func(*gorm.DB) *sample_error.SampleError) (err *sample_error.SampleError)

Types

type RefreshTokenModel

type RefreshTokenModel struct {
	Db *gorm.DB
}

func NewRefreshTokenModel

func NewRefreshTokenModel(db *gorm.DB) *RefreshTokenModel

func (*RefreshTokenModel) Add

func (*RefreshTokenModel) GetByJti

func (*RefreshTokenModel) GetByUserId

func (m *RefreshTokenModel) GetByUserId(userId int) (*entities.RefreshToken, *sample_error.SampleError)

func (RefreshTokenModel) TableName

func (m RefreshTokenModel) TableName() string

func (*RefreshTokenModel) Update

func (m *RefreshTokenModel) Update(userId int, jti string) *sample_error.SampleError

type SampleModel

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

func NewSampleModel

func NewSampleModel(db *gorm.DB) *SampleModel

func (*SampleModel) Add

func (*SampleModel) Delete

func (m *SampleModel) Delete(id int, userId int) *sample_error.SampleError

func (*SampleModel) Get

func (m *SampleModel) Get(id int, userId int) (*entities.Sample, *sample_error.SampleError)

func (*SampleModel) List

func (m *SampleModel) List(userId int) ([]*entities.Sample, *sample_error.SampleError)

func (SampleModel) TableName

func (m SampleModel) TableName() string

func (*SampleModel) Update

type UserModel

type UserModel struct {
	Db *gorm.DB
}

func NewUserModel

func NewUserModel(db *gorm.DB) *UserModel

func (*UserModel) Get

func (*UserModel) GetWithEmail

func (m *UserModel) GetWithEmail(email string, tx *gorm.DB) (*entities.User, *sample_error.SampleError)

func (UserModel) TableName

func (m UserModel) TableName() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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