Documentation
¶
Index ¶
- Variables
- type APIToken
- type APITokenResponse
- type APITokensEmbedded
- type APITokensResponse
- type AuthenticationProviders
- type AuthenticationSettings
- type EmbeddedUsers
- type Environment
- type EnvironmentCreateOrUpdateRequest
- type EnvironmentCreateOrUpdateResponse
- type EnvironmentEmbeddedItems
- type GithubAuthenticationSettings
- type GoogleAuthenticationSettings
- type HalDoc
- type HalLinks
- type Headers
- type Link
- type Pacticipant
- type PatchResource
- type Permission
- type Request
- type Role
- type RoleV1
- type Secret
- type SecretResponse
- type SetUserRolesRequest
- type Team
- type TeamCreateOrUpdateRequest
- type TeamEmbeddedItems
- type TeamsAssignmentRequest
- type TeamsAssignmentResponse
- type TeamsResponse
- type UpdateResourceAssignmentPatchRequest
- type User
- type UserType
- type Users
- type Webhook
- type WebhookEvent
- type WebhookResponse
Constants ¶
This section is empty.
Variables ¶
var AllowedScopes = []string{
"user:manage:*",
"team:manage:*",
"user:invite",
"system_account:manage:*",
"system_account:read:*",
"user:read:*",
"team:read:*",
"contract_data:manage:*",
"contract_data:read:*",
"contract_data:bulk_delete:*",
"webhook:manage:*",
"secret:manage:*",
"role:manage:*",
"role:read:*",
"token:manage:own",
"read_token:manage:own",
}
Functions ¶
This section is empty.
Types ¶
type APIToken ¶
type APIToken struct {
UUID string `json:"uuid,omitempty"`
Description string `json:"description,omitempty"`
Value string `json:"value,omitempty"`
}
APIToken represents an individual API token
type APITokenResponse ¶
APITokenResponse is the response body for any CRU API calls
type APITokensEmbedded ¶
type APITokensEmbedded struct {
Items []APIToken `json:"items"`
}
APITokensEmbedded contains the embedded links in the resource
type APITokensResponse ¶
type APITokensResponse struct {
Embedded APITokensEmbedded `json:"_embedded"`
HalDoc
}
APITokensResponse is the response body for List API calls
type AuthenticationProviders ¶
type AuthenticationProviders struct {
Google GoogleAuthenticationSettings `json:"Google,omitempty"`
Github GithubAuthenticationSettings `json:"GitHub,omitempty"`
}
AuthenticationProviders for the current tenant
type AuthenticationSettings ¶
type AuthenticationSettings struct {
Providers AuthenticationProviders `json:"authenticationProviders"`
}
AuthenticationSettings contains Pactflow tenant authentication settings
type EmbeddedUsers ¶
type EmbeddedUsers = struct {
Users []User `json:"users,omitempty"`
}
type Environment ¶ added in v0.3.4
type Environment struct {
Name string `json:"name,omitempty"`
Production bool `json:"production"`
DisplayName string `json:"displayName,omitempty"`
CreatedAt string `json:"createdAt,omitempty"`
UpdatedAt string `json:"updatedAt,omitempty"`
UUID string `json:"uuid,omitempty"`
Embedded EnvironmentEmbeddedItems `json:"_embedded,omitempty"`
}
Environment represents an environment and application may be deployed to
type EnvironmentCreateOrUpdateRequest ¶ added in v0.3.4
type EnvironmentCreateOrUpdateResponse ¶ added in v0.3.4
type EnvironmentCreateOrUpdateResponse struct {
Name string `json:"name,omitempty"`
Production bool `json:"production"`
DisplayName string `json:"displayName,omitempty"`
CreatedAt string `json:"createdAt,omitempty"`
UpdatedAt string `json:"updatedAt,omitempty"`
UUID string `json:"uuid,omitempty"`
Teams []string `json:"teamUuids"`
Embedded EnvironmentEmbeddedItems `json:"_embedded,omitempty"`
}
type EnvironmentEmbeddedItems ¶ added in v0.3.4
type EnvironmentEmbeddedItems struct {
Teams []Team `json:"teams,omitempty"`
}
type GithubAuthenticationSettings ¶
type GithubAuthenticationSettings struct {
Organizations []string `json:"GithubOrganizations"`
}
GithubAuthenticationSettings configures the allowed organisations that may authenticate to Pactflow NOTE: this does not perform any Github OAuth process, which must be confirmed via the UI after enabling
type GoogleAuthenticationSettings ¶
type GoogleAuthenticationSettings struct {
EmailDomains []string `json:"EmailDomains"`
}
GoogleAuthenticationSettings configures the allowed email domains to authenticate to Pactflow
type HalDoc ¶
type HalDoc struct {
Links HalLinks `json:"_links"`
}
HalDoc is a simple representation of the HAL response from a Pact Broker.
type Link ¶
type Link struct {
Href string `json:"href"`
Title string `json:"title"`
Name string `json:"name"`
}
Link represents a link to a resource
type Pacticipant ¶
type Pacticipant struct {
Name string `json:"name,omitempty" pact:"example=terraform-client"`
RepositoryURL string `json:"repositoryUrl,omitempty" pact:"example=https://github.com/pactflow/terraform-provider-pact"`
MainBranch string `json:"mainBranch,omitempty" pact:"example=main"`
DisplayName string `json:"displayName,omitempty" pact:"example=terraform client"`
}
type PatchResource ¶
type PatchResource struct {
Uuid string `json:"uuid"`
}
type Permission ¶
type Request ¶
type Request struct {
Method string `json:"method,omitempty"`
URL string `json:"url,omitempty"`
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
Headers Headers `json:"headers,omitempty"`
Body interface{} `json:"body,omitempty"`
}
Request is an HTTP request structure
type Role ¶
type Role struct {
UUID string `json:"uuid,omitempty"`
Name string `json:"name,omitempty"`
Permissions []Permission `json:"permissions,omitempty"`
}
type RoleV1 ¶
RoleV1 is a role that a User may have in Pactflow
{
"updatedAt": "2020-06-28T23:31:51+00:00",
"createdAt": "2020-06-28T23:31:51+00:00",
"uuid": "cf75d7c2-416b-11ea-af5e-53c3b1a4efd8",
"name": "Administrator"
}
type SecretResponse ¶
curl 'https://dius.pact.dius.com.au/secrets' '{"name":"foo","description":"bar","value":"baz"}' --compressed
type SetUserRolesRequest ¶
type SetUserRolesRequest struct {
Roles []string `json:"roles"`
}
SetUserRolesRequest is used to set roles to a given user
type Team ¶
type Team struct {
UUID string `json:"uuid,omitempty"`
Name string `json:"name,omitempty"`
NumberOfMembers int `json:"numberOfMembers,omitempty"`
Embedded TeamEmbeddedItems `json:"_embedded,omitempty"`
}
Team represents a user login to Pactflow
type TeamCreateOrUpdateRequest ¶ added in v0.7.0
type TeamEmbeddedItems ¶
type TeamEmbeddedItems struct {
Pacticipants []Pacticipant `json:"pacticipants,omitempty"`
Members []User `json:"members,omitempty"`
Administrators []User `json:"administrators,omitempty"`
Environments []Environment `json:"environments,omitempty"`
}
type TeamsAssignmentRequest ¶
type TeamsAssignmentResponse ¶
type TeamsAssignmentResponse struct {
Embedded EmbeddedUsers `json:"_embedded,omitempty"`
}
type TeamsResponse ¶
type UpdateResourceAssignmentPatchRequest ¶
type UpdateResourceAssignmentPatchRequest struct {
Operation string `json:"op"`
Path string `json:"path"`
Value PatchResource `json:"value"`
}
type User ¶
type User struct {
UUID string `json:"uuid,omitempty"`
Name string `json:"name,omitempty"`
Email string `json:"email,omitempty"`
Active bool `json:"active"`
CreatedAt string `json:"createdAt,omitempty"`
UpdatedAt string `json:"updatedAt,omitempty"`
LastLogin string `json:"lastLogin,omitempty"`
IdentityProviderID string `json:"identityProviderId,omitempty"`
Type UserType `json:"type,omitempty"`
TypeDescription string `json:"typeDescription,omitempty"`
Embedded struct {
Roles []Role `json:"roles,omitempty"`
Teams []Team `json:"teams,omitempty"`
} `json:"_embedded,omitempty"`
}
User represents a user login to Pactflow
type Users ¶
type Users struct {
Users []User `json:"users"`
}
Users is a list of User objects to manage
type Webhook ¶
type Webhook struct {
ID string `json:"-"`
TeamUUID string `json:"teamUuid,omitempty"`
Description string `json:"description,omitempty"`
Enabled bool `json:"enabled,omitempty"`
CreatedAt string `json:"createdAt,omitempty"`
Provider *Pacticipant `json:"provider,omitempty"`
Consumer *Pacticipant `json:"consumer,omitempty"`
Events []WebhookEvent `json:"events,omitempty"`
Request Request `json:"request,omitempty"`
}
Webhook represents a webhook configured in the broker
type WebhookEvent ¶
type WebhookEvent struct {
Name string `json:"name"`
}
WebhookEvent represents the types of events that trigger a Webhook
type WebhookResponse ¶
WebhookResponse is the response body for any CRU methods