Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertRepoURL ¶
Convert the given repository URL into an API URL https://github.com/kkochis/adoptmyapp to https://api.github.com/repos/kkochis/adoptmyapp TODO Error checking, what if a github.com URL was not given
func NormalizeGitHubSSH ¶
Convert a GitHub SSH link into a URL
Types ¶
type Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
func NewMemoryDB ¶
func NewMemoryDB() *Memory
type Mongo ¶
type Mongo struct {
// contains filtered or unexported fields
}
type Repository ¶
type Repository struct { URL string `json:"url"` // Normalized URL Id int64 `json:"id"` Name string `json:"name"` FullName string `json:"full_name"` Owner *User `json:"owner"` HtmlURL string `json:"html_url"` Description string `json:"description"` IsPrivate bool `json:"private"` IsFork bool `json:"fork"` Created time.Time `json:"created_at"` Updated time.Time `json:"updated_at"` Subscribers int64 `json:"subscribers"` }
The JSON object returned from a GET to the github API for repositories curl -i https://api.github.com/repos/kkochis/adoptmyapp TODO Are owners always Users?
func GetRepoInfo ¶
func GetRepoInfo(repositoryURL string) (*Repository, error)
func ParseRepository ¶
func ParseRepository(data []byte) (*Repository, error)
Click to show internal directories.
Click to hide internal directories.