Documentation ¶
Index ¶
- Constants
- func CheckResponse(r *http.Response) error
- func ParsePayload(r *http.Request, key []byte) (interface{}, []byte, error)
- func ParsePayloadWithoutSignature(r *http.Request) (interface{}, []byte, error)
- func ValidateSignature(r *http.Request, payload []byte, key []byte) error
- type AccessToken
- type AccessTokenList
- type AccessTokensService
- func (s *AccessTokensService) CreateRepositoryToken(ctx context.Context, projectKey, repositorySlug string, token *AccessToken) (*AccessToken, *Response, error)
- func (s *AccessTokensService) CreateUserToken(ctx context.Context, userSlug string, token *AccessToken) (*AccessToken, *Response, error)
- func (s *AccessTokensService) DeleteRepositoryToken(ctx context.Context, projectKey, repositorySlug, tokenId string) (*Response, error)
- func (s *AccessTokensService) DeleteUserToken(ctx context.Context, userSlug, tokenId string) (*Response, error)
- func (s *AccessTokensService) GetRepositoryToken(ctx context.Context, projectKey, repositorySlug, tokenId string) (*AccessToken, *Response, error)
- func (s *AccessTokensService) GetUserToken(ctx context.Context, userSlug, tokenId string) (*AccessToken, *Response, error)
- func (s *AccessTokensService) ListRepositoryTokens(ctx context.Context, projectKey, repositorySlug string, opts *ListOptions) ([]*AccessToken, *Response, error)
- func (s *AccessTokensService) ListUserTokens(ctx context.Context, userSlug string, opts *ListOptions) ([]*AccessToken, *Response, error)
- type BasicAuthTransport
- type Branch
- type BranchList
- type BranchSearchOptions
- type BranchSearchOrder
- type BranchType
- type BuildStatus
- type BuildStatusState
- type BuildStatusTestResult
- type Change
- type ChangeList
- type ChangeNodeType
- type ChangePath
- type ChangeType
- type Client
- func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*Response, error)
- func (c *Client) Get(ctx context.Context, api, path string, v interface{}) (*Response, error)
- func (c *Client) GetPaged(ctx context.Context, api, path string, v interface{}, opts interface{}) (*Response, error)
- func (c *Client) NewRequest(method, apiName, path string, body interface{}) (*http.Request, error)
- type Commit
- type CommitData
- type CommitList
- type CommitSearchMerges
- type CommitSearchOptions
- type DateTime
- type ErrOnlyTextFilesSupported
- type ErrorMessage
- type ErrorResponse
- type Event
- type EventKey
- type FileConentOptions
- type FileContent
- type FileLine
- type FileList
- type FilePath
- type FilesListOptions
- type GitUser
- type ISOTime
- type InternalSshKey
- type KeysService
- func (s *KeysService) CreateRepositoryKey(ctx context.Context, projectKey, repositorySlug string, key *SshKey) (*SshKey, *Response, error)
- func (s *KeysService) DeleteRepositoryKey(ctx context.Context, projectKey, repositorySlug string, keyId uint64) (*Response, error)
- func (s *KeysService) GetRepositoryKey(ctx context.Context, projectKey, repositorySlug string, keyId uint64) (*SshKey, *Response, error)
- func (s *KeysService) ListRepositoryKeys(ctx context.Context, projectKey, repositorySlug string, opts *ListOptions) ([]*SshKey, *Response, error)
- type Link
- type ListOptions
- type ListResponse
- type Page
- type Paged
- type Permission
- type Project
- type ProjectsService
- func (s *ProjectsService) CreateBuildStatus(ctx context.Context, projectKey, repositorySlug, commitId string, ...) (*Response, error)
- func (s *ProjectsService) CreateRepository(ctx context.Context, projectKey string, repo *Repository) (*Repository, *Response, error)
- func (s *ProjectsService) CreateWebhook(ctx context.Context, projectKey, repositorySlug string, webhook *Webhook) (*Webhook, *Response, error)
- func (s *ProjectsService) DeleteRepository(ctx context.Context, projectKey, repositorySlug string) (*Response, error)
- func (s *ProjectsService) DeleteWebhook(ctx context.Context, projectKey, repositorySlug string, id uint64) (*Response, error)
- func (s *ProjectsService) GetCommit(ctx context.Context, projectKey, repositorySlug, commitId string) (*Commit, *Response, error)
- func (s *ProjectsService) GetDefaultBranch(ctx context.Context, projectKey, repositorySlug string) (*Branch, *Response, error)
- func (s *ProjectsService) GetPullRequest(ctx context.Context, projectKey, repositorySlug string, pullRequestId uint64) (*PullRequest, *Response, error)
- func (s *ProjectsService) GetRepository(ctx context.Context, projectKey, repositorySlug string) (*Repository, *Response, error)
- func (s *ProjectsService) GetTextFileContent(ctx context.Context, projectKey, repositorySlug, path, at string) ([]byte, *Response, error)
- func (s *ProjectsService) GetWebhook(ctx context.Context, projectKey, repositorySlug string, id uint64) (*Webhook, *Response, error)
- func (s *ProjectsService) ListChanges(ctx context.Context, projectKey, repositorySlug, commitId string, ...) ([]*Change, *Response, error)
- func (s *ProjectsService) ListFiles(ctx context.Context, projectKey, repositorySlug, path string, ...) ([]string, *Response, error)
- func (s *ProjectsService) ListRepositories(ctx context.Context, projectKey string, opts *ListOptions) ([]*Repository, *Response, error)
- func (s *ProjectsService) ListWebhooks(ctx context.Context, projectKey, repositorySlug string, opts *ListOptions) ([]*Webhook, *Response, error)
- func (s *ProjectsService) SearchBranches(ctx context.Context, projectKey, repositorySlug string, ...) ([]*Branch, *Response, error)
- func (s *ProjectsService) SearchCommits(ctx context.Context, projectKey, repositorySlug string, ...) ([]*Commit, *Response, error)
- func (s *ProjectsService) SearchPullRequests(ctx context.Context, projectKey, repositorySlug string, ...) ([]*PullRequest, *Response, error)
- func (s *ProjectsService) SearchRepositories(ctx context.Context, opts *RepositorySearchOptions) ([]*Repository, *Response, error)
- type PullRequest
- type PullRequestAuthorRole
- type PullRequestAuthorStatus
- type PullRequestEvent
- type PullRequestList
- type PullRequestParticipant
- type PullRequestRef
- type PullRequestSearchOptions
- type PullRequestState
- type Repository
- type RepositoryArchived
- type RepositoryList
- type RepositoryPushEvent
- type RepositoryPushEventChange
- type RepositoryPushEventChangeType
- type RepositoryPushEventRef
- type RepositoryPushEventRefType
- type RepositorySearchOptions
- type RepositoryState
- type RepositoryVisibility
- type Response
- type SshKey
- type SshKeyList
- type User
- type UserType
- type UsersService
- type Webhook
- type WebhookConfiguration
- type WebhookList
Constants ¶
View Source
const ( EventIDHeader = "X-Request-Id" EventKeyHeader = "X-Event-Key" EventSignatureHeader = "X-Hub-Signature" )
View Source
const (
Version = "v1.0.0"
)
Variables ¶
This section is empty.
Functions ¶
func CheckResponse ¶
func ParsePayload ¶ added in v0.1.0
func ParsePayloadWithoutSignature ¶ added in v1.0.0
Types ¶
type AccessToken ¶
type AccessToken struct { ID string `json:"id,omitempty"` Name string `json:"name"` Permissions []Permission `json:"permissions"` Created *DateTime `json:"createdDate,omitempty"` Expire *DateTime `json:"expiryDate,omitempty"` ExpireDays int `json:"expiryDays,omitempty"` Token string `json:"token,omitempty"` User *User `json:"user,omitempty"` }
type AccessTokenList ¶ added in v0.0.4
type AccessTokenList struct { ListResponse Tokens []*AccessToken `json:"values"` }
type AccessTokensService ¶
type AccessTokensService service
func (*AccessTokensService) CreateRepositoryToken ¶
func (s *AccessTokensService) CreateRepositoryToken(ctx context.Context, projectKey, repositorySlug string, token *AccessToken) (*AccessToken, *Response, error)
func (*AccessTokensService) CreateUserToken ¶
func (s *AccessTokensService) CreateUserToken(ctx context.Context, userSlug string, token *AccessToken) (*AccessToken, *Response, error)
func (*AccessTokensService) DeleteRepositoryToken ¶
func (*AccessTokensService) DeleteUserToken ¶
func (*AccessTokensService) GetRepositoryToken ¶
func (s *AccessTokensService) GetRepositoryToken(ctx context.Context, projectKey, repositorySlug, tokenId string) (*AccessToken, *Response, error)
func (*AccessTokensService) GetUserToken ¶
func (s *AccessTokensService) GetUserToken(ctx context.Context, userSlug, tokenId string) (*AccessToken, *Response, error)
func (*AccessTokensService) ListRepositoryTokens ¶
func (s *AccessTokensService) ListRepositoryTokens(ctx context.Context, projectKey, repositorySlug string, opts *ListOptions) ([]*AccessToken, *Response, error)
func (*AccessTokensService) ListUserTokens ¶
func (s *AccessTokensService) ListUserTokens(ctx context.Context, userSlug string, opts *ListOptions) ([]*AccessToken, *Response, error)
type BasicAuthTransport ¶ added in v0.0.2
BasicAuthTransport supports creating a http client passing username/password as basic authentication header.
func (*BasicAuthTransport) Client ¶ added in v0.0.2
func (t *BasicAuthTransport) Client() *http.Client
Client returns an *http.Client that makes requests that are authenticated using HTTP Basic Authentication.
type BranchList ¶ added in v0.1.0
type BranchList struct { ListResponse Branches []*Branch `json:"values"` }
type BranchSearchOptions ¶ added in v0.1.0
type BranchSearchOptions struct { ListOptions Filter string `url:"filterText,omitempty"` Order BranchSearchOrder `url:"orderBy,omitempty"` }
type BranchSearchOrder ¶ added in v0.1.0
type BranchSearchOrder string
const ( BranchSearchOrderAlpha BranchSearchOrder = "ALPHABETICAL" BranchSearchOrderModified BranchSearchOrder = "MODIFICATION" )
type BranchType ¶ added in v0.1.0
type BranchType string
type BuildStatus ¶ added in v0.1.0
type BuildStatus struct { Key string `json:"key"` State BuildStatusState `json:"state"` URL string `json:"url"` BuildNumber string `json:"buildNumber,omitempty"` Description string `json:"description,omitempty"` Duration uint64 `json:"duration,omitempty"` Ref string `json:"ref,omitempty"` TestResult *BuildStatusTestResult `json:"testResults,omitempty"` }
type BuildStatusState ¶ added in v0.1.0
type BuildStatusState string
const ( BuildStatusStateCancelled BuildStatusState = "CANCELLED" BuildStatusStateFailed BuildStatusState = "FAILED" BuildStatusStateInProgress BuildStatusState = "INPROGRESS" BuildStatusStateSuccessful BuildStatusState = "SUCCESSFUL" BuildStatusStateUnknown BuildStatusState = "UNKNOWN" )
type BuildStatusTestResult ¶ added in v0.1.0
type Change ¶ added in v0.1.2
type Change struct { ContentId string `json:"contentId"` Path ChangePath `json:"path"` Executable bool `json:"executable"` Unchanged int `json:"percentUnchanged"` Type ChangeType `json:"type"` NodeType ChangeNodeType `json:"nodeType"` Properties map[string]string `json:"properties"` }
type ChangeList ¶ added in v0.1.2
type ChangeList struct { ListResponse Changes []*Change `json:"values"` }
type ChangeNodeType ¶ added in v0.1.2
type ChangeNodeType string
type ChangePath ¶ added in v0.1.2
type ChangeType ¶ added in v0.1.2
type ChangeType string
type Client ¶
type Client struct { BaseURL *url.URL ApiVersion string UserAgent string AccessTokens *AccessTokensService Keys *KeysService Projects *ProjectsService Users *UsersService // contains filtered or unexported fields }
type Commit ¶ added in v0.1.0
type Commit struct { CommitData Parents []CommitData `json:"parents"` }
type CommitData ¶ added in v0.1.0
type CommitList ¶ added in v0.1.1
type CommitList struct { ListResponse Commits []*Commit `json:"values"` }
type CommitSearchMerges ¶ added in v0.1.1
type CommitSearchMerges string
const ( CommitSearchMergesExclude CommitSearchMerges = "exclude" CommitSearchMergesInclude CommitSearchMerges = "include" CommitSearchMergesOnly CommitSearchMerges = "only" )
type CommitSearchOptions ¶ added in v0.1.1
type CommitSearchOptions struct { ListOptions // An optional path to filter commits by Path string `url:"path,omitempty"` // If true, the commit history of the specified file will be followed past renames. Only valid for a path to a single file. FollowRenames bool `url:"followRenames,omitempty"` // The commit ID (SHA1) or ref (inclusively) to retrieve commits before Until string `url:"until,omitempty"` // The commit ID or ref (exclusively) to retrieve commits after Since string `url:"since,omitempty"` Merges CommitSearchMerges `json:"merges,omitempty"` // true to ignore missing commits, false otherwise IgnoreMissing bool `json:"ignoreMissing,omitempty"` }
type ErrOnlyTextFilesSupported ¶ added in v0.0.6
type ErrOnlyTextFilesSupported struct{}
func (*ErrOnlyTextFilesSupported) Error ¶ added in v0.0.6
func (e *ErrOnlyTextFilesSupported) Error() string
type ErrorMessage ¶
type ErrorResponse ¶
type ErrorResponse struct { *http.Response Errors []ErrorMessage }
func (*ErrorResponse) Error ¶
func (e *ErrorResponse) Error() string
type EventKey ¶ added in v0.1.0
type EventKey string
const ( EventKeyRepoRefsChanged EventKey = "repo:refs_changed" // Repo push EventKeyRepoModified EventKey = "repo:modified" // Repo changed (name) EventKeyRepoFork EventKey = "repo:fork" // Repo forked EventKeyCommentAdded EventKey = "repo:comment:added" // Repo comment on commit added EventKeyCommentEdited EventKey = "repo:comment:edited" // Repo comment on commit edited EventKeyCommentDeleted EventKey = "repo:comment:deleted" // Repo comment on commit deleted EventKeyPullRequestOpened EventKey = "pr:opened" // Pull request opened EventKeyPullRequestFrom EventKey = "pr:from_ref_updated" // Pull request source ref updated EventKeyPullRequestTo EventKey = "pr:to_ref_updated" // Pull request target ref updated EventkeyPullRequestModified EventKey = "pr:modified" // Pull request modified (title, description, target) EventKeyPullRequestReviewer EventKey = "pr:reviewer:updated" // Pull request reviewers updated EventKeyPullRequestApproved EventKey = "pr:reviewer:approved" // Pull request approved by reviewer EventKeyPullRequestUnapproved EventKey = "pr:reviewer:unapproved" // Pull request approval withdrawn by reviewer EventKeyPullRequestNeedsWork EventKey = "pr:reviewer:needs_work" // Pull request reviewer marked "needs work" EventKeyPullRequestMerged EventKey = "pr:merged" EventKeyPullRequestDeclined EventKey = "pr:declined" EventKeyPullRequestDeleted EventKey = "pr:deleted" EventKeyPullRequestCommentAdded EventKey = "pr:comment:added" EventKeyPullRequestCommentEdited EventKey = "pr:comment:edited" EventKeyPullRequestCommentDeleted EventKey = "pr:comment:deleted" )
type FileConentOptions ¶ added in v0.0.6
type FileConentOptions struct { ListOptions At string `url:"at,omitempty"` }
type FileContent ¶ added in v0.0.6
type FileContent struct { ListResponse Binary bool `json:"binary,omitempty"` Lines []FileLine `json:"lines,omitempty"` Path *FilePath `json:"path,omitempty"` Revision string `json:"revision,omitempty"` }
type FileList ¶ added in v0.0.6
type FileList struct { ListResponse Files []string `json:"values"` }
type FilesListOptions ¶ added in v0.0.6
type FilesListOptions struct { ListOptions At string `url:"at,omitempty"` }
type ISOTime ¶ added in v0.1.0
func (ISOTime) MarshalJSON ¶ added in v0.1.0
func (*ISOTime) UnmarshalJSON ¶ added in v0.1.0
type InternalSshKey ¶ added in v0.0.4
type KeysService ¶
type KeysService service
func (*KeysService) CreateRepositoryKey ¶
func (*KeysService) DeleteRepositoryKey ¶
func (*KeysService) GetRepositoryKey ¶
func (*KeysService) ListRepositoryKeys ¶
func (s *KeysService) ListRepositoryKeys(ctx context.Context, projectKey, repositorySlug string, opts *ListOptions) ([]*SshKey, *Response, error)
type ListOptions ¶
type ListResponse ¶
type ListResponse struct { Size uint `json:"size"` Limit uint `json:"limit"` LastPage bool `json:"isLastPage"` Start uint `json:"start"` NextPageStart uint `json:"nextPageStart"` }
ListResponse defines the common properties of a list response
func (*ListResponse) Current ¶
func (r *ListResponse) Current() *Page
type Paged ¶
type Paged interface {
Current() *Page
}
Paged defines interface to be supported by responses from Paged APIs
type Permission ¶
type Permission string
const ( PermissionRepoRead Permission = "REPO_READ" PermissionRepoWrite Permission = "REPO_WRITE" PermissionRepoAdmin Permission = "REPO_ADMIN" PermissionRepoCreate Permission = "REPO_CREATE" PermissionProjectView Permission = "PROJECT_VIEW" PermissionProjectRead Permission = "PROJECT_READ" PermissionProjectWrite Permission = "PROJECT_WRITE" PermissionProjectAdmin Permission = "PROJECT_ADMIN" PermissionProjectCreate Permission = "PROJECT_CREATE" PermissionUserAdmin Permission = "USER_ADMIN" PermissionLicensedUser Permission = "LICENSED_USER" PermissionAdmin Permission = "ADMIN" PermissionSysAdmin Permission = "SYS_ADMIN" )
type ProjectsService ¶
type ProjectsService service
func (*ProjectsService) CreateBuildStatus ¶ added in v0.1.0
func (s *ProjectsService) CreateBuildStatus(ctx context.Context, projectKey, repositorySlug, commitId string, status *BuildStatus) (*Response, error)
func (*ProjectsService) CreateRepository ¶
func (s *ProjectsService) CreateRepository(ctx context.Context, projectKey string, repo *Repository) (*Repository, *Response, error)
func (*ProjectsService) CreateWebhook ¶ added in v0.1.0
func (*ProjectsService) DeleteRepository ¶
func (*ProjectsService) DeleteWebhook ¶ added in v0.1.0
func (*ProjectsService) GetDefaultBranch ¶ added in v0.1.0
func (*ProjectsService) GetPullRequest ¶ added in v0.1.1
func (s *ProjectsService) GetPullRequest(ctx context.Context, projectKey, repositorySlug string, pullRequestId uint64) (*PullRequest, *Response, error)
func (*ProjectsService) GetRepository ¶
func (s *ProjectsService) GetRepository(ctx context.Context, projectKey, repositorySlug string) (*Repository, *Response, error)
func (*ProjectsService) GetTextFileContent ¶ added in v0.0.6
func (*ProjectsService) GetWebhook ¶ added in v0.1.0
func (*ProjectsService) ListChanges ¶ added in v0.1.2
func (s *ProjectsService) ListChanges(ctx context.Context, projectKey, repositorySlug, commitId string, opts *ListOptions) ([]*Change, *Response, error)
func (*ProjectsService) ListFiles ¶ added in v0.0.6
func (s *ProjectsService) ListFiles(ctx context.Context, projectKey, repositorySlug, path string, opts *FilesListOptions) ([]string, *Response, error)
func (*ProjectsService) ListRepositories ¶
func (s *ProjectsService) ListRepositories(ctx context.Context, projectKey string, opts *ListOptions) ([]*Repository, *Response, error)
func (*ProjectsService) ListWebhooks ¶ added in v0.1.0
func (s *ProjectsService) ListWebhooks(ctx context.Context, projectKey, repositorySlug string, opts *ListOptions) ([]*Webhook, *Response, error)
func (*ProjectsService) SearchBranches ¶ added in v0.1.0
func (s *ProjectsService) SearchBranches(ctx context.Context, projectKey, repositorySlug string, opts *BranchSearchOptions) ([]*Branch, *Response, error)
func (*ProjectsService) SearchCommits ¶ added in v0.1.1
func (s *ProjectsService) SearchCommits(ctx context.Context, projectKey, repositorySlug string, opts *CommitSearchOptions) ([]*Commit, *Response, error)
func (*ProjectsService) SearchPullRequests ¶ added in v0.1.1
func (s *ProjectsService) SearchPullRequests(ctx context.Context, projectKey, repositorySlug string, opts *PullRequestSearchOptions) ([]*PullRequest, *Response, error)
func (*ProjectsService) SearchRepositories ¶ added in v0.0.6
func (s *ProjectsService) SearchRepositories(ctx context.Context, opts *RepositorySearchOptions) ([]*Repository, *Response, error)
type PullRequest ¶ added in v0.1.0
type PullRequest struct { ID uint64 `json:"id,omitempty"` Version uint64 `json:"version,omitempty"` Title string `json:"title"` State PullRequestState `json:"state"` Open bool `json:"open"` Closed bool `json:"closed"` Created *DateTime `json:"createdDate"` Updated *DateTime `json:"updatedDate"` Source PullRequestRef `json:"fromRef"` Target PullRequestRef `json:"toRef"` Locked bool `json:"locked"` Author PullRequestParticipant `json:"author"` Reviewers []PullRequestParticipant `json:"reviewers"` Participants []PullRequestParticipant `json:"participants"` }
type PullRequestAuthorRole ¶ added in v0.1.0
type PullRequestAuthorRole string
const ( PullRequestAuthorRoleAuthor PullRequestAuthorRole = "AUTHOR" PullRequestAuthorRoleReviewer PullRequestAuthorRole = "REVIEWER" PullRequestAuthorRoleParticipant PullRequestAuthorRole = "PARTICIPANT" )
type PullRequestAuthorStatus ¶ added in v0.1.0
type PullRequestAuthorStatus string
const ( PullRequestAuthorStatusApproved PullRequestAuthorStatus = "APPROVED" PullRequestAuthorStatusUnapproved PullRequestAuthorStatus = "UNAPPROVED" PullRequestAuthorStatusNeedsWork PullRequestAuthorStatus = "NEEDS_WORK" )
type PullRequestEvent ¶ added in v0.1.0
type PullRequestEvent struct { Event PullRequest PullRequest `json:"pullRequest"` }
type PullRequestList ¶ added in v0.1.1
type PullRequestList struct { ListResponse PullRequests []*PullRequest `json:"values"` }
type PullRequestParticipant ¶ added in v0.1.0
type PullRequestParticipant struct { Author User `json:"user"` Role PullRequestAuthorRole `json:"role"` Approved bool `json:"approved"` Status PullRequestAuthorStatus `json:"status"` Commit string `json:"lastReviewedCommit,omitempty"` }
type PullRequestRef ¶ added in v0.1.0
type PullRequestRef struct { ID string `json:"id"` DisplayID string `json:"displayId"` Latest string `json:"latestCommit"` Repository Repository `json:"repository"` }
type PullRequestSearchOptions ¶ added in v0.1.1
type PullRequestSearchOptions struct { ListOptions At string `url:"at,omitempty"` Filter string `url:"filterText,omitempty"` State *PullRequestState `url:"state,omitempty"` }
type PullRequestState ¶ added in v0.1.0
type PullRequestState string
const ( PullRequestStateDeclined PullRequestState = "DECLINED" PullRequestStateMerged PullRequestState = "MERGED" PullRequestStateOpen PullRequestState = "OPEN" )
type Repository ¶
type Repository struct { ID uint64 `json:"id,omitempty"` Slug string `json:"slug,omitempty"` ScmID string `json:"scmId"` Name string `json:"name"` Description string `json:"description,omitempty"` Public bool `json:"public,omitempty"` Archived bool `json:"archived,omitempty"` State *RepositoryState `json:"state,omitempty"` Project *Project `json:"project,omitempty"` Links map[string][]Link `json:"links,omitempty"` }
type RepositoryArchived ¶ added in v0.0.6
type RepositoryArchived string
const ( RepositoryArchivedActive RepositoryArchived = "ACTIVE" RepositoryArchivedArchived RepositoryArchived = "ARCHIVED" RepositoryArchivedAll RepositoryArchived = "ALL" )
type RepositoryList ¶ added in v0.0.4
type RepositoryList struct { ListResponse Repositories []*Repository `json:"values"` }
type RepositoryPushEvent ¶ added in v0.1.0
type RepositoryPushEvent struct { Event Repository Repository `json:"repository"` Changes []RepositoryPushEventChange `json:"changes"` Commits []Commit `json:"commits,omitempty"` ToCommit *Commit `json:"toCommit,omitempty"` }
type RepositoryPushEventChange ¶ added in v0.1.0
type RepositoryPushEventChange struct { Ref RepositoryPushEventRef `json:"ref"` RefId string `json:"refId"` FromHash string `json:"fromHash"` ToHash string `json:"toHash"` Type RepositoryPushEventChangeType `json:"type"` }
type RepositoryPushEventChangeType ¶ added in v0.1.0
type RepositoryPushEventChangeType string
const ( RepositoryPushEventChangeTypeAdd RepositoryPushEventChangeType = "ADD" RepositoryPushEventChangeTypeUpdate RepositoryPushEventChangeType = "UPDATE" RepositoryPushEventChangeTypeDelete RepositoryPushEventChangeType = "DELETE" )
type RepositoryPushEventRef ¶ added in v0.1.0
type RepositoryPushEventRef struct { ID string `json:"id"` DisplayID string `json:"displayId"` Type RepositoryPushEventRefType `json:"type"` }
type RepositoryPushEventRefType ¶ added in v0.1.0
type RepositoryPushEventRefType string
const ( RepositoryPushEventRefTypeBranch RepositoryPushEventRefType = "BRANCH" RepositoryPushEventRefTypeTag RepositoryPushEventRefType = "TAG" )
type RepositorySearchOptions ¶ added in v0.0.6
type RepositorySearchOptions struct { ListOptions Archived RepositoryArchived `url:"archived,omitempty"` ProjectName string `url:"projectname,omitempty"` ProjectKey string `url:"projectkey,omitempty"` Visibility RepositoryVisibility `url:"visibility,omitempty"` Name string `url:"name,omitempty"` Permission Permission `url:"permission,omitempty"` State RepositoryState `url:"state,omitempty"` }
type RepositoryState ¶
type RepositoryState string
const ( RepositoryStateAvailable RepositoryState = "AVAILABLE" RepositoryStateInitFailed RepositoryState = "INITIALISATION_FAILED" RepositoryStateInit RepositoryState = "INITIALISING" RepositoryStateOffline RepositoryState = "OFFLINE" )
type RepositoryVisibility ¶ added in v0.0.6
type RepositoryVisibility string
const ( RepositoryVisbibilityPrivate RepositoryVisibility = "private" RepositoryVisbibilityPublic RepositoryVisibility = "public" )
type SshKey ¶
type SshKey struct { ID uint64 Text string Label string Algorithm string Length uint Permission Permission }
SshKey defines Bitbucket representation of ssh-key
type SshKeyList ¶ added in v0.0.4
type SshKeyList struct { ListResponse Keys []InternalSshKey `json:"values"` }
type UsersService ¶ added in v0.1.0
type UsersService service
type Webhook ¶ added in v0.1.0
type Webhook struct { ID uint64 `json:"id,omitempty"` Name string `json:"name"` Created *DateTime `json:"createdDate,omitempty"` Updated *DateTime `json:"updatedDate,omitempty"` Events []EventKey `json:"events"` Config *WebhookConfiguration `json:"configuration,omitempty"` URL string `json:"url"` Active bool `json:"active"` }
type WebhookConfiguration ¶ added in v0.1.0
type WebhookConfiguration struct {
Secret string `json:"secret,omitempty"`
}
type WebhookList ¶ added in v0.1.0
type WebhookList struct { ListResponse Webhooks []*Webhook `json:"values"` }
Click to show internal directories.
Click to hide internal directories.