Documentation ¶
Index ¶
- func Init()
- type Client
- func (c *Client) Clone() *Client
- func (c *Client) GetAccessToken(request *GetAccessTokenRequest) (*GetAccessTokenResponse, error)
- func (c *Client) GetJsTicket(accessToken string) (*GetJsTicketResponse, error)
- func (c *Client) GetUserDetail(userId string, accessToken string) (*GetUserDetailResponse, error)
- func (c *Client) GetUserInfo(code string, accessToken string) (*GetUserInfoResponse, error)
- type DingtalkController
- type DingtalkService
- func (s *DingtalkService) GetAccessToken(appId string) (string, bool)
- func (s *DingtalkService) GetApp(corpId string, agentId int) *Client
- func (s *DingtalkService) GetAppByAppId(appId string) *Client
- func (s *DingtalkService) GetJsTicket(appId string) (string, bool)
- func (s *DingtalkService) GetSignature(ctx context.Context, appId string, url string, nonce string, timestamp int64) (*map[string]interface{}, error)
- func (s *DingtalkService) GetSocialUserByCode(ctx context.Context, socialChannelId string, code string) *social.SocialUser
- type GetAccessTokenRequest
- type GetAccessTokenResponse
- type GetJsTicketResponse
- type GetUserDetailResponse
- type GetUserDetailResponseBody
- type GetUserInfoResponse
- type GetUserInfoResponseBody
- type OpenAPIResponse
- type Unmarshallable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
func (*Client) GetAccessToken ¶
func (c *Client) GetAccessToken(request *GetAccessTokenRequest) (*GetAccessTokenResponse, error)
func (*Client) GetJsTicket ¶
func (c *Client) GetJsTicket(accessToken string) (*GetJsTicketResponse, error)
func (*Client) GetUserDetail ¶
func (c *Client) GetUserDetail(userId string, accessToken string) (*GetUserDetailResponse, error)
func (*Client) GetUserInfo ¶
func (c *Client) GetUserInfo(code string, accessToken string) (*GetUserInfoResponse, error)
type DingtalkController ¶
type DingtalkController struct { controller.ResourceController DingtalkService *DingtalkService `inject:"dingtalkService"` }
func (*DingtalkController) GetSignature ¶
func (c *DingtalkController) GetSignature(ctx *gin.Context)
func (*DingtalkController) InitRouter ¶
func (e *DingtalkController) InitRouter(g *gin.RouterGroup) *gin.RouterGroup
*
- 处理WEB验证码的API路由
type DingtalkService ¶
type DingtalkService struct {
// contains filtered or unexported fields
}
func (*DingtalkService) GetAccessToken ¶
func (s *DingtalkService) GetAccessToken(appId string) (string, bool)
func (*DingtalkService) GetApp ¶
func (s *DingtalkService) GetApp(corpId string, agentId int) *Client
func (*DingtalkService) GetAppByAppId ¶
func (s *DingtalkService) GetAppByAppId(appId string) *Client
func (*DingtalkService) GetJsTicket ¶
func (s *DingtalkService) GetJsTicket(appId string) (string, bool)
func (*DingtalkService) GetSignature ¶
func (*DingtalkService) GetSocialUserByCode ¶
func (s *DingtalkService) GetSocialUserByCode(ctx context.Context, socialChannelId string, code string) *social.SocialUser
type GetAccessTokenRequest ¶
type GetAccessTokenRequest struct { // 应用id AppKey *string `json:"appKey,omitempty" xml:"appKey,omitempty"` // 应用密码 AppSecret *string `json:"appSecret,omitempty" xml:"appSecret,omitempty"` }
func (GetAccessTokenRequest) GoString ¶
func (s GetAccessTokenRequest) GoString() string
func (*GetAccessTokenRequest) SetAppKey ¶
func (s *GetAccessTokenRequest) SetAppKey(v string) *GetAccessTokenRequest
func (*GetAccessTokenRequest) SetAppSecret ¶
func (s *GetAccessTokenRequest) SetAppSecret(v string) *GetAccessTokenRequest
func (GetAccessTokenRequest) String ¶
func (s GetAccessTokenRequest) String() string
type GetAccessTokenResponse ¶
type GetAccessTokenResponse struct { *OpenAPIResponse // accessToken AccessToken string `json:"access_token,omitempty" xml:"accessToken,omitempty"` // 超时时间 ExpiresIn int64 `json:"expires_in,omitempty" xml:"expireIn,omitempty"` }
func (GetAccessTokenResponse) GoString ¶
func (s GetAccessTokenResponse) GoString() string
func (*GetAccessTokenResponse) SetAccessToken ¶
func (s *GetAccessTokenResponse) SetAccessToken(v string) *GetAccessTokenResponse
func (*GetAccessTokenResponse) SetExpiresIn ¶
func (s *GetAccessTokenResponse) SetExpiresIn(v int64) *GetAccessTokenResponse
func (GetAccessTokenResponse) String ¶
func (s GetAccessTokenResponse) String() string
type GetJsTicketResponse ¶
type GetJsTicketResponse struct { *OpenAPIResponse Ticket string `json:"ticket,omitempty" xml:"ticket,omitempty"` // accessToken ExpiresIn int64 `json:"expires_in,omitempty" xml:"expiresIn,omitempty"` // 超时时间 }
func (GetJsTicketResponse) GoString ¶
func (s GetJsTicketResponse) GoString() string
func (*GetJsTicketResponse) SetExpireIn ¶
func (s *GetJsTicketResponse) SetExpireIn(v int64) *GetJsTicketResponse
func (*GetJsTicketResponse) SetTicket ¶
func (s *GetJsTicketResponse) SetTicket(v string) *GetJsTicketResponse
func (GetJsTicketResponse) String ¶
func (s GetJsTicketResponse) String() string
type GetUserDetailResponse ¶
type GetUserDetailResponse struct { *OpenAPIResponse Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty" require:"true"` Result *GetUserDetailResponseBody `json:"result,omitempty" xml:"result,omitempty" require:"true"` }
type GetUserDetailResponseBody ¶
type GetUserDetailResponseBody struct { UserId string `json:"userid" xml:"userid"` UnionId string `json:"unionid" xml:"unionid"` Name string `json:"name" xml:"name"` Avatar string `json:"avatar" xml:"avatar"` Mobile string `json:"mobile" xml:"mobile"` Email string `json:"email" xml:"email"` Remark string `json:"remark" xml:"remark"` Title string `json:"title" xml:"title"` DeviceId string `json:"device_id" xml:"deviceId"` Sys bool `json:"sys" xml:"sys"` SysLevel int `json:"sys_level" xml:"sysLevel"` }
func (GetUserDetailResponseBody) GoString ¶
func (s GetUserDetailResponseBody) GoString() string
func (GetUserDetailResponseBody) String ¶
func (s GetUserDetailResponseBody) String() string
type GetUserInfoResponse ¶
type GetUserInfoResponse struct { *OpenAPIResponse Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty" require:"true"` Result *GetUserInfoResponseBody `json:"result,omitempty" xml:"result,omitempty" require:"true"` }
type GetUserInfoResponseBody ¶
type GetUserInfoResponseBody struct { UserId string `json:"userid" xml:"userid"` DeviceId string `json:"device_id" xml:"deviceId"` Sys bool `json:"sys" xml:"sys"` SysLevel int `json:"sys_level" xml:"sysLevel"` UnionId string `json:"unionid" xml:"unionid"` Name string `json:"name" xml:"name"` }
func (GetUserInfoResponseBody) GoString ¶
func (s GetUserInfoResponseBody) GoString() string
func (GetUserInfoResponseBody) String ¶
func (s GetUserInfoResponseBody) String() string
type OpenAPIResponse ¶
type Unmarshallable ¶
type Unmarshallable interface {
// contains filtered or unexported methods
}
Click to show internal directories.
Click to hide internal directories.