keystore

package
v2.4.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

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 AccessKeyInfo struct {
	AccessKey string `json:"access_key"`
	ID        string `json:"id"`
}

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

func (u *KeyInfo) DumpJSONFile(filename string) (err error)

DumpJSONFile dump KeyInfo to file in json format

func (*KeyInfo) DumpJSONStr

func (u *KeyInfo) DumpJSONStr() (r string, err error)

DumpJSONStr dump KeyInfo to string in json format

func (*KeyInfo) IsValidCaps

func (u *KeyInfo) IsValidCaps() (err error)

IsValidCaps check the validity of caps

func (*KeyInfo) IsValidID

func (u *KeyInfo) IsValidID() (err error)

IsValidID check the validity of ID

func (*KeyInfo) IsValidKeyInfo

func (u *KeyInfo) IsValidKeyInfo() (err error)

IsValidKeyInfo is a valid of KeyInfo

func (*KeyInfo) IsValidRole

func (u *KeyInfo) IsValidRole() (err error)

IsValidRole check the validity of role

Jump to

Keyboard shortcuts

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