Documentation ¶
Index ¶
- Constants
- func Provider() terraform.ResourceProvider
- type BranchRestriction
- type Client
- func (c *Client) Delete(endpoint string) (*http.Response, error)
- func (c *Client) Do(method, endpoint string, payload *bytes.Buffer) (*http.Response, error)
- func (c *Client) Get(endpoint string) (*http.Response, error)
- func (c *Client) Post(endpoint string, jsonpayload *bytes.Buffer) (*http.Response, error)
- func (c *Client) Put(endpoint string, jsonpayload *bytes.Buffer) (*http.Response, error)
- func (c *Client) PutOnly(endpoint string) (*http.Response, error)
- type CloneURL
- type Error
- type Group
- type Hook
- type PaginatedReviewers
- type PipelinesEnabled
- type Project
- type Repository
- type RepositoryVariable
- type Reviewer
- type User
Constants ¶
const ( // BitbucketEndpoint is the fqdn used to talk to bitbucket BitbucketEndpoint string = "https://api.bitbucket.org/" )
Variables ¶
This section is empty.
Functions ¶
func Provider ¶
func Provider() terraform.ResourceProvider
Provider will create the necessary terraform provider to talk to the Bitbucket APIs you should specify a USERNAME and PASSWORD
Types ¶
type BranchRestriction ¶ added in v1.2.0
type BranchRestriction struct { ID int `json:"id,omitempty"` Kind string `json:"kind,omitempty"` Pattern string `json:"pattern,omitempty"` Value int `json:"value,omitempty"` Users []User `json:"users,omitempty"` Groups []Group `json:"groups,omitempty"` }
BranchRestriction is the data we need to send to create a new branch restriction for the repository
type Client ¶ added in v1.2.0
Client is the base internal Client to talk to bitbuckets API. This should be a username and password the password should be a app-password.
func (*Client) Do ¶ added in v1.2.0
Do Will just call the bitbucket api but also add auth to it and some extra headers
type Error ¶
type Error struct { APIError struct { Message string `json:"message,omitempty"` } `json:"error,omitempty"` Type string `json:"type,omitempty"` StatusCode int Endpoint string }
Error represents a error from the bitbucket api.
type Hook ¶
type Hook struct { UUID string `json:"uuid,omitempty"` URL string `json:"url,omitempty"` Description string `json:"description,omitempty"` Active bool `json:"active,omitempty"` SkipCertVerification bool `json:"skip_cert_verification,omitempty"` Events []string `json:"events,omitempty"` }
Hook is the hook you want to add to a bitbucket repository
type PaginatedReviewers ¶
type PaginatedReviewers struct { Values []Reviewer `json:"values,omitempty"` Page int `json:"page,omitempty"` Size int `json:"size,omitempty"` Next string `json:"next,omitempty"` }
PaginatedReviewers is a paginated list that the bitbucket api returns
type PipelinesEnabled ¶ added in v1.2.0
type PipelinesEnabled struct {
Enabled bool `json:"enabled"`
}
PipelinesEnabled is the struct we send to turn on or turn off pipelines for a repository
type Project ¶ added in v1.2.0
type Project struct { Key string `json:"key,omitempty"` IsPrivate bool `json:"is_private,omitempty"` Owner string `json:"owner.username,omitempty"` Description string `json:"description,omitempty"` Name string `json:"name,omitempty"` UUID string `json:"uuid,omitempty"` }
Project is the project data we need to send to create a project on the bitbucket api
type Repository ¶
type Repository struct { SCM string `json:"scm,omitempty"` HasWiki bool `json:"has_wiki,omitempty"` HasIssues bool `json:"has_issues,omitempty"` Website string `json:"website,omitempty"` IsPrivate bool `json:"is_private,omitempty"` ForkPolicy string `json:"fork_policy,omitempty"` Language string `json:"language,omitempty"` Description string `json:"description,omitempty"` Name string `json:"name,omitempty"` Slug string `json:"slug,omitempty"` UUID string `json:"uuid,omitempty"` Project struct { Key string `json:"key,omitempty"` } `json:"project,omitempty"` Links struct { Clone []CloneURL `json:"clone,omitempty"` } `json:"links,omitempty"` }
Repository is the struct we need to send off to the Bitbucket API to create a repository
type RepositoryVariable ¶ added in v1.2.0
type RepositoryVariable struct { Key string `json:"key"` Value string `json:"value"` UUID string `json:"uuid,omitempty"` Secured bool `json:"secured"` }
RepositoryVariable structure for handling key info