Documentation ¶
Index ¶
- type AuthRepository
- func (x *AuthRepository) Create(ctx context.Context, payload *entities.Auth) error
- func (x *AuthRepository) Find(ctx context.Context, id string) (*entities.Auth, error)
- func (x *AuthRepository) FindByEmail(ctx context.Context, email string) (*entities.Auth, error)
- func (x *AuthRepository) FindByUserId(ctx context.Context, userId string) (*entities.Auth, error)
- func (x *AuthRepository) Update(ctx context.Context, payload *entities.Auth) error
- type PermissionRepository
- func (x *PermissionRepository) All(ctx context.Context) ([]*entities.Permission, error)
- func (x *PermissionRepository) AllByUserId(ctx context.Context, userId string) ([]*entities.Permission, error)
- func (x *PermissionRepository) AllPermissionByUserId(ctx context.Context, userId string) ([]*entities.Permission, error)
- func (x *PermissionRepository) Create(ctx context.Context, payload *entities.Permission) error
- func (x *PermissionRepository) Find(ctx context.Context, id string) (*entities.Permission, error)
- func (x *PermissionRepository) FindByName(ctx context.Context, name string) (*entities.Permission, error)
- func (x *PermissionRepository) GetAll(ctx context.Context, params *entities.PermissionQueryParams) ([]*entities.Permission, int, error)
- func (x *PermissionRepository) Update(ctx context.Context, payload *entities.Permission) error
- type PermissionRoleRepository
- func (x *PermissionRoleRepository) AllByRoleId(ctx context.Context, roleId string) ([]*entities.PermissionRole, error)
- func (x *PermissionRoleRepository) CreateMany(ctx context.Context, payloads []*entities.PermissionRole) error
- func (x *PermissionRoleRepository) DeleteByPermissionIds(ctx context.Context, ids []string) error
- func (x *PermissionRoleRepository) DeleteByRoleId(ctx context.Context, roleId string) error
- type PermissionUserRepository
- func (x *PermissionUserRepository) AllByUserId(ctx context.Context, userId string) ([]*entities.PermissionUser, error)
- func (x *PermissionUserRepository) CreateMany(ctx context.Context, payloads []*entities.PermissionUser) error
- func (x *PermissionUserRepository) DeleteByPermissionIds(ctx context.Context, ids []string) error
- func (x *PermissionUserRepository) DeleteByUserId(ctx context.Context, userId string) error
- type RoleRepository
- func (x *RoleRepository) All(ctx context.Context) ([]*entities.Role, error)
- func (x *RoleRepository) AllByUserId(ctx context.Context, userId string) ([]*entities.Role, error)
- func (x *RoleRepository) Create(ctx context.Context, payload *entities.Role) error
- func (x *RoleRepository) Find(ctx context.Context, id string) (*entities.Role, error)
- func (x *RoleRepository) FindByName(ctx context.Context, name string) (*entities.Role, error)
- func (x *RoleRepository) GetAll(ctx context.Context, params *entities.RoleQueryParams) ([]*entities.Role, int, error)
- func (x *RoleRepository) Update(ctx context.Context, payload *entities.Role) error
- type RoleUserRepository
- func (x *RoleUserRepository) AllByUserId(ctx context.Context, userId string) ([]*entities.RoleUser, error)
- func (x *RoleUserRepository) CreateMany(ctx context.Context, payloads []*entities.RoleUser) error
- func (x *RoleUserRepository) DeleteByRoleIds(ctx context.Context, ids []string) error
- func (x *RoleUserRepository) DeleteByUserId(ctx context.Context, userId string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthRepository ¶
type AuthRepository struct {
// contains filtered or unexported fields
}
func NewAuthRepository ¶
func NewAuthRepository(db *mongo.Database) AuthRepository
func (*AuthRepository) FindByEmail ¶
func (*AuthRepository) FindByUserId ¶
type PermissionRepository ¶
type PermissionRepository struct {
// contains filtered or unexported fields
}
func NewPermissionRepository ¶
func NewPermissionRepository(db *mongo.Database) PermissionRepository
func (*PermissionRepository) All ¶
func (x *PermissionRepository) All(ctx context.Context) ([]*entities.Permission, error)
func (*PermissionRepository) AllByUserId ¶
func (x *PermissionRepository) AllByUserId(ctx context.Context, userId string) ([]*entities.Permission, error)
func (*PermissionRepository) AllPermissionByUserId ¶
func (x *PermissionRepository) AllPermissionByUserId(ctx context.Context, userId string) ([]*entities.Permission, error)
func (*PermissionRepository) Create ¶
func (x *PermissionRepository) Create(ctx context.Context, payload *entities.Permission) error
func (*PermissionRepository) Find ¶
func (x *PermissionRepository) Find(ctx context.Context, id string) (*entities.Permission, error)
func (*PermissionRepository) FindByName ¶
func (x *PermissionRepository) FindByName(ctx context.Context, name string) (*entities.Permission, error)
func (*PermissionRepository) GetAll ¶
func (x *PermissionRepository) GetAll(ctx context.Context, params *entities.PermissionQueryParams) ([]*entities.Permission, int, error)
func (*PermissionRepository) Update ¶
func (x *PermissionRepository) Update(ctx context.Context, payload *entities.Permission) error
type PermissionRoleRepository ¶
type PermissionRoleRepository struct {
// contains filtered or unexported fields
}
func NewPermissionRoleRepository ¶
func NewPermissionRoleRepository(db *mongo.Database) PermissionRoleRepository
func (*PermissionRoleRepository) AllByRoleId ¶
func (x *PermissionRoleRepository) AllByRoleId(ctx context.Context, roleId string) ([]*entities.PermissionRole, error)
func (*PermissionRoleRepository) CreateMany ¶
func (x *PermissionRoleRepository) CreateMany(ctx context.Context, payloads []*entities.PermissionRole) error
func (*PermissionRoleRepository) DeleteByPermissionIds ¶
func (x *PermissionRoleRepository) DeleteByPermissionIds(ctx context.Context, ids []string) error
func (*PermissionRoleRepository) DeleteByRoleId ¶
func (x *PermissionRoleRepository) DeleteByRoleId(ctx context.Context, roleId string) error
type PermissionUserRepository ¶
type PermissionUserRepository struct {
// contains filtered or unexported fields
}
func NewPermissionUserRepository ¶
func NewPermissionUserRepository(db *mongo.Database) PermissionUserRepository
func (*PermissionUserRepository) AllByUserId ¶
func (x *PermissionUserRepository) AllByUserId(ctx context.Context, userId string) ([]*entities.PermissionUser, error)
func (*PermissionUserRepository) CreateMany ¶
func (x *PermissionUserRepository) CreateMany(ctx context.Context, payloads []*entities.PermissionUser) error
func (*PermissionUserRepository) DeleteByPermissionIds ¶
func (x *PermissionUserRepository) DeleteByPermissionIds(ctx context.Context, ids []string) error
func (*PermissionUserRepository) DeleteByUserId ¶
func (x *PermissionUserRepository) DeleteByUserId(ctx context.Context, userId string) error
type RoleRepository ¶
type RoleRepository struct {
// contains filtered or unexported fields
}
func NewRoleRepository ¶
func NewRoleRepository(db *mongo.Database) RoleRepository
func (*RoleRepository) AllByUserId ¶
func (*RoleRepository) FindByName ¶
type RoleUserRepository ¶
type RoleUserRepository struct {
// contains filtered or unexported fields
}
func NewRoleUserRepository ¶
func NewRoleUserRepository(db *mongo.Database) RoleUserRepository
func (*RoleUserRepository) AllByUserId ¶
func (*RoleUserRepository) CreateMany ¶
func (*RoleUserRepository) DeleteByRoleIds ¶
func (x *RoleUserRepository) DeleteByRoleIds(ctx context.Context, ids []string) error
func (*RoleUserRepository) DeleteByUserId ¶
func (x *RoleUserRepository) DeleteByUserId(ctx context.Context, userId string) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.