Documentation ¶
Index ¶
- Constants
- func DB() *bolt.DB
- func Init(cnf *configure.Database) (e error)
- type Element
- func (Element) Add(subscription uint64, outbound *data.Outbound) (result uint64, e error)
- func (Element) Clear(subscription uint64) (e error)
- func (m Element) Init(tx *bolt.Tx, version int) (e error)
- func (m Element) List() (result []*data.Element, subscription []*data.Subscription, e error)
- func (Element) Put(subscription, id uint64, outbound *data.Outbound) (e error)
- func (m Element) Puts(subscription uint64, outbounds []*data.Outbound) (result []data.Element, e error)
- func (Element) Remove(subscription, id uint64) (e error)
- func (m Element) Upgrade(tx *bolt.Tx, oldVersion, newVersion int) (e error)
- type Settings
- func (m Settings) Get() (result *data.Settings, e error)
- func (m Settings) GetIPtables() (iptables *data.IPTables, e error)
- func (m Settings) GetLast() (result *data.Element, e error)
- func (m Settings) GetV2ray() (text string, e error)
- func (m Settings) Init(tx *bolt.Tx, version int) (e error)
- func (m Settings) Put(val *data.Settings) (e error)
- func (m Settings) PutIPtables(iptables *data.IPTables) (e error)
- func (m Settings) PutLast(val *data.Element) (e error)
- func (m Settings) PutV2ray(text string) (e error)
- func (m Settings) Upgrade(tx *bolt.Tx, oldVersion, newVersion int) (e error)
- type Subscription
- func (m Subscription) Add(node *data.Subscription) (e error)
- func (m Subscription) Get(id uint64) (result *data.Subscription, e error)
- func (m Subscription) Init(tx *bolt.Tx, version int) (e error)
- func (m Subscription) List() (result []*data.Subscription, e error)
- func (m Subscription) Put(node *data.Subscription) (e error)
- func (m Subscription) Remove(id uint64) (e error)
- func (m Subscription) Upgrade(tx *bolt.Tx, oldVersion, newVersion int) (e error)
- type User
- func (m User) Add(name, password string) (e error)
- func (m User) Init(tx *bolt.Tx, version int) (e error)
- func (m User) List() (result []data.User, e error)
- func (m User) Login(name, password string) (result *cookie.Session, e error)
- func (m User) Password(name, password string) (e error)
- func (m User) Remove(name string) (e error)
- func (m User) Upgrade(tx *bolt.Tx, oldVersion, newVersion int) (e error)
Constants ¶
View Source
const Version = 6
Version 數據庫 當前版本
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Element ¶
type Element struct { }
Element 代理節點
type Settings ¶
type Settings struct { }
Settings 設定
func (Settings) GetIPtables ¶
GetIPtables 返回 iptables 設定
func (Settings) PutIPtables ¶
PutIPtables 保存 iptables 設定
type Subscription ¶
type Subscription struct { }
Subscription .
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 返回 所有記錄
Click to show internal directories.
Click to hide internal directories.