Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet( ProvideConfig, ProvideService, wire.Bind(new(ServiceInterface), new(*Service)), )
ProviderSet is a Wire provider set that includes all the providers from the github package.
Functions ¶
This section is empty.
Types ¶
type Config ¶
Config is a struct that holds the configuration for the GitHub service.
func ProvideConfig ¶
ProvideConfig is a Wire provider function that creates a Config.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service holds GitHub OAuth configuration.
func NewService ¶
NewService creates a new GitHub Service instance with the given client ID and client secret.
func ProvideService ¶
ProvideService is a Wire provider function that creates a Service.
func (*Service) ExchangeCodeForToken ¶
ExchangeCodeForToken exchanges the given code from https://github.com/login/oauth/authorize?client_id=&redirect_uri= for an access token.
type ServiceInterface ¶
type UserInfo ¶
type UserInfo struct {
Login string `json:"login"`
ID int `json:"id"`
NodeID string `json:"node_id"`
AvatarURL string `json:"avatar_url"`
GravatarID string `json:"gravatar_id"`
URL string `json:"url"`
HTMLURL string `json:"html_url"`
FollowersURL string `json:"followers_url"`
FollowingURL string `json:"following_url"`
GistsURL string `json:"gists_url"`
StarredURL string `json:"starred_url"`
SubscriptionsURL string `json:"subscriptions_url"`
OrganizationsURL string `json:"organizations_url"`
ReposURL string `json:"repos_url"`
EventsURL string `json:"events_url"`
ReceivedEventsURL string `json:"received_events_url"`
Type string `json:"type"`
SiteAdmin bool `json:"site_admin"`
Name string `json:"name"`
Company string `json:"company"`
Blog string `json:"blog"`
Location string `json:"location"`
Email string `json:"email"`
Hireable bool `json:"hireable"`
Bio string `json:"bio"`
TwitterUsername string `json:"twitter_username"`
PublicRepos int `json:"public_repos"`
PublicGists int `json:"public_gists"`
Followers int `json:"followers"`
Following int `json:"following"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
UserInfo is a struct to hold GitHub user data.
Click to show internal directories.
Click to hide internal directories.