Documentation ¶
Index ¶
- func Init() *r.Session
- type IRole
- type ITodo
- type IUser
- type RoleManager
- func (r RoleManager) All(ctx context.Context, filter map[string]interface{}, limit int, page int) ([]*model.Role, error)
- func (r RoleManager) Create(ctx context.Context, args model.Role) (*model.Role, error)
- func (r RoleManager) Delete(ctx context.Context, filter map[string]interface{}) error
- func (r RoleManager) Get(ctx context.Context, filter map[string]interface{}) (*model.Role, error)
- func (r RoleManager) Search(ctx context.Context, query string) ([]*model.Role, error)
- func (r RoleManager) Update(ctx context.Context, args model.UpdateRole) (*model.Role, error)
- type TodoManager
- func (t TodoManager) All(ctx context.Context, filter map[string]interface{}, limit int, page int) ([]*model.Todo, error)
- func (t TodoManager) Create(ctx context.Context, args model.Todo) (*model.Todo, error)
- func (t TodoManager) Delete(ctx context.Context, filter map[string]interface{}) error
- func (t TodoManager) Get(ctx context.Context, filter map[string]interface{}) (*model.Todo, error)
- func (t TodoManager) Search(ctx context.Context, query string) ([]*model.Todo, error)
- func (t TodoManager) Update(ctx context.Context, args model.Todo) (*model.Todo, error)
- type UserManager
- func (u *UserManager) All(ctx context.Context, filter map[string]interface{}, limit int, page int) ([]*model.User, error)
- func (u *UserManager) CheckPassword(ctx context.Context, password string, hash string) bool
- func (u *UserManager) Create(ctx context.Context, args model.User) (*model.User, error)
- func (u *UserManager) Delete(ctx context.Context, filter map[string]interface{}) error
- func (u *UserManager) Get(ctx context.Context, filter map[string]interface{}) (*model.User, error)
- func (u *UserManager) Search(ctx context.Context, query string) ([]*model.User, error)
- func (u *UserManager) Update(ctx context.Context, args model.User) (*model.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IRole ¶
type IRole interface { Create(ctx context.Context, args model.Role) (*model.Role, error) Update(ctx context.Context, args model.UpdateRole) (*model.Role, error) Delete(ctx context.Context, filter map[string]interface{}) error Get(ctx context.Context, filter map[string]interface{}) (*model.Role, error) All(ctx context.Context, filter map[string]interface{}, limit int, page int) ([]*model.Role, error) Search(ctx context.Context, query string) ([]*model.Role, error) }
type ITodo ¶
type ITodo interface { Create(ctx context.Context, args model.Todo) (*model.Todo, error) Update(ctx context.Context, args model.Todo) (*model.Todo, error) Delete(ctx context.Context, filter map[string]interface{}) error Get(ctx context.Context, filter map[string]interface{}) (*model.Todo, error) All(ctx context.Context, filter map[string]interface{}, limit int, page int) ([]*model.Todo, error) Search(ctx context.Context, query string) ([]*model.Todo, error) }
type IUser ¶
type IUser interface { Create(ctx context.Context, args model.User) (*model.User, error) Update(ctx context.Context, args model.User) (*model.User, error) Delete(ctx context.Context, filter map[string]interface{}) error Get(ctx context.Context, filter map[string]interface{}) (*model.User, error) All(ctx context.Context, filter map[string]interface{}, limit int, page int) ([]*model.User, error) Search(ctx context.Context, query string) ([]*model.User, error) CheckPassword(ctx context.Context, password, hash string) bool }
type RoleManager ¶
func NewRoleManager ¶
func NewRoleManager(session *rd.Session, tblName string) *RoleManager
func (RoleManager) Delete ¶
func (r RoleManager) Delete(ctx context.Context, filter map[string]interface{}) error
func (RoleManager) Update ¶
func (r RoleManager) Update(ctx context.Context, args model.UpdateRole) (*model.Role, error)
type TodoManager ¶
func NewTodoManager ¶
func NewTodoManager(session *r.Session, tblName string) *TodoManager
func (TodoManager) Delete ¶
func (t TodoManager) Delete(ctx context.Context, filter map[string]interface{}) error
type UserManager ¶
func NewUserManager ¶
func NewUserManager(session *r.Session, tblName string) *UserManager
func (*UserManager) CheckPassword ¶
CheckPassword compare the stored and the incoming password tp match a specific user account
func (*UserManager) Delete ¶
func (u *UserManager) Delete(ctx context.Context, filter map[string]interface{}) error
Click to show internal directories.
Click to hide internal directories.