Documentation ¶
Index ¶
- func GormTransaction(db *gorm.DB, txFunc func(*gorm.DB) *sample_error.SampleError) (err *sample_error.SampleError)
- type RefreshTokenModel
- func (m *RefreshTokenModel) Add(s *entities.RefreshToken) *sample_error.SampleError
- func (m *RefreshTokenModel) GetByJti(jti string) (*entities.RefreshToken, *sample_error.SampleError)
- func (m *RefreshTokenModel) GetByUserId(userId int) (*entities.RefreshToken, *sample_error.SampleError)
- func (m RefreshTokenModel) TableName() string
- func (m *RefreshTokenModel) Update(userId int, jti string) *sample_error.SampleError
- type SampleModel
- func (m *SampleModel) Add(s *entities.Sample) *sample_error.SampleError
- func (m *SampleModel) Delete(id int, userId int) *sample_error.SampleError
- func (m *SampleModel) Get(id int, userId int) (*entities.Sample, *sample_error.SampleError)
- func (m *SampleModel) List(userId int) ([]*entities.Sample, *sample_error.SampleError)
- func (m SampleModel) TableName() string
- func (m *SampleModel) Update(s *entities.Sample) *sample_error.SampleError
- type UserModel
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 ¶
func NewRefreshTokenModel ¶
func NewRefreshTokenModel(db *gorm.DB) *RefreshTokenModel
func (*RefreshTokenModel) Add ¶
func (m *RefreshTokenModel) Add(s *entities.RefreshToken) *sample_error.SampleError
func (*RefreshTokenModel) GetByJti ¶
func (m *RefreshTokenModel) GetByJti(jti string) (*entities.RefreshToken, *sample_error.SampleError)
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 (m *SampleModel) Add(s *entities.Sample) *sample_error.SampleError
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 ¶
func (m *SampleModel) Update(s *entities.Sample) *sample_error.SampleError
type UserModel ¶
func NewUserModel ¶
func (*UserModel) Get ¶
func (m *UserModel) Get(id int) (*entities.User, *sample_error.SampleError)
func (*UserModel) GetWithEmail ¶
func (m *UserModel) GetWithEmail(email string, tx *gorm.DB) (*entities.User, *sample_error.SampleError)
Click to show internal directories.
Click to hide internal directories.