repositories

package
v0.0.0-...-31ddaea Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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) Create

func (x *AuthRepository) Create(ctx context.Context, payload *entities.Auth) error

func (*AuthRepository) DeleteByUserID

func (x *AuthRepository) DeleteByUserID(ctx context.Context, userId string) error

func (*AuthRepository) Find

func (x *AuthRepository) Find(ctx context.Context, id string) (*entities.Auth, error)

func (*AuthRepository) FindByEmail

func (x *AuthRepository) FindByEmail(ctx context.Context, email string) (*entities.Auth, error)

func (*AuthRepository) FindByUserId

func (x *AuthRepository) FindByUserId(ctx context.Context, userId string) (*entities.Auth, error)

func (*AuthRepository) Update

func (x *AuthRepository) Update(ctx context.Context, payload *entities.Auth) error

type PermissionRepository

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

func NewPermissionRepository

func NewPermissionRepository(db *mongo.Database) PermissionRepository

func (*PermissionRepository) All

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 (*PermissionRepository) FindByName

func (x *PermissionRepository) FindByName(ctx context.Context, name string) (*entities.Permission, error)

func (*PermissionRepository) GetAll

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) All

func (x *RoleRepository) All(ctx context.Context) ([]*entities.Role, error)

func (*RoleRepository) AllByUserId

func (x *RoleRepository) AllByUserId(ctx context.Context, userId string) ([]*entities.Role, error)

func (*RoleRepository) Create

func (x *RoleRepository) Create(ctx context.Context, payload *entities.Role) error

func (*RoleRepository) Find

func (x *RoleRepository) Find(ctx context.Context, id string) (*entities.Role, error)

func (*RoleRepository) FindByName

func (x *RoleRepository) FindByName(ctx context.Context, name string) (*entities.Role, error)

func (*RoleRepository) GetAll

func (x *RoleRepository) GetAll(ctx context.Context, params *entities.RoleQueryParams) ([]*entities.Role, int, error)

func (*RoleRepository) Update

func (x *RoleRepository) Update(ctx context.Context, payload *entities.Role) error

type RoleUserRepository

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

func NewRoleUserRepository

func NewRoleUserRepository(db *mongo.Database) RoleUserRepository

func (*RoleUserRepository) AllByUserId

func (x *RoleUserRepository) AllByUserId(ctx context.Context, userId string) ([]*entities.RoleUser, error)

func (*RoleUserRepository) CreateMany

func (x *RoleUserRepository) CreateMany(ctx context.Context, payloads []*entities.RoleUser) error

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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