Documentation ¶
Index ¶
- Constants
- func GetKeyTitle(rawurl string) (string, error)
- func Register()
- type Bitbucket
- func (r *Bitbucket) Activate(user *model.User, repo *model.Repo, link string) error
- func (r *Bitbucket) Authorize(res http.ResponseWriter, req *http.Request) (*model.Login, error)
- func (r *Bitbucket) Deactivate(user *model.User, repo *model.Repo, link string) error
- func (r *Bitbucket) GetHost() string
- func (r *Bitbucket) GetKind() string
- func (r *Bitbucket) GetRepos(user *model.User) ([]*model.Repo, error)
- func (r *Bitbucket) GetScript(user *model.User, repo *model.Repo, hook *model.Hook) ([]byte, error)
- func (r *Bitbucket) GetToken(user *model.User) (*model.Token, error)
- func (r *Bitbucket) OpenRegistration() bool
- func (r *Bitbucket) ParseHook(req *http.Request) (*model.Hook, error)
Constants ¶
View Source
const ( DefaultAPI = "https://api.bitbucket.org/1.0" DefaultURL = "https://bitbucket.org" )
Variables ¶
This section is empty.
Functions ¶
func GetKeyTitle ¶
GetKeyTitle is a helper function that generates a title for the RSA public key based on the username and domain name.
Types ¶
type Bitbucket ¶
func NewDefault ¶
func (*Bitbucket) Activate ¶
Activate activates a repository by adding a Post-commit hook and a Public Deploy key, if applicable.
func (*Bitbucket) Deactivate ¶
Deactivate removes a repository by removing all the post-commit hooks which are equal to link and removing the SSH deploy key.
func (*Bitbucket) GetKind ¶
GetKind returns the internal identifier of this remote Bitbucket instane.
func (*Bitbucket) GetRepos ¶
GetRepos fetches all repositories that the specified user has access to in the remote system.
func (*Bitbucket) GetScript ¶
GetScript fetches the build script (.drone.yml) from the remote repository and returns in string format.
func (*Bitbucket) OpenRegistration ¶
Click to show internal directories.
Click to hide internal directories.