Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IAccessKeySecretRequest ¶
type IAccessKeySecretRequest interface { GetAccessKey() string Validate() error ParseRequest(req http.Request, virtualHost bool) error Verify(secret string) error Encode() string }
func Decode ¶
func Decode(reqStr string) (IAccessKeySecretRequest, error)
func DecodeAccessKeyRequest ¶
func DecodeAccessKeyRequest(req http.Request, virtualHost bool) (IAccessKeySecretRequest, error)
type SAccessKeyRequest ¶
type SAccessKeyRequest struct { Algorithm string `json:"algorithm,omitempty"` AccessKey string `json:"access_key,omitempty"` Signature string `json:"signature,omitempty"` Request string `json:"request,omitempty"` }
func (SAccessKeyRequest) GetAccessKey ¶
func (aksk SAccessKeyRequest) GetAccessKey() string
func (SAccessKeyRequest) Validate ¶
func (aksk SAccessKeyRequest) Validate() error
type SAccessKeyRequestV2 ¶
type SAccessKeyRequestV2 struct {
SAccessKeyRequest
}
func NewV2Request ¶
func NewV2Request() SAccessKeyRequestV2
func (SAccessKeyRequestV2) Encode ¶
func (aksk SAccessKeyRequestV2) Encode() string
func (*SAccessKeyRequestV2) ParseRequest ¶
func (aksk *SAccessKeyRequestV2) ParseRequest(req http.Request, virtualHost bool) error
func (SAccessKeyRequestV2) Verify ¶
func (aksk SAccessKeyRequestV2) Verify(secret string) error
type SAccessKeyRequestV4 ¶
type SAccessKeyRequestV4 struct { SAccessKeyRequest Location string SignedHeaders []string SignDate time.Time }
func NewV4Request ¶
func NewV4Request() SAccessKeyRequestV4
func (SAccessKeyRequestV4) Encode ¶
func (aksk SAccessKeyRequestV4) Encode() string
func (*SAccessKeyRequestV4) ParseRequest ¶
func (aksk *SAccessKeyRequestV4) ParseRequest(req http.Request, virtualHost bool) error
func (SAccessKeyRequestV4) Verify ¶
func (aksk SAccessKeyRequestV4) Verify(secret string) error
Click to show internal directories.
Click to hide internal directories.