Documentation
¶
Index ¶
- Constants
- Variables
- func DelConfigs(db sql.DB, node string) error
- func GetConfig(db sql.DB, node string, key string) (s string, i int64, v []byte, ok bool)
- func GetConfigStruct(db sql.DB, node string, key string, v interface{}) error
- func SetConfig(db sql.DB, node string, key string, s string, i int64, v []byte) error
- func SetConfigStruct(db sql.DB, node string, key string, v interface{}) error
- type CDN
- type Change
- type Endorsers
- type FS
- type GroupChain
- type GroupChange
- type GroupChangeFile
- type GroupName
- type Groups
- type Key
- type KeyData
- type Keystore
- type Safe
Constants ¶
View Source
const ( UserGroup GroupName = "usr" AdminGroup GroupName = "adm" ErrGroupChangeSignature = "errGroupChangeSignature: invalid signature for group change" ErrGroupChangeAuthorization = "errGroupChangeAuthorization: user has no Admin rights" CompactThreshold = 32 )
View Source
const ( KeysDir = "keys" KeyNode = "keys" )
View Source
const GroupChainNode = "GroupChain"
View Source
const GroupDir = "groups"
View Source
const GuardNode = "guard"
Variables ¶
View Source
var GroupChangeFileSize int64 = 1024 * 1024 * 128
Functions ¶
func GetConfigStruct ¶
Types ¶
type Change ¶
type Change uint64
const ( ChangeGrant Change = iota // ChangeGrant grants access to a group ChangeRevoke // ChangeRevoke revokes access to a group ChangeCurse // ChangeCurse revokes access to all groups and invalidate all changes done by the user ChangeEndorse // ChangeEndorse endorses the validity of the group chain ChangeCheckFreq = 8 )
type GroupChain ¶
type GroupChain struct {
Changes []GroupChange
Groups Groups
Hash []byte
}
type GroupChange ¶
type GroupChangeFile ¶
type Safe ¶
type Safe struct {
Id int
Db sql.DB
Store storage.Store
CreatorId security.UserId
CurrentUser security.Identity
Lock sync.RWMutex
}
func NewTestSafe ¶
Click to show internal directories.
Click to hide internal directories.