Documentation ¶
Index ¶
- func NewClient(ConsumerRSA string, ConsumerKey string, URL string) *oauth.Consumer
- func NewClientWithToken(Consumer *oauth.Consumer, AccessToken string) *http.Client
- type BSRepo
- type BitbucketServer
- func (bs *BitbucketServer) Activate(u *model.User, r *model.Repo, k *model.Key, link string) error
- func (bs *BitbucketServer) Auth(token, secret string) (string, error)
- func (bs *BitbucketServer) CreateHook(client *http.Client, project, slug, hook_key, link string) (*Hook, error)
- func (bs *BitbucketServer) Deactivate(u *model.User, r *model.Repo, link string) error
- func (bs *BitbucketServer) DeleteHook(client *http.Client, project, slug, hook_key, link string) error
- func (bs *BitbucketServer) File(u *model.User, r *model.Repo, b *model.Build, f string) ([]byte, error)
- func (bs *BitbucketServer) Hook(r *http.Request) (*model.Repo, *model.Build, error)
- func (bs *BitbucketServer) Login(res http.ResponseWriter, req *http.Request) (*model.User, bool, error)
- func (bs *BitbucketServer) Netrc(user *model.User, r *model.Repo) (*model.Netrc, error)
- func (bs *BitbucketServer) Perm(u *model.User, owner, repo string) (*model.Perm, error)
- func (bs *BitbucketServer) Repo(u *model.User, owner, name string) (*model.Repo, error)
- func (bs *BitbucketServer) Repos(u *model.User) ([]*model.RepoLite, error)
- func (bs *BitbucketServer) Status(u *model.User, r *model.Repo, b *model.Build, link string) error
- func (bs *BitbucketServer) String() string
- type Hook
- type HookDetail
- type Repos
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BSRepo ¶
type BSRepo struct { Forkable bool `json:"forkable"` ID int `json:"id"` Links struct { Clone []struct { Href string `json:"href"` Name string `json:"name"` } `json:"clone"` Self []struct { Href string `json:"href"` } `json:"self"` } `json:"links"` Name string `json:"name"` Project struct { Description string `json:"description"` ID int `json:"id"` Key string `json:"key"` Links struct { Self []struct { Href string `json:"href"` } `json:"self"` } `json:"links"` Name string `json:"name"` Public bool `json:"public"` Type string `json:"type"` } `json:"project"` Public bool `json:"public"` ScmID string `json:"scmId"` Slug string `json:"slug"` State string `json:"state"` StatusMessage string `json:"statusMessage"` }
type BitbucketServer ¶
type BitbucketServer struct { URL string ConsumerKey string GitUserName string GitPassword string ConsumerRSA string Open bool Consumer oauth.Consumer }
func Load ¶
func Load(config string) *BitbucketServer
func (*BitbucketServer) Auth ¶
func (bs *BitbucketServer) Auth(token, secret string) (string, error)
func (*BitbucketServer) CreateHook ¶
func (bs *BitbucketServer) CreateHook(client *http.Client, project, slug, hook_key, link string) (*Hook, error)
Enable hook for named repository
func (*BitbucketServer) Deactivate ¶
func (*BitbucketServer) DeleteHook ¶
func (bs *BitbucketServer) DeleteHook(client *http.Client, project, slug, hook_key, link string) error
Disable hook for named repository
func (*BitbucketServer) Login ¶
func (bs *BitbucketServer) Login(res http.ResponseWriter, req *http.Request) (*model.User, bool, error)
func (*BitbucketServer) String ¶
func (bs *BitbucketServer) String() string
type Hook ¶
type Hook struct { Enabled bool `"json:enabled"` Details *HookDetail `"json:details"` }
type HookDetail ¶
type Repos ¶
type Repos struct { IsLastPage bool `json:"isLastPage"` Limit int `json:"limit"` Size int `json:"size"` Start int `json:"start"` Values []struct { Forkable bool `json:"forkable"` ID int `json:"id"` Links struct { Clone []struct { Href string `json:"href"` Name string `json:"name"` } `json:"clone"` Self []struct { Href string `json:"href"` } `json:"self"` } `json:"links"` Name string `json:"name"` Project struct { Description string `json:"description"` ID int `json:"id"` Key string `json:"key"` Links struct { Self []struct { Href string `json:"href"` } `json:"self"` } `json:"links"` Name string `json:"name"` Public bool `json:"public"` Type string `json:"type"` } `json:"project"` Public bool `json:"public"` ScmID string `json:"scmId"` Slug string `json:"slug"` State string `json:"state"` StatusMessage string `json:"statusMessage"` } `json:"values"` }
type User ¶
type User struct { Active bool `json:"active"` DisplayName string `json:"displayName"` EmailAddress string `json:"emailAddress"` ID int `json:"id"` Links struct { Self []struct { Href string `json:"href"` } `json:"self"` } `json:"links"` Name string `json:"name"` Slug string `json:"slug"` Type string `json:"type"` }
Click to show internal directories.
Click to hide internal directories.