repostash

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2017 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

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

func (*StashClient) Repos

func (s *StashClient) Repos() ([]sdk.VCSRepo, error)

Repos returns the list of accessible repositories

func (*StashClient) SetStatus added in v0.4.0

func (s *StashClient) SetStatus(event sdk.Event) error

SetStatus set build status on stash

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL