Documentation
¶
Index ¶
- Variables
- type APIKeyedError
- type Client
- func (c *Client) AddAdminRoleToUser(p broker.User) (*broker.User, error)
- func (c *Client) AppendTeamAssignments(r broker.TeamsAssignmentRequest) (*broker.TeamsAssignmentResponse, error)
- func (c *Client) CreateEnvironment(p broker.EnvironmentCreateOrUpdateRequest) (*broker.EnvironmentCreateOrUpdateResponse, error)
- func (c *Client) CreatePacticipant(p broker.Pacticipant) (*broker.Pacticipant, error)
- func (c *Client) CreateRole(p broker.Role) (*broker.Role, error)
- func (c *Client) CreateSecret(s broker.Secret) (*broker.SecretResponse, error)
- func (c *Client) CreateTeam(t broker.Team) (*broker.Team, error)
- func (c *Client) CreateUser(p broker.User) (*broker.User, error)
- func (c *Client) CreateWebhook(w broker.Webhook) (*broker.WebhookResponse, error)
- func (c *Client) DeleteEnvironment(p broker.Environment) error
- func (c *Client) DeletePacticipant(p broker.Pacticipant) error
- func (c *Client) DeleteRole(p broker.Role) error
- func (c *Client) DeleteSecret(s broker.Secret) error
- func (c *Client) DeleteTeam(t broker.Team) error
- func (c *Client) DeleteTeamAssignment(t broker.Team, u broker.User) error
- func (c *Client) DeleteTeamAssignments(t broker.TeamsAssignmentRequest) error
- func (c *Client) DeleteUser(p broker.User) error
- func (c *Client) DeleteWebhook(w broker.Webhook) error
- func (c *Client) FindTokenByType(tokenType string) (*broker.APIToken, error)
- func (c *Client) ReadEnvironment(uuid string) (*broker.Environment, error)
- func (c *Client) ReadPacticipant(name string) (*broker.Pacticipant, error)
- func (c *Client) ReadRole(uuid string) (*broker.Role, error)
- func (c *Client) ReadSecret(uuid string) (*broker.SecretResponse, error)
- func (c *Client) ReadTeam(t broker.Team) (*broker.Team, error)
- func (c *Client) ReadTeamAssignments(t broker.Team) (*broker.TeamsAssignmentResponse, error)
- func (c *Client) ReadTenantAuthenticationSettings() (*broker.AuthenticationSettings, error)
- func (c *Client) ReadToken(uuid string) (*broker.APIToken, error)
- func (c *Client) ReadTokens() (*broker.APITokensResponse, error)
- func (c *Client) ReadUser(uuid string) (*broker.User, error)
- func (c *Client) ReadWebhook(id string) (*broker.Webhook, error)
- func (c *Client) RegenerateToken(t broker.APIToken) (*broker.APITokenResponse, error)
- func (c *Client) RemoveAdminRoleFromUser(p broker.User) (*broker.User, error)
- func (c *Client) SetTenantAuthenticationSettings(r broker.AuthenticationSettings) (*broker.AuthenticationSettings, error)
- func (c *Client) SetUserRoles(uuid string, r broker.SetUserRolesRequest) error
- func (c *Client) UpdateEnvironment(p broker.EnvironmentCreateOrUpdateRequest) (*broker.EnvironmentCreateOrUpdateResponse, error)
- func (c *Client) UpdatePacticipant(p broker.Pacticipant) (*broker.Pacticipant, error)
- func (c *Client) UpdateRole(p broker.Role) (*broker.Role, error)
- func (c *Client) UpdateSecret(s broker.Secret) (*broker.SecretResponse, error)
- func (c *Client) UpdateTeam(t broker.Team) (*broker.Team, error)
- func (c *Client) UpdateTeamAssignments(r broker.TeamsAssignmentRequest) (*broker.TeamsAssignmentResponse, error)
- func (c *Client) UpdateUser(p broker.User) (*broker.User, error)
- func (c *Client) UpdateWebhook(w broker.Webhook) (*broker.WebhookResponse, error)
- type Config
Constants ¶
This section is empty.
Variables ¶
var ( // ErrBadRequest represents an HTTP 400 error ErrBadRequest = errors.New("bad request") ErrSystemUnavailable = errors.New("system unavailable") ErrUnauthorized = errors.New("unauthorized") // ErrForbidden represents an HTTP 403 permissions issue ErrForbidden = errors.New("access denied, check that you have access to this resource") )
Functions ¶
This section is empty.
Types ¶
type APIKeyedError ¶
type APIKeyedError map[apiErrorKey]apiErrorDescriptions
type Client ¶
Client is the main Broker API interface. Use NewClient to get started
func (*Client) AddAdminRoleToUser ¶
AddAdminRoleToUser converts a user to an administrator
func (*Client) AppendTeamAssignments ¶
func (c *Client) AppendTeamAssignments(r broker.TeamsAssignmentRequest) (*broker.TeamsAssignmentResponse, error)
AppendTeamAssignments adds users to an existing Team (does not remove absent ones)
func (*Client) CreateEnvironment ¶ added in v0.3.4
func (c *Client) CreateEnvironment(p broker.EnvironmentCreateOrUpdateRequest) (*broker.EnvironmentCreateOrUpdateResponse, error)
CreateEnvironment creates an Environment
func (*Client) CreatePacticipant ¶
func (c *Client) CreatePacticipant(p broker.Pacticipant) (*broker.Pacticipant, error)
CreatePacticipant creates a new Pacticipant
func (*Client) CreateRole ¶
CreateRole creates a Role
func (*Client) CreateSecret ¶
CreateSecret creates a new secret TODO: better response message for OSS broker vs Pactflow
func (*Client) CreateTeam ¶
CreateTeam creates a Team
func (*Client) CreateUser ¶
CreateUser creates a user
func (*Client) CreateWebhook ¶
CreateWebhook creates a new webhook
func (*Client) DeleteEnvironment ¶ added in v0.3.4
func (c *Client) DeleteEnvironment(p broker.Environment) error
DeleteEnvironment removes an Environment
func (*Client) DeletePacticipant ¶
func (c *Client) DeletePacticipant(p broker.Pacticipant) error
DeletePacticipant removes an existing Pacticipant
func (*Client) DeleteRole ¶
DeleteRole removes a role
func (*Client) DeleteSecret ¶
DeleteSecret removes an existing secret
func (*Client) DeleteTeam ¶
DeleteTeam deletes the Team
func (*Client) DeleteTeamAssignment ¶
DeleteTeamAssignment removes a single user from a team
func (*Client) DeleteTeamAssignments ¶
func (c *Client) DeleteTeamAssignments(t broker.TeamsAssignmentRequest) error
DeleteTeamAssignments removes specified users from the team
func (*Client) DeleteUser ¶
DeleteUser simply de-activates an existing user. Users are global on the platform, but can be enabled/disabled at the tenant level
func (*Client) DeleteWebhook ¶
DeleteWebhook removes an existing webhook
func (*Client) FindTokenByType ¶
FindTokenByType finds a token given it's s NOTE: this API will be deprecated once a full CRUD API is available
func (*Client) ReadEnvironment ¶ added in v0.3.4
func (c *Client) ReadEnvironment(uuid string) (*broker.Environment, error)
ReadEnvironment gets an Environment
func (*Client) ReadPacticipant ¶
func (c *Client) ReadPacticipant(name string) (*broker.Pacticipant, error)
ReadPacticipant gets a pacticipant
func (*Client) ReadSecret ¶
func (c *Client) ReadSecret(uuid string) (*broker.SecretResponse, error)
ReadSecret gets the current Secret information (the actual secret is not returned)
func (*Client) ReadTeamAssignments ¶
ReadTeamAssignments finds all users currently in a team
func (*Client) ReadTenantAuthenticationSettings ¶
func (c *Client) ReadTenantAuthenticationSettings() (*broker.AuthenticationSettings, error)
ReadTenantAuthenticationSettings configures the authentication settings on a given Pactflow account
func (*Client) ReadTokens ¶
func (c *Client) ReadTokens() (*broker.APITokensResponse, error)
ReadTokens lists all tokens for the given user principal
func (*Client) ReadWebhook ¶
ReadWebhook returns a Webhook or an error for a given ID
func (*Client) RegenerateToken ¶
RegenerateToken generates a new API Token for the given UUID
func (*Client) RemoveAdminRoleFromUser ¶
RemoveAdminRoleFromUser removes the administrator role from a user
func (*Client) SetTenantAuthenticationSettings ¶
func (c *Client) SetTenantAuthenticationSettings(r broker.AuthenticationSettings) (*broker.AuthenticationSettings, error)
SetTenantAuthenticationSettings configures the authentication settings on a given Pactflow account
func (*Client) SetUserRoles ¶
func (c *Client) SetUserRoles(uuid string, r broker.SetUserRolesRequest) error
SetUserRoles sets the roles for a given user, removing any not given and adding those that were provided
func (*Client) UpdateEnvironment ¶ added in v0.3.4
func (c *Client) UpdateEnvironment(p broker.EnvironmentCreateOrUpdateRequest) (*broker.EnvironmentCreateOrUpdateResponse, error)
UpdateEnvironment updates an Environment
func (*Client) UpdatePacticipant ¶
func (c *Client) UpdatePacticipant(p broker.Pacticipant) (*broker.Pacticipant, error)
UpdatePacticipant updates an existing Pacticipant
func (*Client) UpdateRole ¶
UpdateRole updates an existing Role
func (*Client) UpdateSecret ¶
UpdateSecret updates an existing secret. All values may be changed
func (*Client) UpdateTeam ¶
UpdateTeam updates the team
func (*Client) UpdateTeamAssignments ¶
func (c *Client) UpdateTeamAssignments(r broker.TeamsAssignmentRequest) (*broker.TeamsAssignmentResponse, error)
UpdateTeamAssignments sets the users for a given team, removing any existing users not in the specified request
func (*Client) UpdateUser ¶
UpdateUser updates an existing User currently only supports modifying the "active" property
func (*Client) UpdateWebhook ¶
UpdateWebhook updates an existing webhook. Not all properties are mutable