model

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Permission

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

Permission - Permission storage

func NewPermission

func NewPermission(db *gorm.DB) *Permission

NewPermission - Create a permission storage instance

func (*Permission) Create

func (a *Permission) Create(ctx context.Context, item schema.Permission) error

Create - Create data

func (*Permission) Delete

func (a *Permission) Delete(ctx context.Context, UUID string) error

Delete - Delete data

func (*Permission) Get

Get - Query specified data

func (*Permission) Query

Query - Query data

func (*Permission) Update

func (a *Permission) Update(ctx context.Context, UUID string, item schema.Permission) error

Update - update data

func (*Permission) UpdateParentPath

func (a *Permission) UpdateParentPath(ctx context.Context, UUID, parentPath string) error

UpdateParentPath - Update parent path

type Role

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

Role - Role storage

func NewRole

func NewRole(db *gorm.DB) *Role

NewRole - Create a role store instance

func (*Role) Create

func (a *Role) Create(ctx context.Context, item schema.Role) error

Create - Create data

func (*Role) Delete

func (a *Role) Delete(ctx context.Context, UUID string) error

Delete - delete data

func (*Role) Get

func (a *Role) Get(ctx context.Context, UUID string, opts ...schema.RoleQueryOptions) (*schema.Role, error)

Get - Query specified data

func (*Role) Query

Query - Query data

func (*Role) Update

func (a *Role) Update(ctx context.Context, UUID string, item schema.Role) error

Update - Update data

type User

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

User - User storage

func NewUser

func NewUser(db *gorm.DB) *User

NewUser - Create a user store instance

func (*User) Create

func (a *User) Create(ctx context.Context, item schema.User) error

Create - Create data

func (*User) Delete

func (a *User) Delete(ctx context.Context, UUID string) error

Delete - Delete data

func (*User) Get

func (a *User) Get(ctx context.Context, UUID string, opts ...schema.UserQueryOptions) (*schema.User, error)

Get - Query specified data

func (*User) Query

Query - Query data

func (*User) Update

func (a *User) Update(ctx context.Context, UUID string, item schema.User) error

Update - Update data

func (*User) UpdatePassword

func (a *User) UpdatePassword(ctx context.Context, UUID, password string) error

UpdatePassword - Update password

func (*User) UpdateStatus

func (a *User) UpdateStatus(ctx context.Context, UUID string, status int) error

UpdateStatus - Update status

Jump to

Keyboard shortcuts

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