Documentation
¶
Index ¶
- func New(URL, apiURL, uiURL, proxyURL string, store cache.Store, username, token string) sdk.VCSServer
- func NewDeprecated(consumerKey string, privateKey []byte, ...) sdk.VCSServer
- type AccessToken
- type Author
- type Branch
- type BranchResponse
- type Clone
- type Commit
- type CommitsResponse
- type Content
- type GetWebHooksResponse
- type Hook
- type HookDetail
- type Key
- type Keys
- type Lines
- type Link
- type Links
- type PullRequestResponse
- type Repo
- type RequestToken
- type Response
- type ResponseStatus
- type Status
- type Tag
- type TagResponse
- type Token
- type UserPermission
- type UsersPermissionResponse
- type UsersResponse
- type WebHook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AccessToken ¶
type AccessToken struct {
// contains filtered or unexported fields
}
AccessToken represents a value used by the Consumer to gain access to the Protected Resources on behalf of the User, instead of using the User's Service Provider credentials.
func NewAccessToken ¶
func NewAccessToken(token, secret string, params map[string]string) *AccessToken
NewAccessToken returns a new instance of AccessToken with the specified token, secret and additional parameters.
func ParseAccessToken ¶
func ParseAccessToken(reader io.ReadCloser) (*AccessToken, error)
ParseAccessToken parses the URL-encoded query string from the Reader and returns an AccessToken.
func ParseAccessTokenStr ¶
func ParseAccessTokenStr(str string) (*AccessToken, error)
ParseAccessTokenStr parses the URL-encoded query string and returns an AccessToken.
func (*AccessToken) Encode ¶
func (a *AccessToken) Encode() string
Encode encodes the values into “URL encoded” form of the AccessToken. e.g. "oauth_token=foo&oauth_token_secret=baz"
func (*AccessToken) Params ¶
func (a *AccessToken) Params() map[string]string
Params gets any additional parameters, as defined by the Service Provider.
func (*AccessToken) Secret ¶
func (a *AccessToken) Secret() string
Secret gets the oauth_token_secret value
type BranchResponse ¶
type CommitsResponse ¶
type GetWebHooksResponse ¶
type GetWebHooksResponse struct {
Values []WebHook `json:"values"`
}
GetWebHooksResponse represent the response send by bitbucket when listing webhooks
type Hook ¶
type Hook struct {
Enabled bool `json:"enabled"`
Details *HookDetail `json:"details"`
}
type HookDetail ¶
type PullRequestResponse ¶
type PullRequestResponse struct {
Values []sdk.BitbucketServerPullRequest `json:"values"`
Size int `json:"size"`
NextPageStart int `json:"nextPageStart"`
IsLastPage bool `json:"isLastPage"`
}
type RequestToken ¶
type RequestToken struct {
// contains filtered or unexported fields
}
RequestToken represents a value used by the Consumer to obtain authorization from the User, and exchanged for an Access Token.
func ParseRequestToken ¶
func ParseRequestToken(reader io.ReadCloser) (*RequestToken, error)
ParseRequestToken parses the URL-encoded query string from the Reader and returns a RequestToken.
func ParseRequestTokenStr ¶
func ParseRequestTokenStr(str string) (*RequestToken, error)
ParseRequestTokenStr parses the URL-encoded query string and returns a RequestToken.
func (*RequestToken) Encode ¶
func (r *RequestToken) Encode() string
Encode encodes the values into “URL encoded” form of the ReqeustToken. e.g. "oauth_token=foo&oauth_token_secret=baz"
func (*RequestToken) Secret ¶
func (r *RequestToken) Secret() string
Secret gets the oauth_token_secret value
type ResponseStatus ¶
type TagResponse ¶
type Token ¶
type Token interface {
Token() string // Gets the oauth_token value.
Secret() string // Gets the oauth_token_secret.
Encode() string // Encode encodes the token into “URL encoded” form.
}
Token is an interface for RequestToken and AccessToken
type UserPermission ¶
type UserPermission struct {
User sdk.BitbucketServerActor `json:"user"`
Permission string `json:"permission"`
}
type UsersPermissionResponse ¶
type UsersPermissionResponse struct {
Values []UserPermission `json:"values"`
Size int `json:"size"`
NextPageStart int `json:"nextPageStart"`
IsLastPage bool `json:"isLastPage"`
}
type UsersResponse ¶
type UsersResponse struct {
Values []sdk.BitbucketServerActor `json:"values"`
Size int `json:"size"`
NextPageStart int `json:"nextPageStart"`
IsLastPage bool `json:"isLastPage"`
}
Source Files
¶
- bitbucketserver.go
- client_branch.go
- client_commit.go
- client_event.go
- client_file.go
- client_forks.go
- client_hook.go
- client_pull_request.go
- client_release.go
- client_repos.go
- client_search.go
- client_status.go
- client_tags.go
- http.go
- oauth_consumer.go
- oauth_consumer_helper.go
- oauth_consumer_sign.go
- oauth_consumer_token.go
- types.go