dto

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthCodeReq

type AuthCodeReq struct {
	UID         int    `json:"uid"`
	APPID       string `json:"appid"`
	Scope       string `json:"scope"`        //预留参数,后面需要的时间给
	RedirectUri string `json:"redirect_uri"` //要跳转的域名
}

func (AuthCodeReq) Check

func (a AuthCodeReq) Check() error

func (AuthCodeReq) GetRedirectUriHost

func (a AuthCodeReq) GetRedirectUriHost() (string, error)

type AuthTokenSimple

type AuthTokenSimple struct {
	OpenID       string `json:"open_id"`
	AccessToken  string `json:"access_token"`  // 网页授权接口调用凭证,注意:此access_token与基础支持的access_token不同
	ExpiresIn    int64  `json:"expires_in"`    // access_token接口调用凭证超时时间,单位(秒)
	RefreshToken string `json:"refresh_token"` // 用户刷新access_token
	Scope        string `json:"scope"`         // 用户授权的作用域,使用逗号(,)分隔
}

type OpenIdTokenReq

type OpenIdTokenReq struct {
	OpenId string `json:"open_id"`
	Token  string `json:"token"`
}

func (OpenIdTokenReq) Check

func (a OpenIdTokenReq) Check() error

type ProduceAuthTokenReq

type ProduceAuthTokenReq struct {
	Code      string `json:"code"`
	APPID     string `json:"appid"`
	Secret    string `json:"secret"`
	GrantType string `json:"grant_type"` //填写为authorization_code
}

type RefreshAccessTokenReq

type RefreshAccessTokenReq struct {
	APPID        string `json:"appid"`
	GrantType    string `json:"grant_type"`    //填写为 refresh_token
	RefreshToken string `json:"refresh_token"` // 用户刷新access_token
}

func (RefreshAccessTokenReq) Check

func (a RefreshAccessTokenReq) Check() error

type UserSimple

type UserSimple struct {
	OpenId   string `json:"open_id"`   // 用户唯一标示
	Username string `json:"user_name"` // 用户名
	Phone    string `json:"phone"`     // 手机号码
	Avatar   string `json:"avatar"`    // 头像
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL