Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessKeyCaps ¶
type AccessKeyCaps struct { AccessKey string `json:"access_key"` SecretKey string `json:"secret_key"` Caps []byte `json:"caps"` ID string `json:"user_id"` }
func (*AccessKeyCaps) DumpJSONStr ¶
func (u *AccessKeyCaps) DumpJSONStr() (r string, err error)
func (*AccessKeyCaps) IsValidAK ¶
func (u *AccessKeyCaps) IsValidAK() (err error)
func (*AccessKeyCaps) IsValidCaps ¶
func (u *AccessKeyCaps) IsValidCaps() (err error)
type AccessKeyInfo ¶
type KeyInfo ¶
type KeyInfo struct { ID string `json:"id"` AuthKey []byte `json:"auth_key"` AccessKey string `json:"access_key"` SecretKey string `json:"secret_key"` Ts int64 `json:"create_ts"` Role string `json:"role"` Caps []byte `json:"caps"` }
KeyInfo defines the key info structure in key store
func (*KeyInfo) DumpJSONFile ¶
DumpJSONFile dump KeyInfo to file in json format
func (*KeyInfo) DumpJSONStr ¶
DumpJSONStr dump KeyInfo to string in json format
func (*KeyInfo) IsValidCaps ¶
IsValidCaps check the validity of caps
func (*KeyInfo) IsValidKeyInfo ¶
IsValidKeyInfo is a valid of KeyInfo
func (*KeyInfo) IsValidRole ¶
IsValidRole check the validity of role
Click to show internal directories.
Click to hide internal directories.