Documentation ¶
Index ¶
- Constants
- func Auth(apiIp string, ownerUin string, uin string, action string, resource string, ...) (map[string]interface{}, error)
- func DoPost(url string, param string, connectTimeOut int, readTimeOut int) ([]byte, error)
- func GetSignKey(params map[string]interface{}, sigurl string, secretKey string) string
- func GetSignSrc(params map[string]interface{}, sigurl string) string
- func GetUUID32() string
- func HmacSHA1Sign(secretKey string, src string) string
- func Map2Str(params map[string]interface{}) string
- func Sig(apiIp string, secretId string, action string, signStr string, signSrc string, ...) map[string]interface{}
- func SigAndAuth(apiIp string, secretId string, action string, signStr string, signSrc string, ...) (map[string]interface{}, error)
- type AuthenticationCloud
- type AuthenticationCloudCam
- func (authCam *AuthenticationCloudCam) Close() error
- func (authCam *AuthenticationCloudCam) CreateAuthMetadata(action string, metadata map[string]string)
- func (authCam *AuthenticationCloudCam) GetAuthMethodName() string
- func (authCam *AuthenticationCloudCam) Initialize(authParams map[string]string) error
Constants ¶
View Source
const ( ALGORITHM = "HmacSHA1" METHOD = "POST" SIGANDAUTH_INTERFACENAME = "logic.cam.sigAndAuth" SIGNMODE = 1 AUTHMODE = 2 )
View Source
const AUTHMETHODNAME = "CAM"
Variables ¶
This section is empty.
Functions ¶
func GetSignKey ¶
func GetSignSrc ¶
func HmacSHA1Sign ¶
Types ¶
type AuthenticationCloud ¶
type AuthenticationCloud interface { GetAuthMethodName() string Initialize(authParams map[string]string) error CreateAuthMetadata(action string, metadata map[string]string) io.Closer }
func NewDefaultAuthenticationCloudCam ¶
func NewDefaultAuthenticationCloudCam() AuthenticationCloud
type AuthenticationCloudCam ¶
type AuthenticationCloudCam struct {
// contains filtered or unexported fields
}
func (*AuthenticationCloudCam) Close ¶
func (authCam *AuthenticationCloudCam) Close() error
func (*AuthenticationCloudCam) CreateAuthMetadata ¶
func (authCam *AuthenticationCloudCam) CreateAuthMetadata(action string, metadata map[string]string)
func (*AuthenticationCloudCam) GetAuthMethodName ¶
func (authCam *AuthenticationCloudCam) GetAuthMethodName() string
func (*AuthenticationCloudCam) Initialize ¶
func (authCam *AuthenticationCloudCam) Initialize(authParams map[string]string) error
Click to show internal directories.
Click to hide internal directories.