manipulator

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2021 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const Version = 6

Version 數據庫 當前版本

Variables

This section is empty.

Functions

func DB

func DB() *bolt.DB

DB .

func Init

func Init(cnf *configure.Database) (e error)

Init 初始化 數據庫

Types

type Element

type Element struct {
}

Element 代理節點

func (Element) Add

func (Element) Add(subscription uint64, outbound *data.Outbound) (result uint64, e error)

Add 增加記錄

func (Element) Clear

func (Element) Clear(subscription uint64) (e error)

Clear 清空記錄

func (Element) Init

func (m Element) Init(tx *bolt.Tx, version int) (e error)

Init 初始化 bucket

func (Element) List

func (m Element) List() (result []*data.Element, subscription []*data.Subscription, e error)

List 返回 所有記錄

func (Element) Put

func (Element) Put(subscription, id uint64, outbound *data.Outbound) (e error)

Put 更新記錄

func (Element) Puts

func (m Element) Puts(subscription uint64, outbounds []*data.Outbound) (result []data.Element, e error)

Puts 更新記錄

func (Element) Remove

func (Element) Remove(subscription, id uint64) (e error)

Remove 刪除記錄

func (Element) Upgrade added in v1.2.3

func (m Element) Upgrade(tx *bolt.Tx, oldVersion, newVersion int) (e error)

Upgrade 升級 bucket

type Settings

type Settings struct {
}

Settings 設定

func (Settings) Get

func (m Settings) Get() (result *data.Settings, e error)

Get 返回 設定

func (Settings) GetIPtables

func (m Settings) GetIPtables() (iptables *data.IPTables, e error)

GetIPtables 返回 iptables 設定

func (Settings) GetLast

func (m Settings) GetLast() (result *data.Element, e error)

GetLast 返回 最後啓動 v2ray-core

func (Settings) GetV2ray

func (m Settings) GetV2ray() (text string, e error)

GetV2ray 返回 v2ray 設定

func (Settings) Init

func (m Settings) Init(tx *bolt.Tx, version int) (e error)

Init 初始化 bucket

func (Settings) Put

func (m Settings) Put(val *data.Settings) (e error)

Put 保存 設定

func (Settings) PutIPtables

func (m Settings) PutIPtables(iptables *data.IPTables) (e error)

PutIPtables 保存 iptables 設定

func (Settings) PutLast

func (m Settings) PutLast(val *data.Element) (e error)

PutLast 保存 最後啓動 v2ray-core

func (Settings) PutV2ray

func (m Settings) PutV2ray(text string) (e error)

PutV2ray 保存 v2ray 設定

func (Settings) Upgrade added in v1.2.3

func (m Settings) Upgrade(tx *bolt.Tx, oldVersion, newVersion int) (e error)

Upgrade 升級 bucket

type Subscription

type Subscription struct {
}

Subscription .

func (Subscription) Add

func (m Subscription) Add(node *data.Subscription) (e error)

Add 添加記錄

func (Subscription) Get

func (m Subscription) Get(id uint64) (result *data.Subscription, e error)

Get 返回記錄

func (Subscription) Init

func (m Subscription) Init(tx *bolt.Tx, version int) (e error)

Init 初始化 bucket

func (Subscription) List

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

List 返回 所有記錄

func (Subscription) Put

func (m Subscription) Put(node *data.Subscription) (e error)

Put 設置記錄

func (Subscription) Remove

func (m Subscription) Remove(id uint64) (e error)

Remove 刪除記錄

func (Subscription) Upgrade added in v1.2.3

func (m Subscription) Upgrade(tx *bolt.Tx, oldVersion, newVersion int) (e error)

Upgrade 升級 bucket

type User

type User struct {
}

User 用戶 操縱器

func (User) Add

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

Add 添加用戶

func (User) Init

func (m User) Init(tx *bolt.Tx, version int) (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) Remove

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

Remove 刪除用戶

func (User) Upgrade added in v1.2.3

func (m User) Upgrade(tx *bolt.Tx, oldVersion, newVersion int) (e error)

Upgrade 升級 bucket

Jump to

Keyboard shortcuts

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