Versions in this module Expand all Collapse all v0 v0.2.1 Oct 7, 2014 Changes in this version + const BrokerTypePost + const BrokerTypePullRequestPost + const TeamRoleAdmin + const TeamRoleCollab + var DefaultClient = http.DefaultClient + var ErrBadRequest = errors.New("Bad Request") + var ErrForbidden = errors.New("Forbidden") + var ErrInvalidPostReceiveHook = errors.New("Invalid Post Receive Hook") + var ErrNilClient = errors.New("client is nil") + var ErrNotAuthorized = errors.New("Unauthorized") + var ErrNotFound = errors.New("Not Found") + var Guest = New("", "", "", "") + func IsValidSender(ip string) bool + type Account struct + Repos []*Repo + User *User + type Branch struct + Author string + Branch string + Files []*BranchFile + Message string + Node string + RawAuthor string + RawNode string + type BranchFile struct + File string + Type string + type Broker struct + Id int + Profile *BrokerProfile + type BrokerField struct + Name string + Value string + type BrokerProfile struct + Fields []*BrokerField + Type string + type BrokerResource struct + func (r *BrokerResource) Create(owner, slug, link, brokerType string) (*Broker, error) + func (r *BrokerResource) CreateUpdate(owner, slug, link, brokerType string) (*Broker, error) + func (r *BrokerResource) Delete(owner, slug string, id int) error + func (r *BrokerResource) DeleteUrl(owner, slug, url, brokerType string) error + func (r *BrokerResource) Find(owner, slug string, id int) (*Broker, error) + func (r *BrokerResource) FindUrl(owner, slug, link, brokerType string) (*Broker, error) + func (r *BrokerResource) GetPatch(owner, slug string, id int) (string, error) + func (r *BrokerResource) List(owner, slug string) ([]*Broker, error) + func (r *BrokerResource) Update(owner, slug, link, brokerType string, id int) (*Broker, error) + type Client struct + AccessToken string + Brokers *BrokerResource + ConsumerKey string + ConsumerSecret string + Emails *EmailResource + Keys *KeyResource + RepoKeys *RepoKeyResource + Repos *RepoResource + Sources *SourceResource + Teams *TeamResource + TokenSecret string + Users *UserResource + func New(consumerKey, consumerSecret, accessToken, tokenSecret string) *Client + type Commit struct + Author string + Branch string + Files []*File + Hash string + Message string + type Email struct + Active bool + Email string + Primary bool + type EmailResource struct + func (r *EmailResource) Create(account, address string) (*Email, error) + func (r *EmailResource) Find(account, address string) (*Email, error) + func (r *EmailResource) FindPrimary(account string) (*Email, error) + func (r *EmailResource) List(account string) ([]*Email, error) + type File struct + Name string + Type string + type Key struct + Id int + Key string + Label string + type KeyResource struct + func (r *KeyResource) Create(account, key, label string) (*Key, error) + func (r *KeyResource) CreateUpdate(account, key, label string) (*Key, error) + func (r *KeyResource) Delete(account string, id int) error + func (r *KeyResource) Find(account string, id int) (*Key, error) + func (r *KeyResource) FindName(account, label string) (*Key, error) + func (r *KeyResource) List(account string) ([]*Key, error) + func (r *KeyResource) Update(account, key, label string, id int) (*Key, error) + type PostReceiveHook struct + Commits []*Commit + Repo *Repo + Url string + User string + func ParseHook(raw []byte) (*PostReceiveHook, error) + type PullRequestHook struct + Id string + func ParsePullRequestHook(raw []byte) (*PullRequestHook, error) + type Repo struct + ForkOf *Repo + IsFork bool + Language string + Logo string + Name string + Owner string + Private bool + Scm string + Slug string + type RepoKeyResource struct + func (r *RepoKeyResource) Create(owner, slug, key, label string) (*Key, error) + func (r *RepoKeyResource) CreateUpdate(owner, slug, key, label string) (*Key, error) + func (r *RepoKeyResource) Delete(owner, slug string, id int) error + func (r *RepoKeyResource) DeleteName(owner, slug, label string) error + func (r *RepoKeyResource) Find(owner, slug string, id int) (*Key, error) + func (r *RepoKeyResource) FindName(owner, slug, label string) (*Key, error) + func (r *RepoKeyResource) List(owner, slug string) ([]*Key, error) + func (r *RepoKeyResource) Update(owner, slug, key, label string, id int) (*Key, error) + type RepoResource struct + func (r *RepoResource) Find(owner, slug string) (*Repo, error) + func (r *RepoResource) List() ([]*Repo, error) + func (r *RepoResource) ListBranches(owner, slug string) ([]*Branch, error) + func (r *RepoResource) ListDashboard() ([]*Account, error) + func (r *RepoResource) ListDashboardRepos() ([]*Repo, error) + func (r *RepoResource) ListUser(owner string) ([]*Repo, error) + type Source struct + Data string + Node string + Path string + Size int64 + type SourceResource struct + func (r *SourceResource) Find(owner, slug, revision, path string) (*Source, error) + func (r *SourceResource) List(owner, slug, revision, path string) ([]*Source, error) + type Team struct + Name string + Role string + type TeamResource struct + func (r *TeamResource) List() ([]*Team, error) + type User struct + Avatar string + DisplayName string + FirstName string + IsTeam bool + LastName string + Username string + type UserResource struct + func (r *UserResource) Current() (*Account, error) + func (r *UserResource) Find(username string) (*Account, error)