Documentation ¶
Index ¶
- Variables
- type IPermissionRepository
- type IRolePermissionRepository
- type IRoleRepository
- type ISettingRepository
- type ITokenRepository
- type IUserRepository
- type IUserRoleRepository
- type PermissionRepository
- type Repositories
- type RolePermissionRepository
- func (r RolePermissionRepository) Joins(models ...string) IRolePermissionRepository
- func (r RolePermissionRepository) Omit(columns ...string) IRolePermissionRepository
- func (r RolePermissionRepository) Trx(db *gorm.DB) IRolePermissionRepository
- func (r RolePermissionRepository) With(models ...string) IRolePermissionRepository
- type RoleRepository
- type SettingRepository
- type TokenRepository
- type UserRepository
- func (r UserRepository) GetUserWithPermissions(ctx context.Context, query string, args ...any) (*model.User, error)
- func (r UserRepository) Joins(models ...string) IUserRepository
- func (r UserRepository) Omit(columns ...string) IUserRepository
- func (r UserRepository) Trx(db *gorm.DB) IUserRepository
- func (r UserRepository) With(models ...string) IUserRepository
- type UserRoleRepository
- func (r UserRoleRepository) GetUsersByRole(ctx context.Context, roleID int) ([]int, error)
- func (r UserRoleRepository) Joins(models ...string) IUserRoleRepository
- func (r UserRoleRepository) Omit(columns ...string) IUserRoleRepository
- func (r UserRoleRepository) Trx(db *gorm.DB) IUserRoleRepository
- func (r UserRoleRepository) With(models ...string) IUserRoleRepository
Constants ¶
This section is empty.
Variables ¶
View Source
var PermissionOrderBy = clause.FieldOrderBy{}
View Source
var PermissionSearchable = clause.FieldSearchable{}
View Source
var RoleOrderBy = clause.FieldOrderBy{
"id": {Column: `auth_roles."id"`},
"name": {Column: `auth_roles."name"`},
}
View Source
var RolePermissionOrderBy = clause.FieldOrderBy{}
View Source
var RolePermissionSearchable = clause.FieldSearchable{}
View Source
var RoleSearchable = clause.FieldSearchable{ "id": {Column: `auth_roles."id"`, Type: clause.Int}, "name": {Column: `auth_roles."name"`, Type: clause.String}, }
View Source
var SettingOrderBy = clause.FieldOrderBy{}
View Source
var SettingSearchable = clause.FieldSearchable{}
View Source
var TokenOrderBy = clause.FieldOrderBy{
"id": {Column: `auth_tokens."id"`},
"user_id": {Column: `auth_tokens."user_id"`},
"logged_at": {Column: `auth_tokens."logged_at"`},
"updated_at": {Column: `auth_tokens."updated_at"`},
}
View Source
var TokenSearchable = clause.FieldSearchable{ "id": {Column: `auth_tokens."id"`, Type: clause.Int}, "user_id": {Column: `auth_tokens."user_id"`, Type: clause.Int}, "logged_at": {Column: `auth_tokens."logged_at"`, Type: clause.DateTime}, "updated_at": {Column: `auth_tokens."updated_at"`, Type: clause.DateTime}, }
View Source
var UserRoleOrderBy = clause.FieldOrderBy{}
View Source
var UserRoleSearchable = clause.FieldSearchable{}
Functions ¶
This section is empty.
Types ¶
type IPermissionRepository ¶
type IPermissionRepository interface { repository.Repository[IPermissionRepository, model.Permission] }
type IRolePermissionRepository ¶
type IRolePermissionRepository interface { repository.Repository[IRolePermissionRepository, model.RolePermission] }
type IRoleRepository ¶
type IRoleRepository interface { repository.Repository[IRoleRepository, model.Role] }
type ISettingRepository ¶
type ISettingRepository interface { repository.Repository[ISettingRepository, model.Setting] }
type ITokenRepository ¶
type ITokenRepository interface { repository.Repository[ITokenRepository, model.RefreshToken] }
type IUserRepository ¶
type IUserRepository interface { repository.Repository[IUserRepository, model.User] GetUserWithPermissions(ctx context.Context, query string, args ...any) (*model.User, error) }
type IUserRoleRepository ¶
type IUserRoleRepository interface { repository.Repository[IUserRoleRepository, model.UserRole] GetUsersByRole(ctx context.Context, roleID int) ([]int, error) }
type PermissionRepository ¶
type PermissionRepository struct { repository.Repo[model.Permission] }
func NewPermissionRepository ¶
func NewPermissionRepository(db *gorm.DB) PermissionRepository
func (PermissionRepository) Joins ¶
func (r PermissionRepository) Joins(models ...string) IPermissionRepository
func (PermissionRepository) Omit ¶
func (r PermissionRepository) Omit(columns ...string) IPermissionRepository
func (PermissionRepository) Trx ¶
func (r PermissionRepository) Trx(db *gorm.DB) IPermissionRepository
func (PermissionRepository) With ¶
func (r PermissionRepository) With(models ...string) IPermissionRepository
type Repositories ¶
type Repositories struct { UserRepository IUserRepository TokenRepository ITokenRepository RoleRepository IRoleRepository PermissionRepository IPermissionRepository RolePermissionRepository IRolePermissionRepository UserRoleRepository IUserRoleRepository SettingRepository ISettingRepository }
func NewRepositories ¶
func NewRepositories(db *gorm.DB) Repositories
type RolePermissionRepository ¶
type RolePermissionRepository struct { repository.Repo[model.RolePermission] }
func NewRolePermissionRepository ¶
func NewRolePermissionRepository(db *gorm.DB) RolePermissionRepository
func (RolePermissionRepository) Joins ¶
func (r RolePermissionRepository) Joins(models ...string) IRolePermissionRepository
func (RolePermissionRepository) Omit ¶
func (r RolePermissionRepository) Omit(columns ...string) IRolePermissionRepository
func (RolePermissionRepository) Trx ¶
func (r RolePermissionRepository) Trx(db *gorm.DB) IRolePermissionRepository
func (RolePermissionRepository) With ¶
func (r RolePermissionRepository) With(models ...string) IRolePermissionRepository
type RoleRepository ¶
type RoleRepository struct { repository.Repo[model.Role] }
func NewRoleRepository ¶
func NewRoleRepository(db *gorm.DB) RoleRepository
func (RoleRepository) Joins ¶
func (r RoleRepository) Joins(models ...string) IRoleRepository
func (RoleRepository) Omit ¶
func (r RoleRepository) Omit(columns ...string) IRoleRepository
func (RoleRepository) Trx ¶
func (r RoleRepository) Trx(db *gorm.DB) IRoleRepository
func (RoleRepository) With ¶
func (r RoleRepository) With(models ...string) IRoleRepository
type SettingRepository ¶
type SettingRepository struct { repository.Repo[model.Setting] }
func NewSettingRepository ¶
func NewSettingRepository(db *gorm.DB) SettingRepository
func (SettingRepository) Joins ¶
func (r SettingRepository) Joins(models ...string) ISettingRepository
func (SettingRepository) Omit ¶
func (r SettingRepository) Omit(columns ...string) ISettingRepository
func (SettingRepository) Trx ¶
func (r SettingRepository) Trx(db *gorm.DB) ISettingRepository
func (SettingRepository) With ¶
func (r SettingRepository) With(models ...string) ISettingRepository
type TokenRepository ¶
type TokenRepository struct { repository.Repo[model.RefreshToken] }
func NewTokenRepository ¶
func NewTokenRepository(db *gorm.DB) TokenRepository
func (TokenRepository) Joins ¶
func (r TokenRepository) Joins(models ...string) ITokenRepository
func (TokenRepository) Omit ¶
func (r TokenRepository) Omit(columns ...string) ITokenRepository
func (TokenRepository) Trx ¶
func (r TokenRepository) Trx(db *gorm.DB) ITokenRepository
func (TokenRepository) With ¶
func (r TokenRepository) With(models ...string) ITokenRepository
type UserRepository ¶
type UserRepository struct { repository.Repo[model.User] }
func NewUserRepository ¶
func NewUserRepository(db *gorm.DB) UserRepository
func (UserRepository) GetUserWithPermissions ¶
func (UserRepository) Joins ¶
func (r UserRepository) Joins(models ...string) IUserRepository
func (UserRepository) Omit ¶
func (r UserRepository) Omit(columns ...string) IUserRepository
func (UserRepository) Trx ¶
func (r UserRepository) Trx(db *gorm.DB) IUserRepository
func (UserRepository) With ¶
func (r UserRepository) With(models ...string) IUserRepository
type UserRoleRepository ¶
type UserRoleRepository struct { repository.Repo[model.UserRole] }
func NewUserRoleRepository ¶
func NewUserRoleRepository(db *gorm.DB) UserRoleRepository
func (UserRoleRepository) GetUsersByRole ¶
func (UserRoleRepository) Joins ¶
func (r UserRoleRepository) Joins(models ...string) IUserRoleRepository
func (UserRoleRepository) Omit ¶
func (r UserRoleRepository) Omit(columns ...string) IUserRoleRepository
func (UserRoleRepository) Trx ¶
func (r UserRoleRepository) Trx(db *gorm.DB) IUserRoleRepository
func (UserRoleRepository) With ¶
func (r UserRoleRepository) With(models ...string) IUserRoleRepository
Click to show internal directories.
Click to hide internal directories.