Documentation ¶
Index ¶
- type StashClient
- func (s *StashClient) Branch(fullname, branchName string) (sdk.VCSBranch, error)
- func (s *StashClient) Branches(fullname string) ([]sdk.VCSBranch, error)
- func (s *StashClient) Commit(repo, hash string) (sdk.VCSCommit, error)
- func (s *StashClient) Commits(repo, branch, since, until string) ([]sdk.VCSCommit, error)
- func (s *StashClient) CreateHook(repo, url string) error
- func (s *StashClient) DeleteHook(repo, url string) error
- func (s *StashClient) PushEvents(repo string, dateRef time.Time) ([]sdk.VCSPushEvent, time.Duration, error)
- func (s *StashClient) RepoByFullname(fullname string) (sdk.VCSRepo, error)
- func (s *StashClient) Repos() ([]sdk.VCSRepo, error)
- func (s *StashClient) SetStatus(event sdk.Event) error
- type StashConsumer
- func (s *StashConsumer) AuthorizeRedirect() (string, string, error)
- func (s *StashConsumer) AuthorizeToken(strToken, verifier string) (string, string, error)
- func (s *StashConsumer) Data() string
- func (s *StashConsumer) GetAuthorized(accessToken, accessTokenSecret string) (sdk.RepositoriesManagerClient, error)
- func (s *StashConsumer) HooksSupported() bool
- func (s *StashConsumer) PollingSupported() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StashClient ¶
type StashClient struct {
// contains filtered or unexported fields
}
StashClient is a github.com/reinbach/go-stash wrapper for CDS RepositoriesManagerClient interface
func (*StashClient) Branch ¶
func (s *StashClient) Branch(fullname, branchName string) (sdk.VCSBranch, error)
Branch retrieves the branch from Stash
func (*StashClient) Branches ¶
func (s *StashClient) Branches(fullname string) ([]sdk.VCSBranch, error)
Branches retrieves the branches from Stash
func (*StashClient) Commit ¶
func (s *StashClient) Commit(repo, hash string) (sdk.VCSCommit, error)
Commit retrieves a specific according to a hash
func (*StashClient) Commits ¶
func (s *StashClient) Commits(repo, branch, since, until string) ([]sdk.VCSCommit, error)
Commits returns commit data from a given starting commit, between two commits The commits may be identified by branch or tag name or by hash.
func (*StashClient) CreateHook ¶
func (s *StashClient) CreateHook(repo, url string) error
CreateHook enables the defaut HTTP POST Hook in Stash
func (*StashClient) DeleteHook ¶
func (s *StashClient) DeleteHook(repo, url string) error
DeleteHook disables the defaut HTTP POST Hook in Stash
func (*StashClient) PushEvents ¶
func (s *StashClient) PushEvents(repo string, dateRef time.Time) ([]sdk.VCSPushEvent, time.Duration, error)
PushEvents is not implemented
func (*StashClient) RepoByFullname ¶
func (s *StashClient) RepoByFullname(fullname string) (sdk.VCSRepo, error)
RepoByFullname returns the repo from its fullname
type StashConsumer ¶
type StashConsumer struct { URL string `json:"-"` ConsumerKey string `json:"consumer_key"` PrivateRSAKey string `json:"private_rsa_key"` // contains filtered or unexported fields }
StashConsumer embeds a stash oauth1 consumer
func New ¶
func New(URL, consumerKey, privateKey string) *StashConsumer
New creates a new StashConsumer
func (*StashConsumer) AuthorizeRedirect ¶
func (s *StashConsumer) AuthorizeRedirect() (string, string, error)
AuthorizeRedirect returns the request token, the Authorize URL
func (*StashConsumer) AuthorizeToken ¶
func (s *StashConsumer) AuthorizeToken(strToken, verifier string) (string, string, error)
AuthorizeToken returns the authorized token (and its secret) from the request token and the verifier got on authorize url
func (*StashConsumer) Data ¶
func (s *StashConsumer) Data() string
Data returns a serilized version of specific data
func (*StashConsumer) GetAuthorized ¶
func (s *StashConsumer) GetAuthorized(accessToken, accessTokenSecret string) (sdk.RepositoriesManagerClient, error)
GetAuthorized returns an authorized client
func (*StashConsumer) HooksSupported ¶
func (s *StashConsumer) HooksSupported() bool
HooksSupported returns true if the driver technically support hook
func (*StashConsumer) PollingSupported ¶
func (s *StashConsumer) PollingSupported() bool
PollingSupported returns true if the driver technically support polling