Documentation
¶
Index ¶
- func ErrorHandler(acceptStatuses ...int) requests.ResponseHandler
- type BitbucketError
- type Client
- type ClientOpts
- type CreateRepoOpts
- type GetRepoOpts
- type RepoInitOpts
- type RepoService
- func (s *RepoService) Create(opts CreateRepoOpts) (*Repository, error)
- func (s *RepoService) Delete(projectKey, slug string) error
- func (s *RepoService) DeleteUserPermissions(opts UserPermissionOpts) error
- func (s *RepoService) Get(opts GetRepoOpts) (*Repository, error)
- func (s *RepoService) GetUserPermissions(opts UserPermissionOpts) (*UserPermission, error)
- func (s *RepoService) Init(opts RepoInitOpts) error
- func (s *RepoService) SetUserPermissions(opts UserPermissionOpts) error
- type Repository
- type StatusError
- type UserPermission
- type UserPermissionOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorHandler ¶
func ErrorHandler(acceptStatuses ...int) requests.ResponseHandler
ErrorJSON validates the response has an acceptable status code and if it's bad, attempts to marshal the JSON into the error object provided.
Types ¶
type BitbucketError ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a tiny Github client
func (*Client) Repos ¶
func (c *Client) Repos() *RepoService
type ClientOpts ¶
type CreateRepoOpts ¶
type GetRepoOpts ¶
type RepoInitOpts ¶
type RepoService ¶
type RepoService struct {
// contains filtered or unexported fields
}
RepoService provides methods for creating repositories.
func (*RepoService) Create ¶
func (s *RepoService) Create(opts CreateRepoOpts) (*Repository, error)
https://docs.atlassian.com/bitbucket-server/rest/7.6.13/bitbucket-rest.html#idp174
func (*RepoService) Delete ¶
func (s *RepoService) Delete(projectKey, slug string) error
func (*RepoService) DeleteUserPermissions ¶
func (s *RepoService) DeleteUserPermissions(opts UserPermissionOpts) error
func (*RepoService) Get ¶
func (s *RepoService) Get(opts GetRepoOpts) (*Repository, error)
https://docs.atlassian.com/bitbucket-server/rest/7.6.13/bitbucket-rest.html#idp175
func (*RepoService) GetUserPermissions ¶
func (s *RepoService) GetUserPermissions(opts UserPermissionOpts) (*UserPermission, error)
func (*RepoService) Init ¶
func (s *RepoService) Init(opts RepoInitOpts) error
func (*RepoService) SetUserPermissions ¶
func (s *RepoService) SetUserPermissions(opts UserPermissionOpts) error
https://docs.atlassian.com/bitbucket-server/rest/7.6.13/bitbucket-rest.html#idp286
type Repository ¶
type Repository struct { Name string `json:"name"` ScmId string `json:"scmId,omitempty"` Slug string `json:"slug,omitempty"` Description string `json:"description,omitempty"` State string `json:"state,omitempty"` Public bool `json:"public"` Project struct { Key string `json:"key"` Name string `json:"name"` } `json:"project"` }
type StatusError ¶
func (StatusError) Error ¶
func (e StatusError) Error() string
func (StatusError) Unwrap ¶
func (e StatusError) Unwrap() error
type UserPermission ¶
Click to show internal directories.
Click to hide internal directories.