Documentation ¶
Index ¶
- type Account
- type Branch
- type BranchResp
- type Change
- type Client
- func (c *Client) CreateHook(owner, name string, hook *Hook) error
- func (c *Client) CreateStatus(owner, name, revision string, status *PipelineStatus) error
- func (c *Client) DeleteHook(owner, name, id string) error
- func (c *Client) FindCurrent() (*Account, error)
- func (c *Client) FindHook(owner, name, id string) (*Hook, error)
- func (c *Client) FindRepo(owner, name string) (*Repo, error)
- func (c *Client) FindSource(owner, name, revision, path string) (*string, error)
- func (c *Client) GetBranchHead(owner, name, branch string) (*Commit, error)
- func (c *Client) GetPermission(fullName string) (*RepoPerm, error)
- func (c *Client) GetRepoFiles(owner, name, revision, path string, page *string) (*DirResp, error)
- func (c *Client) GetUserWorkspaceMembership(workspace, user string) (string, error)
- func (c *Client) GetWorkspace(name string) (*Workspace, error)
- func (c *Client) ListBranches(owner, name string, opts *ListOpts) ([]*Branch, error)
- func (c *Client) ListEmail() (*EmailResp, error)
- func (c *Client) ListHooks(owner, name string, opts *ListOpts) (*HookResp, error)
- func (c *Client) ListPermissions(opts *ListOpts) (*RepoPermResp, error)
- func (c *Client) ListPermissionsAll() ([]*RepoPerm, error)
- func (c *Client) ListPullRequests(owner, name string, opts *ListOpts) ([]*PullRequest, error)
- func (c *Client) ListRepos(workspace string, opts *ListOpts) (*RepoResp, error)
- func (c *Client) ListReposAll(workspace string) ([]*Repo, error)
- func (c *Client) ListWorkspaces(opts *ListWorkspacesOpts) (*WorkspacesResp, error)
- type Commit
- type CommitsResp
- type Dir
- type DirResp
- type Email
- type EmailResp
- type Error
- type Hook
- type HookResp
- type Link
- type LinkClone
- type Links
- type ListOpts
- type ListWorkspacesOpts
- type PipelineStatus
- type PullRequest
- type PullRequestHook
- type PullRequestResp
- type PushHook
- type Repo
- type RepoPerm
- type RepoPermResp
- type RepoResp
- type Workspace
- type WorkspaceMembershipResp
- type WorkspacesResp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BranchResp ¶
type BranchResp struct {
Values []*Branch `json:"values"`
}
type Change ¶
type Change struct { New struct { Type string `json:"type"` Name string `json:"name"` Target struct { Type string `json:"type"` Hash string `json:"hash"` Message string `json:"message"` Date time.Time `json:"date"` Links Links `json:"links"` Author struct { Raw string `json:"raw"` User Account `json:"user"` } `json:"author"` } `json:"target"` } `json:"new"` }
type Client ¶
func NewClientToken ¶
func (*Client) CreateStatus ¶
func (c *Client) CreateStatus(owner, name, revision string, status *PipelineStatus) error
func (*Client) DeleteHook ¶
func (*Client) FindCurrent ¶
func (*Client) FindSource ¶
func (*Client) GetBranchHead ¶
func (*Client) GetRepoFiles ¶
func (*Client) GetUserWorkspaceMembership ¶
func (*Client) ListBranches ¶
func (*Client) ListPermissions ¶ added in v2.2.0
func (c *Client) ListPermissions(opts *ListOpts) (*RepoPermResp, error)
func (*Client) ListPermissionsAll ¶ added in v2.2.0
func (*Client) ListPullRequests ¶
func (c *Client) ListPullRequests(owner, name string, opts *ListOpts) ([]*PullRequest, error)
func (*Client) ListWorkspaces ¶
func (c *Client) ListWorkspaces(opts *ListWorkspacesOpts) (*WorkspacesResp, error)
type CommitsResp ¶
type CommitsResp struct {
Values []*Commit `json:"values"`
}
type ListWorkspacesOpts ¶
func (*ListWorkspacesOpts) Encode ¶
func (o *ListWorkspacesOpts) Encode() string
type PipelineStatus ¶
type PullRequest ¶
type PullRequestHook ¶
type PullRequestHook struct { Actor Account `json:"actor"` Repo Repo `json:"repository"` PullRequest struct { ID int `json:"id"` Type string `json:"type"` Reason string `json:"reason"` Desc string `json:"description"` Title string `json:"title"` State string `json:"state"` Links Links `json:"links"` Created time.Time `json:"created_on"` Updated time.Time `json:"updated_on"` Source struct { Repo Repo `json:"repository"` Commit struct { Hash string `json:"hash"` Links Links `json:"links"` } `json:"commit"` Branch struct { Name string `json:"name"` } `json:"branch"` } `json:"source"` Dest struct { Repo Repo `json:"repository"` Commit struct { Hash string `json:"hash"` Links Links `json:"links"` } `json:"commit"` Branch struct { Name string `json:"name"` } `json:"branch"` } `json:"destination"` } `json:"pullrequest"` }
type PullRequestResp ¶
type PullRequestResp struct { Page uint `json:"page"` PageLen uint `json:"pagelen"` Size uint `json:"size"` Values []*PullRequest `json:"values"` }
type Repo ¶
type Repo struct { UUID string `json:"uuid"` Owner Account `json:"owner"` Name string `json:"name"` FullName string `json:"full_name"` Language string `json:"language"` IsPrivate bool `json:"is_private"` Scm string `json:"scm"` Desc string `json:"desc"` Links Links `json:"links"` Mainbranch struct { Type string `json:"type"` Name string `json:"name"` } `json:"mainbranch"` }
type RepoPermResp ¶
type WorkspaceMembershipResp ¶
Click to show internal directories.
Click to hide internal directories.