Documentation ¶
Index ¶
- func New(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"` }