Documentation
¶
Overview ¶
Module to fetch details of a github repo using github API and github graphQL.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client defines the client to fetch data.
func NewClient ¶
func NewClient(opts ...ClientOption) (*Client, error)
NewClient defines the function to init a Client.
func (*Client) GetGraphQLData ¶
type ClientOption ¶
type ClientOption func(*Client)
ClientOption defines the option to modify Client's behavior.
func WithAPIKey ¶
func WithAPIKey(key string) ClientOption
WithAPIKey defines the option to set github API key.
type RepoDetails ¶
type RepoDetails struct { // URL contains the repo url URL string `json:"url"` // Timestamp contains response timestamp in unix epochs Timestamp int64 `json:"timestamp"` // CreatedAt contains the repo creation timestamp CreatedAt string `json:"created_at"` // LastUpdatedAt contains the timestamp of repo last update LastUpdatedAt string `json:"last_updated_at"` // StargazerCount contains the count of start for the repo StargazerCnt int `json:"stargazer_count"` // ForksCnt contains the count of the repo forks ForksCnt int `json:"forks_count"` }
RepoDetails defines the features about the repo.
type Response ¶
type Response struct { // Status response http status code. Status int8 // Details Details *RepoDetails }
Response defines the response object.
Click to show internal directories.
Click to hide internal directories.