bitbucket

package
v1.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2022 License: MPL-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Provider

func Provider() terraform.ResourceProvider

Types

type AccessTokenRequest

type AccessTokenRequest struct {
	Name        string        `json:"name,omitempty"`
	Permissions []interface{} `json:"permissions,omitempty"`
}

type AccessTokenResponse

type AccessTokenResponse struct {
	Id                string   `json:"id,omitempty"`
	CreatedDate       jsonTime `json:"createdDate,omitempty"`
	LastAuthenticated jsonTime `json:"lastAuthenticated,omitempty"`
	Name              string   `json:"name,omitempty"`
	Permissions       []string `json:"permissions,omitempty"`
	Token             string   `json:"token,omitempty"`
}

type AllRepositoryBranchPermissionsResponse added in v1.7.1

type AllRepositoryBranchPermissionsResponse struct {
	Size       int                        `json:"size"`
	Limit      int                        `json:"limit"`
	IsLastPage bool                       `json:"isLastPage"`
	Values     []BranchPermissionResponse `json:"values"`
}

type ApplicationProperties

type ApplicationProperties struct {
	Version     string `json:"version,omitempty"`
	BuildNumber string `json:"buildNumber,omitempty"`
	BuildDate   string `json:"buildDate,omitempty"`
	DisplayName string `json:"displayName,omitempty"`
}
type Banner struct {
	Message  string `json:"message,omitempty"`
	Audience string `json:"audience,omitempty"`
	Enabled  bool   `json:"enabled,omitempty"`
}

type BitbucketClient

type BitbucketClient struct {
	Server     string
	Username   string
	Password   string
	HTTPClient *http.Client
}

func (*BitbucketClient) Delete

func (c *BitbucketClient) Delete(endpoint string) (*http.Response, error)

func (*BitbucketClient) Do

func (c *BitbucketClient) Do(method, endpoint string, payload *bytes.Buffer, contentType string) (*http.Response, error)

func (*BitbucketClient) Get

func (c *BitbucketClient) Get(endpoint string) (*http.Response, error)

func (*BitbucketClient) InstallPluginWithUri added in v1.7.0

func (c *BitbucketClient) InstallPluginWithUri(endpoint string, uri string, pluginName string) (*http.Response, error)

func (*BitbucketClient) Post

func (c *BitbucketClient) Post(endpoint string, jsonpayload *bytes.Buffer) (*http.Response, error)

func (*BitbucketClient) PostFileUpload

func (c *BitbucketClient) PostFileUpload(endpoint string, params map[string]string, paramName, path string) (*http.Response, error)

Creates a new file upload http request with optional extra params

func (*BitbucketClient) Put

func (c *BitbucketClient) Put(endpoint string, jsonpayload *bytes.Buffer) (*http.Response, error)

func (*BitbucketClient) PutOnly

func (c *BitbucketClient) PutOnly(endpoint string) (*http.Response, error)

type BitbucketServerProvider

type BitbucketServerProvider struct {
	BitbucketClient   *BitbucketClient
	MarketplaceClient *marketplace.Client
}

type BranchPermissionPayload added in v1.7.1

type BranchPermissionPayload struct {
	Type       string        `json:"type,omitempty"`
	Matcher    MatcherStruct `json:"matcher,omitempty"`
	Users      []string      `json:"users,omitempty"`
	Groups     []string      `json:"groups,omitempty"`
	AccessKeys []string      `json:"accessKeys,omitempty"`
}

type BranchPermissionResponse added in v1.7.1

type BranchPermissionResponse struct {
	Id    int `json:"id"`
	Scope struct {
		ResourceID int    `json:"resourceId"`
		Type       string `json:"type"`
	} `json:"scope"`
	Type  string `json:"type"`
	Users []struct {
		Name         string `json:"name"`
		EmailAddress string `json:"emailAddress"`
		ID           int    `json:"id"`
		DisplayName  string `json:"displayName"`
		Active       bool   `json:"active"`
		Slug         string `json:"slug"`
		Type         string `json:"type"`
	} `json:"users"`
	Groups     []string `json:"groups"`
	AccessKeys []struct {
		Key struct {
			ID    int    `json:"id"`
			Text  string `json:"text"`
			Label string `json:"label"`
		} `json:"key"`
	} `json:"accessKeys"`
}

