data

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

Documentation

Index

Constants

View Source
const ShellBucket = "shell"

ShellBucket .

View Source
const UserBucket = "user"

UserBucket .

Variables

This section is empty.

Functions

func DecodeID

func DecodeID(b []byte) (id uint64)

DecodeID .

func EncoderID

func EncoderID(id uint64) (b []byte)

EncoderID .

Types

type Shell

type Shell struct {
	ID         int64  `json:"id,omitempty"`
	Name       string `json:"name,omitempty"`
	FontSize   int    `json:"fontSize,omitempty"`
	FontFamily string `json:"fontFamily,omitempty"`
}

Shell 启动的 shell 用于 重启服务时 恢复shell

func (*Shell) Decode

func (s *Shell) Decode(b []byte) (e error)

Decode 由 []byte 解碼

func (*Shell) Encoder

func (s *Shell) Encoder() (b []byte, e error)

Encoder 編碼到 []byte

type User

type User struct {
	Name     string `json:"name,omitempty"`
	Password string `json:"-"`
	// 是否可獲取shell
	Shell bool `json:"shell,omitempty"`
	// 是否可讀取 檔案
	Read bool `json:"read,omitempty"`
	// 是否可寫入 檔案
	Write bool `json:"write,omitempty"`
	// 是否是 root
	Root bool `json:"root,omitempty"`
}

User 用戶

func (*User) Decode

func (u *User) Decode(b []byte) (e error)

Decode 由 []byte 解碼

func (*User) Encoder

func (u *User) Encoder() (b []byte, e error)

Encoder 編碼到 []byte

Jump to

Keyboard shortcuts

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