Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewImpl)
ProviderSet is a provider set for wire
Functions ¶
This section is empty.
Types ¶
type GetUserProfileResponse ¶
type GetUserProfileResponse struct { // UserID: Identifier of the user UserID string `json:"userId"` // DisplayName: User's display name DisplayName string `json:"displayName"` // PictureURL: Profile image URL. "https" image URL. Not included in the response if the user doesn't have a profile image. PictureURL string `json:"pictureUrl"` // StatusMessage: User's status message. Not included in the response if the user doesn't have a status message. StatusMessage string `json:"statusMessage"` }
GetUserProfileResponse ...
type IRepo ¶
type IRepo interface { // GetAccessToken serve caller to given request to get access token GetAccessToken(ctx contextx.Contextx, req *http.Request) (info *TokenResponse, err error) // GetUserProfile serve caller to given request to get user profile GetUserProfile(ctx contextx.Contextx, req *http.Request) (info *GetUserProfileResponse, err error) // GetUserByOpenID serve caller to given line open id to get user profile GetUserByOpenID(ctx contextx.Contextx, oid string) (info *user.Profile, err error) // RegisterUser serve caller to given user profile to insert into database RegisterUser(ctx contextx.Contextx, newUser *user.Profile) (info *user.Profile, err error) }
IRepo declare user's repository functions
type TokenRefreshResponse ¶
type TokenRefreshResponse struct { // TokenType: Bearer TokenType string `json:"token_type"` // Scope: Permissions granted by the user. For more information, see Scopes. // profile: Permission to get the user's profile information. // openid: Used to retrieve an ID token. For more information, see ID tokens. // email: Permission to get the user's email address. openid must be specified at the same time. For more information, see ID tokens. Scope string `json:"scope"` // AccessToken: Access token. Valid for 30 days. AccessToken string `json:"access_token"` // ExpiresIn: Amount of time in seconds until the access token expires ExpiresIn int `json:"expires_in"` // RefreshToken: Which token you want to refresh. // Token used to get a new access token. Valid up until 10 days after the access token expires. RefreshToken string `json:"refresh_token"` }
TokenRefreshResponse ...
type TokenResponse ¶
type TokenResponse struct { // AccessToken: Access token. Valid for 30 days. AccessToken string `json:"access_token"` // ExpiresIn: Amount of time in seconds until the access token expires ExpiresIn int `json:"expires_in"` // IDToken: JSON Web Token (JWT) that includes information about the user. // This field is returned only if openid is specified in the scope. For more information, see ID tokens. IDToken string `json:"id_token"` // RefreshToken: Which token you want to refresh. // Token used to get a new access token. Valid up until 10 days after the access token expires. RefreshToken string `json:"refresh_token"` // Scope: Permissions granted by the user. For more information, see Scopes. // profile: Permission to get the user's profile information. // openid: Used to retrieve an ID token. For more information, see ID tokens. // email: Permission to get the user's email address. openid must be specified at the same time. For more information, see ID tokens. Scope string `json:"scope"` // TokenType: Bearer TokenType string `json:"token_type"` }
TokenResponse ...
Click to show internal directories.
Click to hide internal directories.