type CloneUrl

type CloneUrl struct {
	Href string `json:"href,omitempty"`
	Name string `json:"name,omitempty"`
}

type Cluster

type Cluster struct {
	LocalNode ClusterNode   `json:"localNode,omitempty"`
	Nodes     []ClusterNode `json:"nodes,omitempty"`
	Running   bool          `json:"running,omitempty"`
}

type ClusterNode

type ClusterNode struct {
	ID      string `json:"id,omitempty"`
	Name    string `json:"name,omitempty"`
	Address struct {
		Hostname string `json:"hostName,omitempty"`
		Port     int    `json:"port,omitempty"`
	} `json:"address,omitempty"`
	Local bool `json:"local,omitempty"`
}

type DefaultReviewersConditionPayload added in v1.4.0

type DefaultReviewersConditionPayload struct {
	SourceMatcher     Matcher    `json:"sourceMatcher,omitempty"`
	TargetMatcher     Matcher    `json:"targetMatcher,omitempty"`
	Reviewers         []Reviewer `json:"reviewers,omitempty"`
	RequiredApprovals string     `json:"requiredApprovals,omitempty"`
}

type DefaultReviewersConditionResp added in v1.4.0

type DefaultReviewersConditionResp struct {
	ID                int        `json:"id,omitempty"`
	RequiredApprovals int        `json:"requiredApprovals,omitempty"`
	Reviewers         []Reviewer `json:"reviewers,omitempty"`
	SourceRefMatcher  RefMatcher `json:"sourceRefMatcher,omitempty"`
	TargetRefMatcher  RefMatcher `json:"targetRefMatcher,omitempty"`
}

type Error

type Error struct {
	Errors []struct {
		Context   string `json:"context,omitempty"`
		Message   string `json:"message,omitempty"`
		Exception string `json:"exceptionName,omitempty"`
	} `json:"errors,omitempty"`
	StatusCode int
	Endpoint   string
}

Error represents a error from the bitbucket api.

func (Error) Error

func (e Error) Error() string

type GlobalPermissionsGroup

type GlobalPermissionsGroup struct {
	Name       string
	Permission string
}

type GlobalPermissionsUser

type GlobalPermissionsUser struct {
	Name         string
	EmailAddress string
	DisplayName  string
	Active       bool
	Permission   string
}

type GroupUser

type GroupUser struct {
	Name         string
	EmailAddress string
	DisplayName  string
	Active       bool
}

type License

type License struct {
	License string `json:"license,omitempty"`
}

type LicenseResponse

type LicenseResponse struct {
	License                  string   `json:"license,omitempty"`
	CreationDate             jsonTime `json:"creationDate,omitempty"`
	PurchaseDate             jsonTime `json:"purchaseDate,omitempty"`
	ExpiryDate               jsonTime `json:"expiryDate,omitempty"`
	MaintenanceExpiryDate    jsonTime `json:"maintenanceExpiryDate,omitempty"`
	GracePeriodEndDate       jsonTime `json:"gracePeriodEndDate,omitempty"`
	MaximumNumberOfUsers     int      `json:"maximumNumberOfUsers,omitempty"`
	UnlimitedUsers           bool     `json:"unlimitedNumberOfUsers,omitempty"`
	ServerId                 string   `json:"serverId,omitempty"`
	SupportEntitlementNumber string   `json:"supportEntitlementNumber,omitempty"`
}

type MailConfiguration

type MailConfiguration struct {
	Hostname        string `json:"hostname,omitempty"`
	Port            int    `json:"port,omitempty"`
	Protocol        string `json:"protocol,omitempty"`
	UseStartTLS     bool   `json:"use-start-tls,omitempty"`
	RequireStartTLS bool   `json:"require-start-tls,omitempty"`
	Username        string `json:"username,omitempty"`
	Password        string `json:"password,omitempty"`
	SenderAddress   string `json:"sender-address,omitempty"`
}

type Matcher added in v1.4.0

type Matcher struct {
	ID   string      `json:"id,omitempty"`
	Type MatcherType `json:"type,omitempty"`
}

