controllers

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2019 License: GPL-3.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ILogin

type ILogin interface {
	// Get graphic verification code information
	GetCaptcha(ctx context.Context, length int) (*schema.LoginCaptcha, error)
	// Generate and respond to a captcha
	ResCaptcha(ctx context.Context, w http.ResponseWriter, captchaID string, width, height int) error
	// Login authentication
	Verify(ctx context.Context, userName, password string) (*schema.User, error)
	// Generate token
	GenerateToken(ctx context.Context, userUUID string) (*schema.LoginTokenInfo, error)
	// Destroy token
	DestroyToken(ctx context.Context, tokenString string) error
	// Get user login information
	GetLoginInfo(ctx context.Context, userUUID string) (*schema.UserLoginInfo, error)
	// Query the user's permission Permission tree
	QueryUserPermissionTree(ctx context.Context, userUUID string) ([]*schema.PermissionTree, error)
	// Update user login password
	UpdatePassword(ctx context.Context, userUUID string, params schema.UpdatePasswordParam) error
}

ILogin - Login business logic interface

type IPermission

type IPermission interface {
	// Query Permission
	Query(ctx context.Context, params schema.PermissionQueryParam, opts ...schema.PermissionQueryOptions) (*schema.PermissionQueryResult, error)
	// Query specified Permission
	Get(ctx context.Context, UUID string, opts ...schema.PermissionQueryOptions) (*schema.Permission, error)
	// Create Permission
	Create(ctx context.Context, item schema.Permission) (*schema.Permission, error)
	// update Permission
	Update(ctx context.Context, UUID string, item schema.Permission) (*schema.Permission, error)
	// delete Permission
	Delete(ctx context.Context, UUID string) error
}

IPermission - Manage Permission business logic interface

type IRole

type IRole interface {
	// Query role
	Query(ctx context.Context, params schema.RoleQueryParam, opts ...schema.RoleQueryOptions) (*schema.RoleQueryResult, error)
	// Query specified role
	Get(ctx context.Context, UUID string, opts ...schema.RoleQueryOptions) (*schema.Role, error)
	// Create role
	Create(ctx context.Context, item schema.Role) (*schema.Role, error)
	// Update role
	Update(ctx context.Context, UUID string, item schema.Role) (*schema.Role, error)
	// Delete role
	Delete(ctx context.Context, UUID string) error
	// Get resource permissions
	GetPermissionResources(ctx context.Context, item *schema.Role) (schema.PermissionResources, error)
}

IRole - Manage Role business logic interface

type IUser

type IUser interface {
	// Query user
	Query(ctx context.Context, params schema.UserQueryParam, opts ...schema.UserQueryOptions) (*schema.UserQueryResult, error)
	// Get specified user
	Get(ctx context.Context, UUID string, opts ...schema.UserQueryOptions) (*schema.User, error)
	// Create user
	Create(ctx context.Context, item schema.User) (*schema.User, error)
	// Update user
	Update(ctx context.Context, UUID string, item schema.User) (*schema.User, error)
	// Delete user
	Delete(ctx context.Context, UUID string) error
	// Update status
	UpdateStatus(ctx context.Context, UUID string, status int) error
	// Query display item user
	QueryShow(ctx context.Context, params schema.UserQueryParam, opts ...schema.UserQueryOptions) (*schema.UserShowQueryResult, error)
}

IUser - Manage User business logic interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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