Documentation ¶
Index ¶
- func GetUrlParam(urlPath string, param map[string][]string) string
- type AccessToken
- type AccessTokenInterface
- type BaseRequest
- func (bq *BaseRequest) Get(url string, option HttpOption) (Response, error)
- func (bq *BaseRequest) HttpPostJson(url string, option HttpOption) (Response, error)
- func (bq *BaseRequest) Post(url string, option HttpOption) (Response, error)
- func (bq *BaseRequest) Request(url string, method string, option HttpOption) (Response, error)
- type DefaultConfig
- type HttpOption
- type Message
- type OpenPlatform
- func (op *OpenPlatform) CreatePreAuthorizationCode() ([]byte, error)
- func (op *OpenPlatform) GetAccessToken() (*Token, error)
- func (op *OpenPlatform) GetAuthorizer(appid string) ([]byte, error)
- func (op *OpenPlatform) GetAuthorizerOption(appid string, optionName string) ([]byte, error)
- func (op *OpenPlatform) GetAuthorizerToken(appid string, refreshToken string) ([]byte, error)
- func (op *OpenPlatform) HandleAuthorize(authCode string) ([]byte, error)
- func (op *OpenPlatform) SetAuthorizerOption(appid string, optionName string, optionValue string) ([]byte, error)
- type Response
- type StorageInterface
- type Token
- type VerifyTicketInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AccessToken ¶
type AccessToken struct {
// contains filtered or unexported fields
}
func NewComponentAccessToken ¶
func NewComponentAccessToken(appid string, appsecret string, verifyTicket VerifyTicketInterface) *AccessToken
func (*AccessToken) GetToken ¶
func (at *AccessToken) GetToken() (*Token, error)
func (*AccessToken) GetTokenKey ¶
func (at *AccessToken) GetTokenKey() string
func (*AccessToken) Refresh ¶
func (at *AccessToken) Refresh() (*Token, error)
type AccessTokenInterface ¶
type BaseRequest ¶
type BaseRequest struct { DefaultConfig DefaultConfig AccessToken AccessTokenInterface }
func NewBaseRequest ¶
func NewBaseRequest() *BaseRequest
func (*BaseRequest) Get ¶
func (bq *BaseRequest) Get(url string, option HttpOption) (Response, error)
func (*BaseRequest) HttpPostJson ¶
func (bq *BaseRequest) HttpPostJson(url string, option HttpOption) (Response, error)
func (*BaseRequest) Post ¶
func (bq *BaseRequest) Post(url string, option HttpOption) (Response, error)
func (*BaseRequest) Request ¶
func (bq *BaseRequest) Request(url string, method string, option HttpOption) (Response, error)
type DefaultConfig ¶
type HttpOption ¶
type Message ¶
type Message struct { BaseRequest Response }
type OpenPlatform ¶
type OpenPlatform struct {
// contains filtered or unexported fields
}
func NewOpenPlatform ¶
func NewOpenPlatform(appid string, appsecret string, verifyTicket VerifyTicketInterface) *OpenPlatform
func (*OpenPlatform) CreatePreAuthorizationCode ¶
func (op *OpenPlatform) CreatePreAuthorizationCode() ([]byte, error)
func (*OpenPlatform) GetAccessToken ¶
func (op *OpenPlatform) GetAccessToken() (*Token, error)
func (*OpenPlatform) GetAuthorizer ¶
func (op *OpenPlatform) GetAuthorizer(appid string) ([]byte, error)
func (*OpenPlatform) GetAuthorizerOption ¶
func (op *OpenPlatform) GetAuthorizerOption(appid string, optionName string) ([]byte, error)
func (*OpenPlatform) GetAuthorizerToken ¶
func (op *OpenPlatform) GetAuthorizerToken(appid string, refreshToken string) ([]byte, error)
func (*OpenPlatform) HandleAuthorize ¶
func (op *OpenPlatform) HandleAuthorize(authCode string) ([]byte, error)
func (*OpenPlatform) SetAuthorizerOption ¶
type StorageInterface ¶
type VerifyTicketInterface ¶
Click to show internal directories.
Click to hide internal directories.