type MatcherStruct added in v1.7.1

type MatcherStruct struct {
	Id        string            `json:"id,omitempty"`
	DisplayId string            `json:"displayId,omitempty"`
	Type      MatcherStructType `json:"type,omitempty"`
	Active    bool              `json:"active,omitempty"`
}

type MatcherStructType added in v1.7.1

type MatcherStructType struct {
	Id   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

type MatcherType added in v1.4.0

type MatcherType struct {
	ID string `json:"id,omitempty"`
}

type PaginatedGlobalPermissionsGroups

type PaginatedGlobalPermissionsGroups struct {
	Values        []PaginatedGlobalPermissionsGroupsValue `json:"values,omitempty"`
	Size          int                                     `json:"size,omitempty"`
	Limit         int                                     `json:"limit,omitempty"`
	IsLastPage    bool                                    `json:"isLastPage,omitempty"`
	Start         int                                     `json:"start,omitempty"`
	NextPageStart int                                     `json:"nextPageStart,omitempty"`
}

type PaginatedGlobalPermissionsGroupsValue

type PaginatedGlobalPermissionsGroupsValue struct {
	Group struct {
		Name string `json:"name,omitempty"`
	} `json:"group,omitempty"`
	Permission string `json:"permission,omitempty"`
}

type PaginatedGlobalPermissionsUsers

type PaginatedGlobalPermissionsUsers struct {
	Values        []PaginatedGlobalPermissionsUsersValue `json:"values,omitempty"`
	Size          int                                    `json:"size,omitempty"`
	Limit         int                                    `json:"limit,omitempty"`
	IsLastPage    bool                                   `json:"isLastPage,omitempty"`
	Start         int                                    `json:"start,omitempty"`
	NextPageStart int                                    `json:"nextPageStart,omitempty"`
}

type PaginatedGlobalPermissionsUsersValue

type PaginatedGlobalPermissionsUsersValue struct {
	User struct {
		Name         string `json:"name,omitempty"`
		EmailAddress string `json:"emailAddress,omitempty"`
		DisplayName  string `json:"displayName,omitempty"`
		Active       bool   `json:"active,omitempty"`
	} `json:"user,omitempty"`
	Permission string `json:"permission,omitempty"`
}

type PaginatedGroupUsers

type PaginatedGroupUsers struct {
	Values        []PaginatedGroupUsersValue `json:"values,omitempty"`
	Size          int                        `json:"size,omitempty"`
	Limit         int                        `json:"limit,omitempty"`
	IsLastPage    bool                       `json:"isLastPage,omitempty"`
	Start         int                        `json:"start,omitempty"`
	NextPageStart int                        `json:"nextPageStart,omitempty"`
}

type PaginatedGroupUsersValue

type PaginatedGroupUsersValue struct {
	Name         string `json:"name,omitempty"`
	EmailAddress string `json:"emailAddress,omitempty"`
	DisplayName  string `json:"displayName,omitempty"`
	Active       bool   `json:"active,omitempty"`
}

type PaginatedGroups

type PaginatedGroups struct {
	Values        []PaginatedGroupsValue `json:"values,omitempty"`
	Size          int                    `json:"size,omitempty"`
	Limit         int                    `json:"limit,omitempty"`
	IsLastPage    bool                   `json:"isLastPage,omitempty"`
	Start         int                    `json:"start,omitempty"`
	NextPageStart int                    `json:"nextPageStart,omitempty"`
}

type PaginatedGroupsValue

type PaginatedGroupsValue struct {
	Name string `json:"name,omitempty"`
}

type PaginatedProjectHooks

type PaginatedProjectHooks struct {
	Values        []PaginatedProjectHooksValue `json:"values,omitempty"`
	Size          int                          `json:"size,omitempty"`
	Limit         int                          `json:"limit,omitempty"`
	IsLastPage    bool                         `json:"isLastPage,omitempty"`
	Start         int                          `json:"start,omitempty"`
	NextPageStart int                          `json:"nextPageStart,omitempty"`
}

type PaginatedProjectHooksValue

type PaginatedProjectHooksValue struct {
	Details struct {
		Key         string   `json:"key,omitempty"`
		Name        string   `json:"name,omitempty"`
		Type        string   `json:"type,omitempty"`
		Description string   `json:"description,omitempty"`
		Version     string   `json:"version,omitempty"`
		ScopeTypes  []string `json:"scopeTypes,omitempty"`
	} `json:"details,omitempty"`
	Enabled    bool `json:"enabled,omitempty"`
	Configured bool `json:"configured,omitempty"`
	Scope      struct {
		Type       string `json:"type,omitempty"`
		ResourceId int    `json:"resourceId,omitempty"`
	} `json:"scope,omitempty"`
}

type PaginatedProjectPermissionsGroups

type PaginatedProjectPermissionsGroups struct {
	Values        []PaginatedProjectPermissionsGroupsValue `json:"values,omitempty"`
	Size          int                                      `json:"size,omitempty"`
	Limit         int                                      `json:"limit,omitempty"`
	IsLastPage    bool                                     `json:"isLastPage,omitempty"`
	Start         int                                      `json:"start,omitempty"`
	NextPageStart int                                      `json:"nextPageStart,omitempty"`
}

type PaginatedProjectPermissionsGroupsValue

type PaginatedProjectPermissionsGroupsValue struct {
	Group struct {
		Name string `json:"name,omitempty"`
	} `json:"group,omitempty"`
	Permission string `json:"permission,omitempty"`
}

type PaginatedProjectPermissionsUsers

type PaginatedProjectPermissionsUsers struct {
	Values        []PaginatedProjectPermissionsUsersValue `json:"values,omitempty"`
	Size          int                                     `json:"size,omitempty"`
	Limit         int                                     `json:"limit,omitempty"`
	IsLastPage    bool                                    `json:"isLastPage,omitempty"`
	Start         int                                     `json:"start,omitempty"`
	NextPageStart int                                     `json:"nextPageStart,omitempty"`
}

type PaginatedProjectPermissionsUsersValue

type PaginatedProjectPermissionsUsersValue struct {
	User struct {
		Name         string `json:"name,omitempty"`
		EmailAddress string `json:"emailAddress,omitempty"`
		DisplayName  string `json:"displayName,omitempty"`
		Active       bool   `json:"active,omitempty"`
	} `json:"user,omitempty"`
	Permission string `json:"permission,omitempty"`
}

type PaginatedRepositoryHooks

type PaginatedRepositoryHooks struct {
	Values        []PaginatedRepositoryHooksValue `json:"values,omitempty"`
	Size          int                             `json:"size,omitempty"`
	Limit         int                             `json:"limit,omitempty"`
	IsLastPage    bool                            `json:"isLastPage,omitempty"`
	Start         int                             `json:"start,omitempty"`
	NextPageStart int                             `json:"nextPageStart,omitempty"`
}

type PaginatedRepositoryHooksValue

type PaginatedRepositoryHooksValue struct {
	Details struct {
		Key         string   `json:"key,omitempty"`
		Name        string   `json:"name,omitempty"`
		Type        string   `json:"type,omitempty"`
		Description string   `json:"description,omitempty"`
		Version     string   `json:"version,omitempty"`
		ScopeTypes  []string `json:"scopeTypes,omitempty"`
	} `json:"details,omitempty"`
	Enabled    bool `json:"enabled,omitempty"`
	Configured bool `json:"configured,omitempty"`
	Scope      struct {
		Type       string `json:"type,omitempty"`
		ResourceId int    `json:"resourceId,omitempty"`
	} `json:"scope,omitempty"`
}

type PaginatedRepositoryPermissionsGroups

type PaginatedRepositoryPermissionsGroups struct {
	Values        []PaginatedRepositoryPermissionsGroupsValue `json:"values,omitempty"`
	Size          int                                         `json:"size,omitempty"`
	Limit         int                                         `json:"limit,omitempty"`
	IsLastPage    bool                                        `json:"isLastPage,omitempty"`
	Start         int                                         `json:"start,omitempty"`
	NextPageStart int                                         `json:"nextPageStart,omitempty"`
}

type PaginatedRepositoryPermissionsGroupsValue

type PaginatedRepositoryPermissionsGroupsValue struct {
	Group struct {
		Name string `json:"name,omitempty"`
	} `json:"group,omitempty"`
	Permission string `json:"permission,omitempty"`
}

type PaginatedRepositoryPermissionsUsers

type PaginatedRepositoryPermissionsUsers struct {
	Values        []PaginatedRepositoryPermissionsUsersValue `json:"values,omitempty"`
	Size          int                                        `json:"size,omitempty"`
	Limit         int                                        `json:"limit,omitempty"`
	IsLastPage    bool                                       `json:"isLastPage,omitempty"`
	Start         int                                        `json:"start,omitempty"`
	NextPageStart int                                        `json:"nextPageStart,omitempty"`
}

type PaginatedRepositoryPermissionsUsersValue

type PaginatedRepositoryPermissionsUsersValue struct {
	User struct {
		Name         string `json:"name,omitempty"`
		EmailAddress string `json:"emailAddress,omitempty"`
		DisplayName  string `json:"displayName,omitempty"`
		Active       bool   `json:"active,omitempty"`
	} `json:"user,omitempty"`
	Permission string `json:"permission,omitempty"`
}

type Plugin

type Plugin struct {
	Key              string `json:"key,omitempty"`
	Enabled          bool   `json:"enabled,omitempty"`
	EnabledByDefault bool   `json:"enabledByDefault,omitempty"`
	Version          string `json:"version,omitempty"`
	Description      string `json:"description,omitempty"`
	Name             string `json:"name,omitempty"`
	UserInstalled    bool   `json:"userInstalled,omitempty"`
	Optional         bool   `json:"optional,omitempty"`
	Vendor           struct {
		Name            string `json:"name,omitempty"`
		MarketplaceLink string `json:"marketplaceLink,omitempty"`
		Link            string `json:"link,omitempty"`
	} `json:"vendor,omitempty"`
}

type PluginConfig added in v1.3.0

type PluginConfig struct {
	ValuesRaw json.RawMessage `json:"values"`
	Values    string
}

type PluginInstallPayload added in v1.7.0

type PluginInstallPayload struct {
	PluginURI  string `json:"pluginUri"`
	PluginName string `json:"pluginName"`
}

type PluginLicense

type PluginLicense struct {
	Valid                        bool     `json:"valid,omitempty"`
	Evaluation                   bool     `json:"evaluation,omitempty"`
	NearlyExpired                bool     `json:"nearlyExpired,omitempty"`
	MaintenanceExpiryDate        jsonTime `json:"maintenanceExpiryDate,omitempty"`
	MaintenanceExpired           bool     `json:"maintenanceExpired,omitempty"`
	LicenseType                  string   `json:"licenseType,omitempty"`
	ExpiryDate                   jsonTime `json:"expiryDate,omitempty"`
	RawLicense                   string   `json:"rawLicense,omitempty"`
	Renewable                    bool     `json:"renewable,omitempty"`
	OrganizationName             string   `json:"organizationName,omitempty"`
	ContactEmail                 string   `json:"contactEmail,omitempty"`
	Enterprise                   bool     `json:"enterprise,omitempty"`
	DataCenter                   bool     `json:"dataCenter,omitempty"`
	Subscription                 bool     `json:"subscription,omitempty"`
	Active                       bool     `json:"active,omitempty"`
	AutoRenewal                  bool     `json:"autoRenewal,omitempty"`
	Upgradable                   bool     `json:"upgradable,omitempty"`
	Crossgradeable               bool     `json:"crossgradeable,omitempty"`
	PurchasePastServerCutoffDate bool     `json:"purchasePastServerCutoffDate,omitempty"`
	SupportEntitlementNumber     string   `json:"supportEntitlementNumber,omitempty"`
}

type PluginMarketplaceVersion

type PluginMarketplaceVersion struct {
	Version string `json:"name,omitempty"`
	Links   struct {
		Self struct {
			Href string `json:"href,omitempty"`
		} `json:"self,omitempty"`
	} `json:"_links,omitempty"`
	Embedded struct {
		Artifact struct {
			Links struct {
				Self struct {
					Href string `json:"href,omitempty"`
				} `json:"self,omitempty"`
				Binary struct {
					Href string `json:"href,omitempty"`
				} `json:"binary,omitempty"`
			} `json:"_links,omitempty"`
		} `json:"artifact,omitempty"`
	} `json:"_embedded,omitempty"`
}

func (*PluginMarketplaceVersion) Filename

func (p *PluginMarketplaceVersion) Filename() string

func (*PluginMarketplaceVersion) Key

type Project

type Project struct {
	Name        string `json:"name,omitempty"`
	Key         string `json:"key,omitempty"`
	Description string `json:"description,omitempty"`
	Public      bool   `json:"public,omitempty"`
	Avatar      string `json:"avatar,omitempty"`
}

type ProjectHook

type ProjectHook struct {
	Key             string
	Name            string
	Type            string
	Description     string
	Version         string
	ScopeTypes      []string
	Enabled         bool
	Configured      bool
	ScopeType       string
	ScopeResourceId int
}

type ProjectPermissionsGroup

type ProjectPermissionsGroup struct {
	Name       string
	Permission string
}

type ProjectPermissionsUser

type ProjectPermissionsUser struct {
	Name         string
	EmailAddress string
	DisplayName  string
	Active       bool
	Permission   string
}

type RefMatcher added in v1.4.0

type RefMatcher struct {
	ID   string `json:"id,omitempty"`
	Type struct {
		ID string `json:"id,omitempty"`
	} `json:"type,omitempty"`
}

type Repository

type Repository struct {
	Name        string `json:"name,omitempty"`
	Slug        string `json:"slug,omitempty"`
	Description string `json:"description,omitempty"`
	Forkable    bool   `json:"forkable"`
	Public      bool   `json:"public,omitempty"`
	Links       struct {
		Clone []CloneUrl `json:"clone,omitempty"`
	} `json:"links,omitempty"`
}

type RepositoryFork added in v1.2.0

type RepositoryFork struct {
	Name    string                `json:"name,omitempty"`
	Project RepositoryForkProject `json:"project,omitempty"`
}

type RepositoryForkProject added in v1.2.0

type RepositoryForkProject struct {
	Key string `json:"key,omitempty"`
}

type RepositoryHook

type RepositoryHook struct {
	Key             string
	Name            string
	Type            string
	Description     string
	Version         string
	ScopeTypes      []string
	Enabled         bool
	Configured      bool
	ScopeType       string
	ScopeResourceId int
}

type RepositoryPermissionsGroup

type RepositoryPermissionsGroup struct {
	Name       string
	Permission string
}

type RepositoryPermissionsUser

type RepositoryPermissionsUser struct {
	Name         string
	EmailAddress string
	DisplayName  string
	Active       bool
	Permission   string
}

type Reviewer added in v1.4.0

type Reviewer struct {
	ID int `json:"id,omitempty"`
}

type User

type User struct {
	Name         string `json:"name,omitempty"`
	EmailAddress string `json:"emailAddress,omitempty"`
	DisplayName  string `json:"displayName,omitempty"`
	UserId       int    `json:"id,omitempty"`
}

type UserGroup

type UserGroup struct {
	User  string
	Group string
}

type UserUpdate added in v1.1.0

type UserUpdate struct {
	Name         string `json:"name,omitempty"`
	EmailAddress string `json:"email,omitempty"`
	DisplayName  string `json:"displayName,omitempty"`
}

type Webhook added in v1.6.0

type Webhook struct {
	ID            int                  `json:"id,omitempty"`
	Name          string               `json:"name,omitempty"`
	CreatedDate   jsonTime             `json:"createdDate,omitempty"`
	UpdatedDate   jsonTime             `json:"updatedDate,omitempty"`
	URL           string               `json:"url,omitempty"`
	Active        bool                 `json:"active,omitempty"`
	Events        []interface{}        `json:"events"`
	Configuration WebhookConfiguration `json:"configuration"`
}

type WebhookConfiguration added in v1.6.3

type WebhookConfiguration struct {
	Secret string `json:"secret,omitempty"`
}

type WebhookListResponse added in v1.6.0

type WebhookListResponse struct {
	Size       int       `json:"size,omitempty"`
	Limit      int       `json:"limit,omitempty"`
	Start      int       `json:"start,omitempty"`
	IsLastPage bool      `json:"isLastPage,omitempty"`
	Values     []Webhook `json:"values"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL