Versions in this module Expand all Collapse all v0 v0.2.1 Oct 7, 2014 Changes in this version + const HookCommitComment + const HookDownload + const HookForkApply + const HookForm + const HookGollum + const HookIssueComment + const HookIssues + const HookMember + const HookPublic + const HookPullRequest + const HookPush + const HookRequestReivewComment + const HookStatus + const HookTeamAdd + const HookWatch + var DefaultClient = http.DefaultClient + var ErrBadRequest = errors.New("Bad Request") + var ErrForbidden = errors.New("Forbidden") + var ErrInvalidPostReceiveHook = errors.New("Invalid Post Receive Hook") + var ErrNotAuthorized = errors.New("Unauthorized") + var ErrNotFound = errors.New("Not Found") + var Guest = New("") + func IsValidSender(ip string) bool + type Author struct + Email string + Name string + type Base struct + Label string + Ref string + Repo *CommitRepo + Sha string + User *User + type Client struct + ApiUrl string + Contents *ContentResource + Emails *EmailResource + Hooks *HookResource + Keys *KeyResource + Orgs *OrgResource + RepoKeys *RepoKeyResource + Repos *RepoResource + Token string + Users *UserResource + func New(token string) *Client + type Commit struct + Added []string + Author *Author + Id string + Message string + Timestamp string + Url string + type CommitRepo struct + Desc string + Name string + Owner *Owner + Url string + type CommitStatus struct + Description string + State string + TargetUrl string + type Content struct + Content string + Encoding string + Name string + Path string + Sha string + Size int64 + Type string + func (c *Content) DecodeContent() ([]byte, error) + type ContentResource struct + func (r *ContentResource) Find(owner, repo, path string) (*Content, error) + func (r *ContentResource) FindRef(owner, repo, path, ref string) (*Content, error) + func (r *ContentResource) ReadMe(owner, repo string) (*Content, error) + type Email struct + Email string + Primary bool + Verified bool + type EmailResource struct + func (r *EmailResource) Create(address string) error + func (r *EmailResource) Delete(address string) error + func (r *EmailResource) Find(address string) (*Email, error) + func (r *EmailResource) FindPrimary() (*Email, error) + func (r *EmailResource) List() ([]*Email, error) + type Head struct + Label string + Ref string + Repo *CommitRepo + Sha string + User *User + type Hook struct + Active bool + Config *HookConfig + Events []string + Id int + Name string + type HookConfig struct + ContentType string + Url string + type HookResource struct + func (r *HookResource) Create(owner, repo, link string) (*Hook, error) + func (r *HookResource) CreateUpdate(owner, repo, link string) (*Hook, error) + func (r *HookResource) Delete(owner, repo string, id int) error + func (r *HookResource) DeleteUrl(owner, repo, link string) error + func (r *HookResource) Find(owner, repo string, id int) (*Hook, error) + func (r *HookResource) FindUrl(owner, repo, link string) (*Hook, error) + func (r *HookResource) List(owner, repo string) ([]*Hook, error) + func (r *HookResource) Update(owner, repo string, hook *Hook) (*Hook, error) + type Key struct + Id int + Key string + Title string + Url string + type KeyResource struct + func (r *KeyResource) Create(key, title string) (*Key, error) + func (r *KeyResource) CreateUpdate(key, title string) (*Key, error) + func (r *KeyResource) Delete(id int) error + func (r *KeyResource) DeleteName(title string) error + func (r *KeyResource) Find(id int) (*Key, error) + func (r *KeyResource) FindName(title string) (*Key, error) + func (r *KeyResource) List() ([]*Key, error) + func (r *KeyResource) Update(key, title string, id int) (*Key, error) + type Org struct + Avatar string + Login string + Url string + type OrgResource struct + func (r *OrgResource) List() ([]*Org, error) + type Owner struct + Login string + Name string + Type string + type Permissions struct + Admin bool + Pull bool + Push bool + type PostReceiveHook struct + After string + Before string + Commits []*Commit + Deleted bool + Head *Commit + Ref string + Repo *CommitRepo + func ParseHook(raw []byte) (*PostReceiveHook, error) + func (h *PostReceiveHook) Branch() string + func (h *PostReceiveHook) IsDeleted() bool + func (h *PostReceiveHook) IsGithubPages() bool + func (h *PostReceiveHook) IsHead() bool + func (h *PostReceiveHook) IsTag() bool + type PullRequest struct + Additions int + Base *Base + Changed int + Commits int + Deletions int + Head *Head + Id int + Merged bool + Number int + State string + Title string + Url string + User *User + type PullRequestHook struct + Action string + Number int + PullRequest *PullRequest + Repo *CommitRepo + Sender *User + func ParsePullRequestHook(raw []byte) (*PullRequestHook, error) + func (h *PullRequestHook) IsOpened() bool + type Repo struct + CloneUrl string + Fork bool + FullName string + GitUrl string + HtmlUrl string + ID int64 + Name string + Owner *Owner + Permissions *Permissions + Private bool + Source *Source + SshUrl string + type RepoKeyResource struct + func (r *RepoKeyResource) Create(owner, repo, key, title string) (*Key, error) + func (r *RepoKeyResource) CreateUpdate(owner, repo, key, title string) (*Key, error) + func (r *RepoKeyResource) Delete(owner, repo string, id int) error + func (r *RepoKeyResource) DeleteName(owner, repo, label string) error + func (r *RepoKeyResource) Find(owner, repo string, id int) (*Key, error) + func (r *RepoKeyResource) FindName(owner, repo, title string) (*Key, error) + func (r *RepoKeyResource) List(owner, repo string) ([]*Key, error) + func (r *RepoKeyResource) Update(owner, repo, key, title string, id int) (*Key, error) + type RepoResource struct + func (r *RepoResource) CreateStatus(owner, repo, state, link, comment, sha string) error + func (r *RepoResource) Find(owner, repo string) (*Repo, error) + func (r *RepoResource) FindRaw(owner, repo string) ([]byte, error) + func (r *RepoResource) List() ([]*Repo, error) + func (r *RepoResource) ListAll() ([]*Repo, error) + func (r *RepoResource) ListOrg(orgname string) ([]*Repo, error) + func (r *RepoResource) ListUser(username string) ([]*Repo, error) + type Source struct + Owner *Owner + type User struct + Avatar string + Blog string + Company string + Email string + GravatarId string + ID int64 + Location string + Login string + Name string + Type string + Url string + type UserResource struct + func (r *UserResource) Current() (*User, error) + func (r *UserResource) Find(username string) (*User, error)