Documentation
¶
Index ¶
- func GetHook(user *model.User, repo *model.Repo, link string) string
- func GetKeyTitle(rawurl string) (string, error)
- func Register()
- type Stash
- func (r *Stash) Activate(user *model.User, repo *model.Repo, link string) error
- func (r *Stash) Authorize(w http.ResponseWriter, req *http.Request) (*model.Login, error)
- func (r *Stash) Deactivate(user *model.User, repo *model.Repo, link string) error
- func (r *Stash) GetHost() string
- func (r *Stash) GetKind() string
- func (r *Stash) GetRepos(user *model.User) ([]*model.Repo, error)
- func (r *Stash) GetScript(user *model.User, repo *model.Repo, hook *model.Hook) ([]byte, error)
- func (s *Stash) GetToken(user *model.User) (*model.Token, error)
- func (s *Stash) OpenRegistration() bool
- func (r *Stash) ParseHook(req *http.Request) (*model.Hook, error)
Constants ¶
This section is empty.
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 Stash ¶
func (*Stash) Activate ¶
Activate activates a repository by adding a Post-Commit hook and a Public Deploy key, if applicable.
func (*Stash) Authorize ¶
GetLogin handles authentication to third party, remote services and returns the required user data in a standard format.
func (*Stash) Deactivate ¶
Deactivate removes a repository by removing all the post-commit hooks which are equal to link. SSH key is not removed as this is on the user, not the repo
func (*Stash) GetRepos ¶
GetRepos fetches all repositories that the specified user has access to in the remote system.
func (*Stash) GetScript ¶
GetScript fetches the build script (.drone.yml) from the remote repository and returns in string format.