manipulator

package
v1.0.31 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DB

func DB() *bolt.DB

DB .

func Init

func Init(source string) (e error)

Init 初始化 數據庫

Types

type Shell

type Shell struct {
}

Shell shell 记录表

func (Shell) Add

func (m Shell) Add(username string, element *data.Shell) (e error)

Add 添加记录

func (Shell) Init

func (m Shell) Init(tx *bolt.Tx) (e error)

Init 初始化 bucket

func (Shell) Remove

func (m Shell) Remove(username string, id int64) (e error)

Remove 删除记录

func (Shell) Rename

func (m Shell) Rename(username string, id int64, name string) (e error)

Rename 更改名称

func (Shell) SetFontFamily

func (m Shell) SetFontFamily(username string, id int64, fontFamily string) (e error)

SetFontFamily 更改字體

func (Shell) SetFontSize

func (m Shell) SetFontSize(username string, id int64, fontSize int) (e error)

SetFontSize 更改字體大小

type User

type User struct {
}

User 用戶 操縱器

func (User) Add

func (m User) Add(name, password string, shell, read, write, root bool) (e error)

Add 添加用戶

func (User) Change

func (m User) Change(name string, shell, read, write, root bool) (e error)

Change 更改權限

func (User) Init

func (m User) Init(tx *bolt.Tx) (e error)

Init 初始化 bucket

func (User) List

func (m User) List() (result []*data.User, e error)

List 返回用戶 列表

func (User) Login

func (m User) Login(name, password string) (result *cookie.Session, e error)

Login 登入

func (User) Password

func (m User) Password(name, password string) (e error)

Password 修改密碼

func (User) Password3

func (m User) Password3(name, old, val string) (e error)

Password3 修改密碼

func (User) Remove

func (m User) Remove(name string) (e error)

Remove 刪除用戶

Jump to

Keyboard shortcuts

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