Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidPrefixOrPartCount = errors.New("invalid prefix or part count") ErrBase64DecodeFailed = errors.New("base64 decode failed") ErrInvalidContentsPartCount = errors.New("invalid part count of contents") ErrParseVersionFailed = errors.New("parse version failed") ErrParseGenTsFailed = errors.New("parse generate ts failed") ErrInvalidVersion = errors.New("invalid version") )
Functions ¶
Types ¶
type AccessKeyContext ¶
type AccessKeyContext struct { // Version integer version fixed field Version int // GenTS access key generated timestamp (utc,seconds) GenTS time.Time // Rand random part, length: gAccessKeyRandLength Rand string }
func NewAccessKeyContext ¶
func NewAccessKeyContext(version int) *AccessKeyContext
func NewDefaultAccessKeyContext ¶
func NewDefaultAccessKeyContext() *AccessKeyContext
func (*AccessKeyContext) Equal ¶
func (c *AccessKeyContext) Equal(v *AccessKeyContext) bool
func (AccessKeyContext) MarshalText ¶
func (c AccessKeyContext) MarshalText() ([]byte, error)
func (*AccessKeyContext) Regenerate ¶
func (c *AccessKeyContext) Regenerate()
func (*AccessKeyContext) UnmarshalText ¶
func (c *AccessKeyContext) UnmarshalText(data []byte) (err error)
type CondArgs ¶
type CondArgs struct { AccountID types.SFID `name:"-"` Names []string `in:"query" name:"name,omitempty"` ExpiredAtBegin types.Timestamp `in:"query" name:"expiredAtBegin,omitempty"` ExpiredAtEnd types.Timestamp `in:"query" name:"expiredAtEnd,omitempty"` IdentityIDs types.SFIDs `in:"query" name:"identityID,omitempty"` IdentityTypes []enums.AccessKeyIdentityType `in:"query" name:"identityType,omitempty"` }
func (*CondArgs) Condition ¶
func (r *CondArgs) Condition() builder.SqlCondition
type CreateAccountAccessKeyReq ¶
type CreateAccountAccessKeyReq = CreateReqBase
type CreateReq ¶
type CreateReq struct { // IdentityID associated with a publisher, an account or other application IdentityID types.SFID `json:"identityID,omitempty"` // IdentityType associated type, default associated current account IdentityType enums.AccessKeyIdentityType `json:"identityType,default='1'"` CreateReqBase }
type CreateReqBase ¶
type CreateReqBase struct { // Name access token name Name string `json:"name"` // ExpirationDays access token valid in ExpirationDays, if 0 means token will not be expired. ExpirationDays int `json:"expirationDays,omitempty"` // Description access token description Desc string `json:"desc,omitempty"` // contains filtered or unexported fields }
type CreateRsp ¶
type CreateRsp struct { Name string `json:"name"` IdentityType enums.AccessKeyIdentityType `json:"identityType"` IdentityID types.SFID `json:"identityID"` AccessKey string `json:"accessKey"` ExpiredAt *types.Timestamp `json:"expiredAt,omitempty"` LastUsed *types.Timestamp `json:"lastUsed,omitempty"` Desc string `json:"desc,omitempty"` }
Click to show internal directories.
Click to hide internal directories.