Documentation
¶
Index ¶
Constants ¶
View Source
const ( CACHE_EXPIRE_TIME = 600 * time.Second CACHE_CHECK_TIME = 60 * time.Second )
Variables ¶
View Source
var IsValidAccessKey = regexp.MustCompile(`^[a-zA-Z0-9\\-\\.\\_\\~]{5,20}$`)
IsValidAccessKey - validate access key.
View Source
var IsValidSecretKey = regexp.MustCompile(`^.{8,40}$`)
IsValidSecretKey - validate secret key.
Functions ¶
This section is empty.
Types ¶
type AccessKeyItem ¶ added in v1.1.0
type AccessKeyItem struct { ProjectId string `json:"projectId"` Name string `json:"name"` AccessKey string `json:"accessKey"` AccessSecret string `json:"accessSecret"` Status string `json:"status"` Updated string `json:"updated"` }
func GetKeysByUid ¶
func GetKeysByUid(uid string) (keyslist []AccessKeyItem, err error)
type Credential ¶ added in v1.1.0
type Credential struct { UserId string DisplayName string AccessKeyID string SecretAccessKey string }
credential container for access and secret keys.
func GetCredential ¶
func GetCredential(accessKey string) (credential Credential, err error)
func GetCredentialByUserId ¶
func GetCredentialByUserId(userId string) (credential Credential, err error)
func (Credential) String ¶ added in v1.1.0
func (a Credential) String() string
type QueryResp ¶ added in v1.1.0
type QueryResp struct { Limit int `json:"limit"` Total int `json:"total"` Offset int `json:"offset"` AccessKeySet []AccessKeyItem `json:"accessKeySet"` }
type QueryRespAll ¶ added in v1.1.0
Click to show internal directories.
Click to hide internal directories.