Documentation
¶
Index ¶
- type Client
- func (c *Client) CreateCollaborator(collab *Collaborator) (*Collaborator, error)
- func (c *Client) CreateProject(project *Project) (*Project, error)
- func (c *Client) DeleteCollaborator(id string) error
- func (c *Client) DeleteProject(id string) error
- func (c *Client) GetCollaborator(id string) (*Collaborator, error)
- func (c *Client) GetCurrentOrganization() (string, error)
- func (c *Client) GetOrganization() (*Organization, error)
- func (c *Client) GetProject(id string) (*Project, error)
- func (c *Client) ListProjects(query string, sort string, direction string) ([]Project, error)
- func (c *Client) UpdateCollaborator(collab *Collaborator) (*Collaborator, error)
- func (c *Client) UpdateOrganization(org *Organization) (*Organization, error)
- func (c *Client) UpdateProject(project *Project) (*Project, error)
- type Collaborator
- type OrgCreator
- type Organization
- type Project
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
OrgID string
// contains filtered or unexported fields
}
Client defines the HTTP client used communicate with the Bugsnag data access API. The client is restricted to single organization. See https://bugsnagapiv2.docs.apiary.io for more details
func (*Client) CreateCollaborator ¶
func (c *Client) CreateCollaborator(collab *Collaborator) (*Collaborator, error)
CreateCollaborator creates a new collaborator. If the user does not exist, a user will be created and invited to join the organization
func (*Client) CreateProject ¶
CreateProject creates a new project in organization
func (*Client) DeleteCollaborator ¶
DeleteCollaborator will remove the collaborator from the organization
func (*Client) DeleteProject ¶
DeleteProject deletes a project in the organization
func (*Client) GetCollaborator ¶
func (c *Client) GetCollaborator(id string) (*Collaborator, error)
GetCollaborator returns a specific collaborator using the provided user ID
func (*Client) GetCurrentOrganization ¶
GetCurrentOrganization returns the ID of the organization associated with the configured data access token
func (*Client) GetOrganization ¶
func (c *Client) GetOrganization() (*Organization, error)
GetOrganization returns the organization associated with the configured data access token
func (*Client) GetProject ¶
GetProject returns a specific project using the provided project ID
func (*Client) ListProjects ¶
ListProjects provides a list of projects in the organization. A query string can be provided to narrow down the list of projects based on project name. The list can be sorted.
func (*Client) UpdateCollaborator ¶
func (c *Client) UpdateCollaborator(collab *Collaborator) (*Collaborator, error)
UpdateCollaborator will update access permissions for the specified collaborator
func (*Client) UpdateOrganization ¶
func (c *Client) UpdateOrganization(org *Organization) (*Organization, error)
UpdateOrganization updates organization settings associated with the configured data access token
type Collaborator ¶
type Collaborator struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Email string `json:"email,omitempty"`
Admin *bool `json:"admin,omitempty"`
Password string `json:"password,omitempty"`
IsAdmin bool `json:"is_admin,omitempty"`
ProjectIDs []string `json:"project_ids,omitempty"`
TwoFAEnabled bool `json:"two_factor_enabled,omitempty"`
TwoFAEnabledOn string `json:"two_factor_enabled_on,omitempty"`
RecoveryCodesRemaining int `json:"recovery_codes_remaining,omitempty"`
PasswordUpdatedOn string `json:"password_updated_on,omitempty"`
ShowTimeInUTC bool `json:"show_time_in_utc,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
PendingInvitation bool `json:"pending_invitation,omitempty"`
LastRequestAt string `json:"last_request_at,omitempty"`
PaidFor bool `json:"paid_for,omitempty"`
}
Collaborator defines the details of a Bugsnag collaborator as provided by the Bugsnag data access api.
type OrgCreator ¶
type OrgCreator struct {
Email string `json:"email,omitempty"`
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
}
OrgCreator defines details about the creator of the organization
type Organization ¶
type Organization struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
BillingEmails []string `json:"billing_emails,omitempty"`
AutoUpgrade *bool `json:"auto_upgrade,omitempty"`
Slug string `json:"slug,omitempty"`
Creator *OrgCreator `json:"creator,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
UpdatedAt string `json:"updated_at,omitempty"`
}
Organization defines the details of a Bugsnag organization as provided by the Bugsnag data access API
type Project ¶
type Project struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
APIKey string `json:"api_key,omitempty"`
Slug string `json:"slug,omitempty"`
URL string `json:"url,omitempty"`
HTMLURL string `json:"html_url,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
UpdatedAt string `json:"updated_at,omitempty"`
}
Project defines the details of a Bugsnag project as provided by the Bugsnag data access API.