repository

package
v0.0.0-...-a510100 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountRepository

type AccountRepository interface {
	CreateAccount(account *model.Account) (model.Account, error)
	FindAccountByUserID(userID uint) (model.Account, error)
	UpdateAccount(newAccount *model.Account) (model.Account, error)
	DeleteAccount(account *model.Account) (bool, error)
	BeginTransaction() *gorm.DB
}

type AccountRepositoryImpl

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

func NewAccountRepository

func NewAccountRepository(db *gorm.DB) *AccountRepositoryImpl

func (AccountRepositoryImpl) BeginTransaction

func (r AccountRepositoryImpl) BeginTransaction() *gorm.DB

func (AccountRepositoryImpl) CreateAccount

func (r AccountRepositoryImpl) CreateAccount(account *model.Account) (model.Account, error)

func (AccountRepositoryImpl) DeleteAccount

func (r AccountRepositoryImpl) DeleteAccount(account *model.Account) (bool, error)

func (AccountRepositoryImpl) FindAccountByUserID

func (r AccountRepositoryImpl) FindAccountByUserID(userID uint) (model.Account, error)

func (AccountRepositoryImpl) UpdateAccount

func (r AccountRepositoryImpl) UpdateAccount(newAccount *model.Account) (model.Account, error)

type EmailVerificationRepository

type EmailVerificationRepository interface {
	UpdateEmailVerification(verification *model.EmailVerification) (model.EmailVerification, error)
	DeleteEmailVerification(verification *model.EmailVerification) (bool, error)
}

type EmailVerificationRepositoryImpl

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

func NewEmailVerificationRepository

func NewEmailVerificationRepository(db *gorm.DB) *EmailVerificationRepositoryImpl

func (EmailVerificationRepositoryImpl) DeleteEmailVerification

func (r EmailVerificationRepositoryImpl) DeleteEmailVerification(verification *model.EmailVerification) (bool, error)

func (EmailVerificationRepositoryImpl) UpdateEmailVerification

func (r EmailVerificationRepositoryImpl) UpdateEmailVerification(verification *model.EmailVerification) (model.EmailVerification, error)

type LoginInfoRepository

type LoginInfoRepository interface {
	CreateLoginInfo(info *model.LoginInfo) (model.LoginInfo, error)
	FindLoginInfo(info *model.LoginInfo) error
	UpdateLoginInfo(newInfo *model.LoginInfo) (model.LoginInfo, error)
	DeleteLoginInfo(info *model.LoginInfo) (bool, error)
}

type LoginInfoRepositoryImpl

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

func NewLoginInfoRepository

func NewLoginInfoRepository(db *gorm.DB) *LoginInfoRepositoryImpl

func (LoginInfoRepositoryImpl) CreateLoginInfo

func (r LoginInfoRepositoryImpl) CreateLoginInfo(info *model.LoginInfo) (model.LoginInfo, error)

func (LoginInfoRepositoryImpl) DeleteLoginInfo

func (r LoginInfoRepositoryImpl) DeleteLoginInfo(info *model.LoginInfo) (bool, error)

func (LoginInfoRepositoryImpl) FindLoginInfo

func (r LoginInfoRepositoryImpl) FindLoginInfo(info *model.LoginInfo) error

func (LoginInfoRepositoryImpl) UpdateLoginInfo

func (r LoginInfoRepositoryImpl) UpdateLoginInfo(newInfo *model.LoginInfo) (model.LoginInfo, error)

type RoleRepository

type RoleRepository interface {
	CreateRole(role *model.Role) (model.Role, error)
	AssignRolePermissions(role *model.Role, permissions ...model.Permission) error
	UpdateRole(newRole *model.Role) (model.Role, error)
	DeleteRole(role *model.Role) (bool, error)
}

type RoleRepositoryImpl

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

func NewRoleRepository

func NewRoleRepository(db *gorm.DB) *RoleRepositoryImpl

func (RoleRepositoryImpl) AssignRolePermissions

func (r RoleRepositoryImpl) AssignRolePermissions(role *model.Role, permissions ...model.Permission) error

func (RoleRepositoryImpl) CreateRole

func (r RoleRepositoryImpl) CreateRole(role *model.Role) (model.Role, error)

func (RoleRepositoryImpl) DeleteRole

func (r RoleRepositoryImpl) DeleteRole(role *model.Role) (bool, error)

func (RoleRepositoryImpl) UpdateRole

func (r RoleRepositoryImpl) UpdateRole(newRole *model.Role) (model.Role, error)

type SessionRepository

type SessionRepository interface {
	CreateSession(userID uint, token string) (model.Session, error)
	FindActiveSession(userID uint) (*model.Session, error)
	UpdateSessionStatus(sessionID uint, status string) (bool, error)
	DeleteSessionByToken(authToken string) error
}

type SessionRepositoryImpl

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

func NewSessionRepository

func NewSessionRepository(db *gorm.DB) *SessionRepositoryImpl

func (SessionRepositoryImpl) CreateSession

func (r SessionRepositoryImpl) CreateSession(userID uint, token string) (model.Session, error)

func (SessionRepositoryImpl) DeleteSessionByToken

func (r SessionRepositoryImpl) DeleteSessionByToken(authToken string) error

func (SessionRepositoryImpl) FindActiveSession

func (r SessionRepositoryImpl) FindActiveSession(userID uint) (*model.Session, error)

func (SessionRepositoryImpl) UpdateSessionStatus

func (r SessionRepositoryImpl) UpdateSessionStatus(sessionID uint, status string) (bool, error)

Jump to

Keyboard shortcuts

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