Documentation ¶
Index ¶
- Variables
- type Client
- type CommitService
- func (s *CommitService) Get(host, owner, name, branch, sha string) (*model.Commit, error)
- func (s *CommitService) GetOutput(host, owner, name, branch, sha string) (io.ReadCloser, error)
- func (s *CommitService) List(host, owner, name string) ([]*model.Commit, error)
- func (s *CommitService) ListBranch(host, owner, name, branch string) ([]*model.Commit, error)
- func (s *CommitService) Rebuild(host, owner, name, branch, sha string) error
- type RepoService
- func (s *RepoService) Delete(host, owner, name string) error
- func (s *RepoService) Disable(host, owner, name string) error
- func (s *RepoService) Enable(host, owner, name string) error
- func (s *RepoService) Get(host, owner, name string) (*model.Repo, error)
- func (s *RepoService) List() ([]*model.Repo, error)
- func (s *RepoService) SetKey(host, owner, name, pub, priv string) error
- func (s *RepoService) Update(repo *model.Repo) (*model.Repo, error)
- type UserService
- func (s *UserService) Create(remote, login string) (*model.User, error)
- func (s *UserService) Delete(remote, login string) error
- func (s *UserService) Get(remote, login string) (*model.User, error)
- func (s *UserService) GetCurrent() (*model.User, error)
- func (s *UserService) List() ([]*model.User, error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Commits *CommitService Repos *RepoService Users *UserService // contains filtered or unexported fields }
type CommitService ¶
type CommitService struct {
*Client
}
func (*CommitService) Get ¶
func (s *CommitService) Get(host, owner, name, branch, sha string) (*model.Commit, error)
GET /api/repos/{host}/{owner}/{name}/branch/{branch}/commit/{commit}
func (*CommitService) GetOutput ¶
func (s *CommitService) GetOutput(host, owner, name, branch, sha string) (io.ReadCloser, error)
GET /api/repos/{host}/{owner}/{name}/branches/{branch}/commits/{commit}/console
func (*CommitService) List ¶
func (s *CommitService) List(host, owner, name string) ([]*model.Commit, error)
GET /api/repos/{host}/{owner}/{name}/feed
func (*CommitService) ListBranch ¶
func (s *CommitService) ListBranch(host, owner, name, branch string) ([]*model.Commit, error)
GET /api/repos/{host}/{owner}/{name}/branch/{branch}
func (*CommitService) Rebuild ¶
func (s *CommitService) Rebuild(host, owner, name, branch, sha string) error
POST /api/repos/{host}/{owner}/{name}/branches/{branch}/commits/{commit}?action=rebuild
type RepoService ¶
type RepoService struct {
*Client
}
func (*RepoService) Delete ¶
func (s *RepoService) Delete(host, owner, name string) error
DELETE /api/repos/{host}/{owner}/{name}?remove=true
func (*RepoService) Disable ¶
func (s *RepoService) Disable(host, owner, name string) error
POST /api/repos/{host}/{owner}/{name}/deactivate
func (*RepoService) Enable ¶
func (s *RepoService) Enable(host, owner, name string) error
POST /api/repos/{host}/{owner}/{name}
func (*RepoService) Get ¶
func (s *RepoService) Get(host, owner, name string) (*model.Repo, error)
GET /api/repos/{host}/{owner}/{name}
func (*RepoService) SetKey ¶
func (s *RepoService) SetKey(host, owner, name, pub, priv string) error
PUT /api/repos/{host}/{owner}/{name}
type UserService ¶
type UserService struct {
*Client
}
func (*UserService) Create ¶
func (s *UserService) Create(remote, login string) (*model.User, error)
POST /api/users/{host}/{login}
func (*UserService) Delete ¶
func (s *UserService) Delete(remote, login string) error
DELETE /api/users/{host}/{login}
func (*UserService) Get ¶
func (s *UserService) Get(remote, login string) (*model.User, error)
GET /api/users/{host}/{login}
func (*UserService) GetCurrent ¶
func (s *UserService) GetCurrent() (*model.User, error)
GET /api/user