Documentation ¶
Index ¶
- Constants
- func Bool(v bool) *bool
- type APIError
- type Client
- type CreateOrganizationParams
- type CreateProjectKeyParams
- type CreateProjectParams
- type CreateTeamParams
- type ListOrganizationParams
- type Organization
- type OrganizationAvailableRole
- type OrganizationAvatar
- type OrganizationQuota
- type OrganizationService
- func (s *OrganizationService) Create(params *CreateOrganizationParams) (*Organization, *http.Response, error)
- func (s *OrganizationService) Delete(slug string) (*http.Response, error)
- func (s *OrganizationService) Get(slug string) (*Organization, *http.Response, error)
- func (s *OrganizationService) List(params *ListOrganizationParams) ([]Organization, *http.Response, error)
- func (s *OrganizationService) Update(slug string, params *UpdateOrganizationParams) (*Organization, *http.Response, error)
- type Project
- type ProjectKey
- type ProjectKeyDSN
- type ProjectKeyRateLimit
- type ProjectKeyService
- func (s *ProjectKeyService) Create(organizationSlug string, projectSlug string, params *CreateProjectKeyParams) (*ProjectKey, *http.Response, error)
- func (s *ProjectKeyService) Delete(organizationSlug string, projectSlug string, keyID string) (*http.Response, error)
- func (s *ProjectKeyService) List(organizationSlug string, projectSlug string) ([]ProjectKey, *http.Response, error)
- func (s *ProjectKeyService) Update(organizationSlug string, projectSlug string, keyID string, ...) (*ProjectKey, *http.Response, error)
- type ProjectPlugin
- type ProjectPluginAsset
- type ProjectPluginConfig
- type ProjectPluginService
- func (s *ProjectPluginService) Disable(organizationSlug string, projectSlug string, id string) (*http.Response, error)
- func (s *ProjectPluginService) Enable(organizationSlug string, projectSlug string, id string) (*http.Response, error)
- func (s *ProjectPluginService) Get(organizationSlug string, projectSlug string, id string) (*ProjectPlugin, *http.Response, error)
- func (s *ProjectPluginService) List(organizationSlug string, projectSlug string) ([]ProjectPlugin, *http.Response, error)
- func (s *ProjectPluginService) Update(organizationSlug string, projectSlug string, id string, ...) (*ProjectPlugin, *http.Response, error)
- type ProjectService
- func (s *ProjectService) Create(organizationSlug string, teamSlug string, params *CreateProjectParams) (*Project, *http.Response, error)
- func (s *ProjectService) Delete(organizationSlug string, slug string) (*http.Response, error)
- func (s *ProjectService) Get(organizationSlug string, slug string) (*Project, *http.Response, error)
- func (s *ProjectService) List() ([]Project, *http.Response, error)
- func (s *ProjectService) Update(organizationSlug string, slug string, params *UpdateProjectParams) (*Project, *http.Response, error)
- type Team
- type TeamService
- func (s *TeamService) Create(organizationSlug string, params *CreateTeamParams) (*Team, *http.Response, error)
- func (s *TeamService) Delete(organizationSlug string, slug string) (*http.Response, error)
- func (s *TeamService) Get(organizationSlug string, slug string) (*Team, *http.Response, error)
- func (s *TeamService) List(organizationSlug string) ([]Team, *http.Response, error)
- func (s *TeamService) Update(organizationSlug string, slug string, params *UpdateTeamParams) (*Team, *http.Response, error)
- type UpdateOrganizationParams
- type UpdateProjectKeyParams
- type UpdateProjectParams
- type UpdateProjectPluginParams
- type UpdateTeamParams
Constants ¶
const ( DefaultBaseURL = "https://sentry.io/api/" APIVersion = "0" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIError ¶
type APIError map[string]interface{}
APIError represents a Sentry API Error response
type Client ¶
type Client struct { Organizations *OrganizationService Teams *TeamService Projects *ProjectService ProjectKeys *ProjectKeyService ProjectPlugins *ProjectPluginService // contains filtered or unexported fields }
type CreateOrganizationParams ¶
type CreateOrganizationParams struct { Name string `json:"name,omitempty"` Slug string `json:"slug,omitempty"` AgreeTerms *bool `json:"agreeTerms,omitempty"` }
CreateOrganizationParams are the parameters for OrganizationService.Create.
type CreateProjectKeyParams ¶
type CreateProjectKeyParams struct {
Name string `json:"name,omitempty"`
}
CreateProjectKeyParams are the parameters for ProjectKeyService.Create.
type CreateProjectParams ¶
type CreateProjectParams struct { Name string `json:"name,omitempty"` Slug string `json:"slug,omitempty"` }
CreateProjectParams are the parameters for ProjectService.Create.
type CreateTeamParams ¶
type CreateTeamParams struct { Name string `json:"name,omitempty"` Slug string `json:"slug,omitempty"` }
CreateTeamParams are the parameters for TeamService.Create.
type ListOrganizationParams ¶
type ListOrganizationParams struct {
Cursor string `url:"cursor,omitempty"`
}
ListOrganizationParams are the parameters for OrganizationService.List.
type Organization ¶
type Organization struct { ID string `json:"id"` Slug string `json:"slug"` Name string `json:"name"` DateCreated time.Time `json:"dateCreated"` Quota OrganizationQuota `json:"quota"` Access []string `json:"access"` Features []string `json:"features"` PendingAccessRequests int `json:"pendingAccessRequests"` IsDefault bool `json:"isDefault"` DefaultRole string `json:"defaultRole"` AvailableRoles []OrganizationAvailableRole `json:"availableRoles"` AccountRateLimit int `json:"accountRateLimit"` ProjectRateLimit int `json:"projectRateLimit"` Avatar OrganizationAvatar `json:"avatar"` OpenMembership bool `json:"openMembership"` EnhancedPrivacy bool `json:"enhancedPrivacy"` DataScrubber bool `json:"dataScrubber"` DataScrubberDefaults bool `json:"dataScrubberDefaults"` SensitiveFields []string `json:"sensitiveFields"` SafeFields []string `json:"safeFields"` ScrubIPAddresses bool `json:"scrubIPAddresses"` IsEarlyAdopter bool `json:"isEarlyAdopter"` }
Organization represents a Sentry organization. Based on https://github.com/getsentry/sentry/blob/cc81fff31d4f2c9cede14ce9c479d6f4f78c5e5b/src/sentry/api/endpoints/organization_details.py#L66.
type OrganizationAvailableRole ¶
OrganizationAvailableRole represents a Sentry organization's available role.
type OrganizationAvatar ¶
OrganizationAvatar represents a Sentry organization's avatar.
type OrganizationQuota ¶
type OrganizationQuota struct { MaxRate int `json:"maxRate"` MaxRateInterval int `json:"maxRateInterval"` AccountLimit int `json:"accountLimit"` ProjectLimit int `json:"projectLimit"` }
OrganizationQuota represents a Sentry organization's quota.
type OrganizationService ¶
type OrganizationService struct {
// contains filtered or unexported fields
}
OrganizationService provides methods for accessing Sentry organization API endpoints. https://docs.sentry.io/api/organizations/
func (*OrganizationService) Create ¶
func (s *OrganizationService) Create(params *CreateOrganizationParams) (*Organization, *http.Response, error)
Create a new Sentry organization. https://docs.sentry.io/api/organizations/post-organization-index/
func (*OrganizationService) Delete ¶
func (s *OrganizationService) Delete(slug string) (*http.Response, error)
Delete a Sentry organization.
func (*OrganizationService) Get ¶
func (s *OrganizationService) Get(slug string) (*Organization, *http.Response, error)
Get a Sentry organization. https://docs.sentry.io/api/organizations/get-organization-details/
func (*OrganizationService) List ¶
func (s *OrganizationService) List(params *ListOrganizationParams) ([]Organization, *http.Response, error)
List organizations available to the authenticated session. https://docs.sentry.io/api/organizations/get-organization-index/
func (*OrganizationService) Update ¶
func (s *OrganizationService) Update(slug string, params *UpdateOrganizationParams) (*Organization, *http.Response, error)
Update a Sentry organization. https://docs.sentry.io/api/organizations/put-organization-details/
type Project ¶
type Project struct { ID string `json:"id"` Slug string `json:"slug"` Name string `json:"name"` DateCreated time.Time `json:"dateCreated"` FirstEvent time.Time `json:"firstEvent"` IsPublic bool `json:"isPublic"` IsBookmarked bool `json:"isBookmarked"` CallSign string `json:"callSign"` Color string `json:"color"` Features []string `json:"features"` Status string `json:"status"` // TODO: latestRelease Options map[string]interface{} `json:"options"` DigestsMinDelay int `json:"digestsMinDelay"` DigestsMaxDelay int `json:"digestsMaxDelay"` SubjectPrefix string `json:"subjectPrefix"` SubjectTemplate string `json:"subjectTemplate"` // TODO: plugins // TODO: platforms ProcessingIssues int `json:"processingIssues"` Team Team `json:"team"` Organization Organization `json:"organization"` }
Project represents a Sentry project. Based on https://github.com/getsentry/sentry/blob/cc81fff31d4f2c9cede14ce9c479d6f4f78c5e5b/src/sentry/api/serializers/models/project.py#L137.
type ProjectKey ¶
type ProjectKey struct { ID string `json:"id"` Name string `json:"name"` Public string `json:"public"` Secret string `json:"secret"` ProjectID int `json:"projectId"` IsActive bool `json:"isActive"` RateLimit *ProjectKeyRateLimit `json:"rateLimit"` DSN ProjectKeyDSN `json:"dsn"` DateCreated time.Time `json:"dateCreated"` }
ProjectKey represents a client key bound to a project. Based on https://github.com/getsentry/sentry/blob/a418072946ebd2933724945e1ea2a833cf4c9b94/src/sentry/api/serializers/models/project_key.py.
type ProjectKeyDSN ¶
type ProjectKeyDSN struct { Secret string `json:"secret"` Public string `json:"public"` CSP string `json:"csp"` }
ProjectKeyDSN represents a project key's DSN.
type ProjectKeyRateLimit ¶
ProjectKeyRateLimit represents a project key's rate limit.
type ProjectKeyService ¶
type ProjectKeyService struct {
// contains filtered or unexported fields
}
ProjectKeyService provides methods for accessing Sentry project client key API endpoints. https://docs.sentry.io/api/projects/
func (*ProjectKeyService) Create ¶
func (s *ProjectKeyService) Create(organizationSlug string, projectSlug string, params *CreateProjectKeyParams) (*ProjectKey, *http.Response, error)
Create a new client key bound to a project. https://docs.sentry.io/api/projects/post-project-keys/
func (*ProjectKeyService) Delete ¶
func (s *ProjectKeyService) Delete(organizationSlug string, projectSlug string, keyID string) (*http.Response, error)
Delete a project. https://docs.sentry.io/api/projects/delete-project-details/
func (*ProjectKeyService) List ¶
func (s *ProjectKeyService) List(organizationSlug string, projectSlug string) ([]ProjectKey, *http.Response, error)
List client keys bound to a project. https://docs.sentry.io/api/projects/get-project-keys/
func (*ProjectKeyService) Update ¶
func (s *ProjectKeyService) Update(organizationSlug string, projectSlug string, keyID string, params *UpdateProjectKeyParams) (*ProjectKey, *http.Response, error)
Update a client key. https://docs.sentry.io/api/projects/put-project-key-details/
type ProjectPlugin ¶
type ProjectPlugin struct { ID string `json:"id"` Name string `json:"name"` Type string `json:"type"` CanDisable bool `json:"canDisable"` IsTestable bool `json:"isTestable"` Metadata map[string]interface{} `json:"metadata"` Contexts []string `json:"contexts"` Status string `json:"status"` Assets []ProjectPluginAsset `json:"assets"` Doc string `json:"doc"` Config []ProjectPluginConfig `json:"config"` }
ProjectPlugin represents a plugin bound to a project. Based on https://github.com/getsentry/sentry/blob/96bc1c63df5ec73fe12c136ada11561bf52f1ec9/src/sentry/api/serializers/models/plugin.py#L11.
type ProjectPluginAsset ¶
type ProjectPluginAsset struct {
URL string `json:"url"`
}
ProjectPlugin represents an asset of a plugin.
type ProjectPluginConfig ¶
type ProjectPluginConfig struct { Name string `json:"name"` Label string `json:"label"` Type string `json:"type"` Required bool `json:"required"` Help string `json:"help"` Placeholder string `json:"placeholder"` Choices json.RawMessage `json:"choices"` ReadOnly bool `json:"readonly"` DefaultValue interface{} `json:"defaultValue"` Value interface{} `json:"value"` }
ProjectPluginConfig represents the configuration of a plugin. Based on https://github.com/getsentry/sentry/blob/96bc1c63df5ec73fe12c136ada11561bf52f1ec9/src/sentry/api/serializers/models/plugin.py#L62-L94.
type ProjectPluginService ¶
type ProjectPluginService struct {
// contains filtered or unexported fields
}
ProjectPluginService provides methods for accessing Sentry project plugin API endpoints.
func (*ProjectPluginService) Disable ¶
func (s *ProjectPluginService) Disable(organizationSlug string, projectSlug string, id string) (*http.Response, error)
Disable a project plugin.
func (*ProjectPluginService) Enable ¶
func (s *ProjectPluginService) Enable(organizationSlug string, projectSlug string, id string) (*http.Response, error)
Enable a project plugin.
func (*ProjectPluginService) Get ¶
func (s *ProjectPluginService) Get(organizationSlug string, projectSlug string, id string) (*ProjectPlugin, *http.Response, error)
Get details of a project plugin.
func (*ProjectPluginService) List ¶
func (s *ProjectPluginService) List(organizationSlug string, projectSlug string) ([]ProjectPlugin, *http.Response, error)
List plugins bound to a project.
func (*ProjectPluginService) Update ¶
func (s *ProjectPluginService) Update(organizationSlug string, projectSlug string, id string, params UpdateProjectPluginParams) (*ProjectPlugin, *http.Response, error)
Update settings for a given team. https://docs.sentry.io/api/teams/put-team-details/
type ProjectService ¶
type ProjectService struct {
// contains filtered or unexported fields
}
ProjectService provides methods for accessing Sentry project API endpoints. https://docs.sentry.io/api/projects/
func (*ProjectService) Create ¶
func (s *ProjectService) Create(organizationSlug string, teamSlug string, params *CreateProjectParams) (*Project, *http.Response, error)
Create a new project bound to a team. https://docs.sentry.io/api/teams/post-team-project-index/
func (*ProjectService) Delete ¶
Delete a project. https://docs.sentry.io/api/projects/delete-project-details/
func (*ProjectService) Get ¶
func (s *ProjectService) Get(organizationSlug string, slug string) (*Project, *http.Response, error)
Get details on an individual project. https://docs.sentry.io/api/projects/get-project-details/
func (*ProjectService) List ¶
func (s *ProjectService) List() ([]Project, *http.Response, error)
List projects available. https://docs.sentry.io/api/projects/get-project-index/
func (*ProjectService) Update ¶
func (s *ProjectService) Update(organizationSlug string, slug string, params *UpdateProjectParams) (*Project, *http.Response, error)
Update various attributes and configurable settings for a given project. https://docs.sentry.io/api/projects/put-project-details/
type Team ¶
type Team struct { ID string `json:"id"` Slug string `json:"slug"` Name string `json:"name"` DateCreated time.Time `json:"dateCreated"` HasAccess bool `json:"hasAccess"` IsPending bool `json:"isPending"` IsMember bool `json:"isMember"` }
Team represents a Sentry team that is bound to an organization.
type TeamService ¶
type TeamService struct {
// contains filtered or unexported fields
}
TeamService provides methods for accessing Sentry team API endpoints. https://docs.sentry.io/api/teams/
func (*TeamService) Create ¶
func (s *TeamService) Create(organizationSlug string, params *CreateTeamParams) (*Team, *http.Response, error)
Create a new Sentry team bound to an organization. https://docs.sentry.io/api/teams/post-organization-teams/
func (*TeamService) Delete ¶
Delete a team. https://docs.sentry.io/api/teams/delete-team-details/
func (*TeamService) Get ¶
Get details on an individual team of an organization. https://docs.sentry.io/api/teams/get-team-details/
func (*TeamService) List ¶
List returns a list of teams bound to an organization. https://docs.sentry.io/api/teams/get-organization-teams/
func (*TeamService) Update ¶
func (s *TeamService) Update(organizationSlug string, slug string, params *UpdateTeamParams) (*Team, *http.Response, error)
Update settings for a given team. https://docs.sentry.io/api/teams/put-team-details/
type UpdateOrganizationParams ¶
type UpdateOrganizationParams struct { Name string `json:"name,omitempty"` Slug string `json:"slug,omitempty"` }
UpdateOrganizationParams are the parameters for OrganizationService.Update.
type UpdateProjectKeyParams ¶
type UpdateProjectKeyParams struct {
Name string `json:"name,omitempty"`
}
UpdateProjectKeyParams are the parameters for ProjectKeyService.Update.
type UpdateProjectParams ¶
type UpdateProjectParams struct { Name string `json:"name,omitempty"` Slug string `json:"slug,omitempty"` IsBookmarked *bool `json:"isBookmarked,omitempty"` DigestsMinDelay *int `json:"digestsMinDelay,omitempty"` DigestsMaxDelay *int `json:"digestsMaxDelay,omitempty"` Options map[string]interface{} `json:"options,omitempty"` }
UpdateProjectParams are the parameters for ProjectService.Update.
type UpdateProjectPluginParams ¶
type UpdateProjectPluginParams map[string]interface{}
UpdateTeamParams are the parameters for TeamService.Update.
type UpdateTeamParams ¶
type UpdateTeamParams struct { Name string `json:"name,omitempty"` Slug string `json:"slug,omitempty"` }
UpdateTeamParams are the parameters for TeamService.Update.