sentry

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

View Source
const (
	RoleMember  string = "member"
	RoleBilling string = "billing"
	RoleAdmin   string = "admin"
	RoleOwner   string = "owner"
	RoleManager string = "manager"
)

Variables

This section is empty.

Functions

func Bool added in v1.1.0

func Bool(v bool) *bool

Bool returns a pointer to the bool value passed in.

func BoolValue added in v1.4.0

func BoolValue(v *bool) bool

BoolValue returns the value of the bool pointer passed in or false if the pointer is nil.

func CheckResponse added in v1.4.0

func CheckResponse(r *http.Response) error

func Float64 added in v1.4.0

func Float64(v float64) *float64

Float64 returns a pointer to the float64 value passed in.

func Float64Value added in v1.4.0

func Float64Value(v *float64) float64

Float64Value returns the value of the float64 pointer passed in or 0 if the pointer is nil.

func Int added in v1.4.0

func Int(v int) *int

Int returns a pointer to the int value passed in.

func IntValue added in v1.4.0

func IntValue(v *int) int

IntValue returns the value of the int pointer passed in or 0 if the pointer is nil.

func String added in v1.4.0

func String(v string) *string

String returns a pointer to the string value passed in.

func StringValue added in v1.4.0

func StringValue(v *string) string

StringValue returns the value of the string pointer passed in or "" if the pointer is nil.

func Time added in v1.4.0

func Time(v time.Time) *time.Time

Time returns a pointer to the time.Time value passed in.

func TimeValue added in v1.4.0

func TimeValue(v *time.Time) time.Time

TimeValue returns the value of the time.Time pointer passed in or time.Time{} if the pointer is nil.

Types

type APIError

type APIError struct {
	// contains filtered or unexported fields
}

APIError represents a Sentry API Error response. Should look like:

type apiError struct {
	Detail string `json:"detail"`
}

func (APIError) Detail added in v1.4.0

func (e APIError) Detail() string

func (APIError) Empty

func (e APIError) Empty() bool

Empty returns true if empty.

func (APIError) Error

func (e APIError) Error() string

func (*APIError) MarshalJSON added in v1.4.0

func (e *APIError) MarshalJSON() ([]byte, error)

func (*APIError) UnmarshalJSON added in v1.4.0

func (e *APIError) UnmarshalJSON(b []byte) error

type Avatar added in v1.3.0

type Avatar struct {
	UUID *string `json:"avatarUuid"`
	Type string  `json:"avatarType"`
}

Avatar represents an avatar.

type BrowserExtensionParams added in v1.3.0

type BrowserExtensionParams struct {
	Active bool `json:"active"`
}

BrowserExtensionParams defines parameters for browser extension request

type Client

type Client struct {

	// BaseURL for API requests.
	BaseURL *url.URL

	// User agent used when communicating with Sentry.
	UserAgent string

	// Services
	DashboardWidgets         *DashboardWidgetsService
	Dashboards               *DashboardsService
	IssueAlerts              *IssueAlertsService
	MetricAlerts             *MetricAlertsService
	OrganizationCodeMappings *OrganizationCodeMappingsService
	OrganizationIntegrations *OrganizationIntegrationsService
	OrganizationMembers      *OrganizationMembersService
	OrganizationRepositories *OrganizationRepositoriesService
	Organizations            *OrganizationsService
	ProjectKeys              *ProjectKeysService
	ProjectOwnerships        *ProjectOwnershipsService
	ProjectPlugins           *ProjectPluginsService
	Projects                 *ProjectsService
	ProjectFilter            *ProjectFilterService
	Teams                    *TeamsService
	// contains filtered or unexported fields
}

Client for Sentry API.

func NewClient

func NewClient(httpClient *http.Client) *Client

NewClient returns a new Sentry API client. If a nil httpClient is provided, the http.DefaultClient will be used.

func NewOnPremiseClient added in v1.4.0

func NewOnPremiseClient(baseURL string, httpClient *http.Client) (*Client, error)

NewOnPremiseClient returns a new Sentry API client with the provided base URL. Note that the base URL must be in the format "http(s)://[hostname]/api/". If the base URL does not have the suffix "/api/", it will be added automatically. If a nil httpClient is provided, the http.DefaultClient will be used.

func (*Client) BareDo added in v1.4.0

func (c *Client) BareDo(ctx context.Context, req *http.Request) (*Response, error)

func (*Client) Do added in v1.4.0

func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*Response, error)

func (*Client) NewRequest added in v1.4.0

func (c *Client) NewRequest(method, urlRef string, body interface{}) (*http.Request, error)

NewRequest creates an API request.

type CreateOrganizationCodeMappingParams added in v1.4.2

type CreateOrganizationCodeMappingParams struct {
	DefaultBranch string `json:"defaultBranch"`
	StackRoot     string `json:"stackRoot"`
	SourceRoot    string `json:"sourceRoot"`
	RepositoryId  string `json:"repositoryId"`
	IntegrationId string `json:"integrationId"`
	ProjectId     string `json:"projectId"`
}

https://github.com/getsentry/sentry/blob/22.7.0/src/sentry/api/endpoints/organization_code_mappings.py#L26-L35

type CreateOrganizationMemberParams added in v1.4.0

type CreateOrganizationMemberParams struct {
	Email string   `json:"email"`
	Role  string   `json:"role"`
	Teams []string `json:"teams,omitempty"`
}

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 CreateOrganizationRepositoryParams added in v1.4.2

type CreateOrganizationRepositoryParams map[string]interface{}

Fields are different for different providers

type CreateProjectKeyParams

type CreateProjectKeyParams struct {
	Name      string               `json:"name,omitempty"`
	RateLimit *ProjectKeyRateLimit `json:"rateLimit,omitempty"`
}

CreateProjectKeyParams are the parameters for ProjectKeyService.Create.

type CreateProjectParams

type CreateProjectParams struct {
	Name     string `json:"name,omitempty"`
	Slug     string `json:"slug,omitempty"`
	Platform string `json:"platform,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 Dashboard added in v1.4.0

type Dashboard struct {
	ID          *string            `json:"id,omitempty"`
	Title       *string            `json:"title,omitempty"`
	DateCreated *time.Time         `json:"dateCreated,omitempty"`
	Widgets     []*DashboardWidget `json:"widgets,omitempty"`
}

Dashboard represents a Dashboard.

type DashboardWidget added in v1.4.0

type DashboardWidget struct {
	ID          *string                 `json:"id,omitempty"`
	Title       *string                 `json:"title,omitempty"`
	DisplayType *string                 `json:"displayType,omitempty"`
	Interval    *string                 `json:"interval,omitempty"`
	Queries     []*DashboardWidgetQuery `json:"queries,omitempty"`
	WidgetType  *string                 `json:"widgetType,omitempty"`
	Limit       *int                    `json:"limit,omitempty"`
	Layout      *DashboardWidgetLayout  `json:"layout,omitempty"`
}

DashboardWidget represents a Dashboard Widget. https://github.com/getsentry/sentry/blob/22.5.0/src/sentry/api/serializers/rest_framework/dashboard.py#L230-L243

type DashboardWidgetErrors added in v1.4.0

type DashboardWidgetErrors map[string][]string

type DashboardWidgetLayout added in v1.4.0

type DashboardWidgetLayout struct {
	X    *int `json:"x,omitempty"`
	Y    *int `json:"y,omitempty"`
	W    *int `json:"w,omitempty"`
	H    *int `json:"h,omitempty"`
	MinH *int `json:"minH,omitempty"`
}

type DashboardWidgetQuery added in v1.4.0

type DashboardWidgetQuery struct {
	ID           *string  `json:"id,omitempty"`
	Fields       []string `json:"fields,omitempty"`
	Aggregates   []string `json:"aggregates,omitempty"`
	Columns      []string `json:"columns,omitempty"`
	FieldAliases []string `json:"fieldAliases,omitempty"`
	Name         *string  `json:"name,omitempty"`
	Conditions   *string  `json:"conditions,omitempty"`
	OrderBy      *string  `json:"orderby,omitempty"`
}

type DashboardWidgetsService added in v1.4.0

type DashboardWidgetsService service

DashboardWidgetsService provides methods for accessing Sentry dashboard widget API endpoints.

func (*DashboardWidgetsService) Validate added in v1.4.0

func (s *DashboardWidgetsService) Validate(ctx context.Context, organizationSlug string, widget *DashboardWidget) (DashboardWidgetErrors, *Response, error)

Validate a dashboard widget configuration.

type DashboardsService added in v1.4.0

type DashboardsService service

DashboardsService provides methods for accessing Sentry dashboard API endpoints.

func (*DashboardsService) Create added in v1.4.0

func (s *DashboardsService) Create(ctx context.Context, organizationSlug string, params *Dashboard) (*Dashboard, *Response, error)

Create a dashboard.

func (*DashboardsService) Delete added in v1.4.0

func (s *DashboardsService) Delete(ctx context.Context, organizationSlug string, id string) (*Response, error)

Delete a dashboard.

func (*DashboardsService) Get added in v1.4.0

func (s *DashboardsService) Get(ctx context.Context, organizationSlug string, id string) (*Dashboard, *Response, error)

Get details on a dashboard.

func (*DashboardsService) List added in v1.4.0

func (s *DashboardsService) List(ctx context.Context, organizationSlug string, params *ListCursorParams) ([]*Dashboard, *Response, error)

List dashboards in an organization.

func (*DashboardsService) Update added in v1.4.0

func (s *DashboardsService) Update(ctx context.Context, organizationSlug string, id string, params *Dashboard) (*Dashboard, *Response, error)

Update a dashboard.

type ErrorResponse added in v1.4.0

type ErrorResponse struct {
	Response *http.Response
	Detail   string `json:"detail"`
}

func (*ErrorResponse) Error added in v1.4.0

func (r *ErrorResponse) Error() string

func (*ErrorResponse) Is added in v1.4.0

func (r *ErrorResponse) Is(target error) bool

type FilterConfig added in v1.3.0

type FilterConfig struct {
	BrowserExtension bool
	LegacyBrowsers   []string
}

FilterConfig represents configuration for project filter

type IssueAlert added in v1.4.0

type IssueAlert struct {
	ID          *string                `json:"id,omitempty"`
	Conditions  []*IssueAlertCondition `json:"conditions,omitempty"`
	Filters     []*IssueAlertFilter    `json:"filters,omitempty"`
	Actions     []*IssueAlertAction    `json:"actions,omitempty"`
	ActionMatch *string                `json:"actionMatch,omitempty"`
	FilterMatch *string                `json:"filterMatch,omitempty"`
	Frequency   *int                   `json:"frequency,omitempty"`
	Name        *string                `json:"name,omitempty"`
	DateCreated *time.Time             `json:"dateCreated,omitempty"`
	Owner       *string                `json:"owner,omitempty"`
	CreatedBy   *IssueAlertCreatedBy   `json:"createdBy,omitempty"`
	Environment *string                `json:"environment,omitempty"`
	Projects    []string               `json:"projects,omitempty"`
	TaskUUID    *string                `json:"uuid,omitempty"` // This is actually the UUID of the async task that can be spawned to create the rule
}

IssueAlert represents an issue alert configured for this project. https://github.com/getsentry/sentry/blob/22.5.0/src/sentry/api/serializers/models/rule.py#L131-L155

type IssueAlertAction added in v1.4.0

type IssueAlertAction map[string]interface{}

IssueAlertAction for defining actions.

type IssueAlertCondition added in v1.4.0

type IssueAlertCondition map[string]interface{}

IssueAlertCondition for defining conditions.

type IssueAlertCreatedBy added in v1.4.0

type IssueAlertCreatedBy struct {
	ID    *int    `json:"id,omitempty"`
	Name  *string `json:"name,omitempty"`
	Email *string `json:"email,omitempty"`
}

IssueAlertCreatedBy for defining the rule creator.

type IssueAlertFilter added in v1.4.0

type IssueAlertFilter map[string]interface{}

IssueAlertFilter for defining actions.

type IssueAlertTaskDetail added in v1.4.0

type IssueAlertTaskDetail struct {
	Status *string     `json:"status,omitempty"`
	Rule   *IssueAlert `json:"rule,omitempty"`
	Error  *string     `json:"error,omitempty"`
}

IssueAlertTaskDetail represents the inline struct Sentry defines for task details https://github.com/getsentry/sentry/blob/22.5.0/src/sentry/api/endpoints/project_rule_task_details.py#L29

type IssueAlertsService added in v1.4.0

type IssueAlertsService service

IssueAlertsService provides methods for accessing Sentry project client key API endpoints. https://docs.sentry.io/api/projects/

func (*IssueAlertsService) Create added in v1.4.0

func (s *IssueAlertsService) Create(ctx context.Context, organizationSlug string, projectSlug string, params *IssueAlert) (*IssueAlert, *Response, error)

Create a new issue alert bound to a project.

func (*IssueAlertsService) Delete added in v1.4.0

func (s *IssueAlertsService) Delete(ctx context.Context, organizationSlug string, projectSlug string, id string) (*Response, error)

Delete an issue alert.

func (*IssueAlertsService) Get added in v1.4.0

func (s *IssueAlertsService) Get(ctx context.Context, organizationSlug string, projectSlug string, id string) (*IssueAlert, *Response, error)

Get details on an issue alert.

func (*IssueAlertsService) List added in v1.4.0

func (s *IssueAlertsService) List(ctx context.Context, organizationSlug string, projectSlug string, params *ListCursorParams) ([]*IssueAlert, *Response, error)

List issue alerts configured for a project.

func (*IssueAlertsService) Update added in v1.4.0

func (s *IssueAlertsService) Update(ctx context.Context, organizationSlug string, projectSlug string, issueAlertID string, params *IssueAlert) (*IssueAlert, *Response, error)

Update an issue alert.

type LegactBrowserParams added in v1.3.0

type LegactBrowserParams struct {
	Browsers []string `json:"subfilters"`
}

LegactBrowserParams defines parameters for legacy browser request

type ListCursorParams added in v1.4.0

type ListCursorParams struct {
	// A cursor, as given in the Link header.
	// If specified, the query continues the search using this cursor.
	Cursor string `url:"cursor,omitempty"`
}

type ListOrganizationCodeMappingsParams added in v1.4.2

type ListOrganizationCodeMappingsParams struct {
	ListCursorParams
	IntegrationId string `url:"integrationId,omitempty"`
}

type ListOrganizationIntegrationsParams added in v1.4.2

type ListOrganizationIntegrationsParams struct {
	ListCursorParams
	ProviderKey string `url:"provider_key,omitempty"`
}

type ListOrganizationRepositoriesParams added in v1.4.2

type ListOrganizationRepositoriesParams struct {
	ListCursorParams
	// omitting status defaults to only active.
	// sending empty string shows everything, which is a more reasonable default.
	Status string `url:"status"`
	Query  string `url:"query,omitempty"`
}

type MetricAlert added in v1.4.0

type MetricAlert struct {
	ID               *string               `json:"id,omitempty"`
	Name             *string               `json:"name,omitempty"`
	Environment      *string               `json:"environment,omitempty"`
	DataSet          *string               `json:"dataset,omitempty"`
	Query            *string               `json:"query,omitempty"`
	Aggregate        *string               `json:"aggregate,omitempty"`
	TimeWindow       *float64              `json:"timeWindow,omitempty"`
	ThresholdType    *int                  `json:"thresholdType,omitempty"`
	ResolveThreshold *float64              `json:"resolveThreshold,omitempty"`
	Triggers         []*MetricAlertTrigger `json:"triggers,omitempty"`
	Projects         []string              `json:"projects,omitempty"`
	Owner            *string               `json:"owner,omitempty"`
	DateCreated      *time.Time            `json:"dateCreated,omitempty"`
	// Don't `omitempty` because we want to set this to null to force Sentry to register this
	// metric alert as a static alert when `ComparisonDelta` is empty.
	// We type this as a float instead of an int because Sentry, server-side, returns a float for this value.
	ComparisonDelta *float64 `json:"comparisonDelta"`
}

type MetricAlertTrigger added in v1.4.0

type MetricAlertTrigger struct {
	ID               *string                     `json:"id,omitempty"`
	AlertRuleID      *string                     `json:"alertRuleId,omitempty"`
	Label            *string                     `json:"label,omitempty"`
	ThresholdType    *int                        `json:"thresholdType,omitempty"`
	AlertThreshold   *float64                    `json:"alertThreshold,omitempty"`
	ResolveThreshold *float64                    `json:"resolveThreshold,omitempty"`
	DateCreated      *time.Time                  `json:"dateCreated,omitempty"`
	Actions          []*MetricAlertTriggerAction `json:"actions"` // Must always be present.
}

MetricAlertTrigger represents a metric alert trigger. https://github.com/getsentry/sentry/blob/22.5.0/src/sentry/api/serializers/models/alert_rule_trigger.py#L35-L47

type MetricAlertTriggerAction added in v1.4.0

type MetricAlertTriggerAction struct {
	ID                 *string    `json:"id,omitempty"`
	AlertRuleTriggerID *string    `json:"alertRuleTriggerId,omitempty"`
	Type               *string    `json:"type,omitempty"`
	TargetType         *string    `json:"targetType,omitempty"`
	TargetIdentifier   *string    `json:"targetIdentifier,omitempty"`
	InputChannelID     *string    `json:"inputChannelId,omitempty"`
	IntegrationID      *int       `json:"integrationId,omitempty"`
	SentryAppID        *string    `json:"sentryAppId,omitempty"`
	DateCreated        *time.Time `json:"dateCreated,omitempty"`
	Description        *string    `json:"desc,omitempty"`
}

MetricAlertTriggerAction represents a metric alert trigger action. https://github.com/getsentry/sentry/blob/22.5.0/src/sentry/api/serializers/models/alert_rule_trigger_action.py#L42-L66

type MetricAlertsService added in v1.4.0

type MetricAlertsService service

func (*MetricAlertsService) Create added in v1.4.0

func (s *MetricAlertsService) Create(ctx context.Context, organizationSlug string, projectSlug string, params *MetricAlert) (*MetricAlert, *Response, error)

Create a new Alert Rule bound to a project.

func (*MetricAlertsService) Delete added in v1.4.0

func (s *MetricAlertsService) Delete(ctx context.Context, organizationSlug string, projectSlug string, alertRuleID string) (*Response, error)

Delete an Alert Rule.

func (*MetricAlertsService) Get added in v1.4.0

func (s *MetricAlertsService) Get(ctx context.Context, organizationSlug string, projectSlug string, id string) (*MetricAlert, *Response, error)

Get details on an issue alert.

func (*MetricAlertsService) List added in v1.4.0

func (s *MetricAlertsService) List(ctx context.Context, organizationSlug string, projectSlug string, params *ListCursorParams) ([]*MetricAlert, *Response, error)

List Alert Rules configured for a project

func (*MetricAlertsService) Update added in v1.4.0

func (s *MetricAlertsService) Update(ctx context.Context, organizationSlug string, projectSlug string, alertRuleID string, params *MetricAlert) (*MetricAlert, *Response, error)

Update an Alert Rule.

type Organization

type Organization struct {
	// Basic
	ID                       *string             `json:"id,omitempty"`
	Slug                     *string             `json:"slug,omitempty"`
	Status                   *OrganizationStatus `json:"status,omitempty"`
	Name                     *string             `json:"name,omitempty"`
	DateCreated              *time.Time          `json:"dateCreated,omitempty"`
	IsEarlyAdopter           *bool               `json:"isEarlyAdopter,omitempty"`
	Require2FA               *bool               `json:"require2FA,omitempty"`
	RequireEmailVerification *bool               `json:"requireEmailVerification,omitempty"`
	Avatar                   *Avatar             `json:"avatar,omitempty"`
	Features                 []string            `json:"features,omitempty"`

	// Detailed
	// TODO: experiments
	Quota                *OrganizationQuota          `json:"quota,omitempty"`
	IsDefault            *bool                       `json:"isDefault,omitempty"`
	DefaultRole          *string                     `json:"defaultRole,omitempty"`
	AvailableRoles       []OrganizationAvailableRole `json:"availableRoles,omitempty"`
	OpenMembership       *bool                       `json:"openMembership,omitempty"`
	AllowSharedIssues    *bool                       `json:"allowSharedIssues,omitempty"`
	EnhancedPrivacy      *bool                       `json:"enhancedPrivacy,omitempty"`
	DataScrubber         *bool                       `json:"dataScrubber,omitempty"`
	DataScrubberDefaults *bool                       `json:"dataScrubberDefaults,omitempty"`
	SensitiveFields      []string                    `json:"sensitiveFields,omitempty"`
	SafeFields           []string                    `json:"safeFields,omitempty"`
	StoreCrashReports    *int                        `json:"storeCrashReports,omitempty"`
	AttachmentsRole      *string                     `json:"attachmentsRole,omitempty"`
	DebugFilesRole       *string                     `json:"debugFilesRole,omitempty"`
	EventsMemberAdmin    *bool                       `json:"eventsMemberAdmin,omitempty"`
	AlertsMemberWrite    *bool                       `json:"alertsMemberWrite,omitempty"`
	ScrubIPAddresses     *bool                       `json:"scrubIPAddresses,omitempty"`
	ScrapeJavaScript     *bool                       `json:"scrapeJavaScript,omitempty"`
	AllowJoinRequests    *bool                       `json:"allowJoinRequests,omitempty"`
	RelayPiiConfig       *string                     `json:"relayPiiConfig,omitempty"`
	// TODO: trustedRelays
	Access                []string `json:"access,omitempty"`
	Role                  *string  `json:"role,omitempty"`
	PendingAccessRequests *int     `json:"pendingAccessRequests,omitempty"`
}

Organization represents detailed information about a Sentry organization. Based on https://github.com/getsentry/sentry/blob/22.5.0/src/sentry/api/serializers/models/organization.py#L263-L288

type OrganizationAvailableRole

type OrganizationAvailableRole struct {
	ID   *string `json:"id"`
	Name *string `json:"name"`
}

OrganizationAvailableRole represents a Sentry organization's available role.

type OrganizationCodeMapping added in v1.4.2

type OrganizationCodeMapping struct {
	ID            string                           `json:"id"`
	ProjectId     string                           `json:"projectId"`
	ProjectSlug   string                           `json:"projectSlug"`
	RepoId        string                           `json:"repoId"`
	RepoName      string                           `json:"repoName"`
	IntegrationId string                           `json:"integrationId"`
	Provider      *OrganizationIntegrationProvider `json:"provider"`
	StackRoot     string                           `json:"stackRoot"`
	SourceRoot    string                           `json:"sourceRoot"`
	DefaultBranch string                           `json:"defaultBranch"`
}

OrganizationCodeMapping represents a code mapping added for the organization. https://github.com/getsentry/sentry/blob/22.7.0/src/sentry/api/serializers/models/repository_project_path_config.py

type OrganizationCodeMappingsService added in v1.4.2

type OrganizationCodeMappingsService service

OrganizationCodeMappingsService provides methods for accessing Sentry organization code mappings API endpoints. Paths: https://github.com/getsentry/sentry/blob/22.7.0/src/sentry/api/urls.py#L929-L938 Endpoints: https://github.com/getsentry/sentry/blob/22.7.0/src/sentry/api/endpoints/organization_code_mappings.py Endpoints: https://github.com/getsentry/sentry/blob/22.7.0/src/sentry/api/endpoints/organization_code_mapping_details.py

func (*OrganizationCodeMappingsService) Create added in v1.4.2

func (*OrganizationCodeMappingsService) Delete added in v1.4.2

func (s *OrganizationCodeMappingsService) Delete(ctx context.Context, organizationSlug string, codeMappingId string) (*Response, error)

func (*OrganizationCodeMappingsService) List added in v1.4.2

List organization integrations.

func (*OrganizationCodeMappingsService) Update added in v1.4.2

type OrganizationIntegration added in v1.4.2

type OrganizationIntegration struct {
	// https://github.com/getsentry/sentry/blob/22.7.0/src/sentry/api/serializers/models/integration.py#L35
	ID          string                          `json:"id"`
	Name        string                          `json:"name"`
	Icon        string                          `json:"icon"`
	DomainName  string                          `json:"domainName"`
	AccountType string                          `json:"accountType"`
	Scopes      []string                        `json:"scopes"`
	Status      string                          `json:"status"`
	Provider    OrganizationIntegrationProvider `json:"provider"`

	// https://github.com/getsentry/sentry/blob/22.7.0/src/sentry/api/serializers/models/integration.py#L138
	ExternalId                    string     `json:"externalId"`
	OrganizationId                int        `json:"organizationId"`
	OrganizationIntegrationStatus string     `json:"organizationIntegrationStatus"`
	GracePeriodEnd                *time.Time `json:"gracePeriodEnd"`
}

OrganizationIntegration represents an integration added for the organization. https://github.com/getsentry/sentry/blob/22.7.0/src/sentry/api/serializers/models/integration.py#L93

type OrganizationIntegrationProvider added in v1.4.2

type OrganizationIntegrationProvider struct {
	Key        string   `json:"key"`
	Slug       string   `json:"slug"`
	Name       string   `json:"name"`
	CanAdd     bool     `json:"canAdd"`
	CanDisable bool     `json:"canDisable"`
	Features   []string `json:"features"`
}

https://github.com/getsentry/sentry/blob/22.7.0/src/sentry/api/serializers/models/integration.py#L22

type OrganizationIntegrationsService added in v1.4.2

type OrganizationIntegrationsService service

OrganizationIntegrationsService provides methods for accessing Sentry organization integrations API endpoints. Paths: https://github.com/getsentry/sentry/blob/22.7.0/src/sentry/api/urls.py#L1236-L1240 Endpoints: https://github.com/getsentry/sentry/blob/22.7.0/src/sentry/api/endpoints/integrations/organization_integrations/index.py

func (*OrganizationIntegrationsService) List added in v1.4.2

List organization integrations.

type OrganizationMember added in v1.3.0

type OrganizationMember struct {
	ID           string          `json:"id"`
	Email        string          `json:"email"`
	Name         string          `json:"name"`
	User         User            `json:"user"`
	Role         string          `json:"role"`
	RoleName     string          `json:"roleName"`
	Pending      bool            `json:"pending"`
	Expired      bool            `json:"expired"`
	Flags        map[string]bool `json:"flags"`
	DateCreated  time.Time       `json:"dateCreated"`
	InviteStatus string          `json:"inviteStatus"`
	InviterName  *string         `json:"inviterName"`
	Teams        []string        `json:"teams"`
}

OrganizationMember represents a User's membership to the organization. https://github.com/getsentry/sentry/blob/22.5.0/src/sentry/api/serializers/models/organization_member/response.py#L57-L69

type OrganizationMembersService added in v1.4.0

type OrganizationMembersService service

OrganizationMembersService provides methods for accessing Sentry membership API endpoints.

func (*OrganizationMembersService) Create added in v1.4.0

func (*OrganizationMembersService) Delete added in v1.4.0

func (s *OrganizationMembersService) Delete(ctx context.Context, organizationSlug string, memberID string) (*Response, error)

func (*OrganizationMembersService) Get added in v1.4.0

func (s *OrganizationMembersService) Get(ctx context.Context, organizationSlug string, memberID string) (*OrganizationMember, *Response, error)

func (*OrganizationMembersService) List added in v1.4.0

func (s *OrganizationMembersService) List(ctx context.Context, organizationSlug string, params *ListCursorParams) ([]*OrganizationMember, *Response, error)

List organization members.

func (*OrganizationMembersService) Update added in v1.4.0

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 OrganizationRepositoriesService added in v1.4.2

type OrganizationRepositoriesService service

OrganizationRepositoriesService provides methods for accessing Sentry organization repositories API endpoints. Paths: https://github.com/getsentry/sentry/blob/22.7.0/src/sentry/api/urls.py#L1385-L1394 Endpoints: https://github.com/getsentry/sentry/blob/22.7.0/src/sentry/api/endpoints/organization_repositories.py Endpoints: https://github.com/getsentry/sentry/blob/22.7.0/src/sentry/api/endpoints/organization_repository_details.py

func (*OrganizationRepositoriesService) Create added in v1.4.2

func (*OrganizationRepositoriesService) Delete added in v1.4.2

func (s *OrganizationRepositoriesService) Delete(ctx context.Context, organizationSlug string, repoID string) (*OrganizationRepository, *Response, error)

func (*OrganizationRepositoriesService) List added in v1.4.2

List organization integrations.

type OrganizationRepository added in v1.4.2

type OrganizationRepository struct {
	ID            string                         `json:"id"`
	Name          string                         `json:"name"`
	Url           string                         `json:"url"`
	Provider      OrganizationRepositoryProvider `json:"provider"`
	Status        string                         `json:"status"`
	DateCreated   time.Time                      `json:"dateCreated"`
	IntegrationId string                         `json:"integrationId"`
	ExternalSlug  string                         `json:"externalSlug"`
}

OrganizationRepositories represents https://github.com/getsentry/sentry/blob/22.7.0/src/sentry/api/serializers/models/repository.py

type OrganizationRepositoryProvider added in v1.4.2

type OrganizationRepositoryProvider struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

https://github.com/getsentry/sentry/blob/22.7.0/src/sentry/api/serializers/models/repository.py#L12-L17

type OrganizationStatus added in v1.3.0

type OrganizationStatus struct {
	ID   *string `json:"id"`
	Name *string `json:"name"`
}

OrganizationStatus represents a Sentry organization's status.

type OrganizationsService added in v1.4.0

type OrganizationsService service

OrganizationsService provides methods for accessing Sentry organization API endpoints. https://docs.sentry.io/api/organizations/

func (*OrganizationsService) Create added in v1.4.0

Create a new Sentry organization.

func (*OrganizationsService) Delete added in v1.4.0

func (s *OrganizationsService) Delete(ctx context.Context, slug string) (*Response, error)

Delete a Sentry organization.

func (*OrganizationsService) Get added in v1.4.0

Get a Sentry organization. https://docs.sentry.io/api/organizations/retrieve-an-organization/

func (*OrganizationsService) List added in v1.4.0

List organizations available to the authenticated session. https://docs.sentry.io/api/organizations/list-your-organizations/

func (*OrganizationsService) Update added in v1.4.0

Update a Sentry organization. https://docs.sentry.io/api/organizations/update-an-organization/

type Project

type Project struct {
	ID   string `json:"id"`
	Slug string `json:"slug"`
	Name string `json:"name"`

	IsPublic     bool   `json:"isPublic"`
	IsBookmarked bool   `json:"isBookmarked"`
	Color        string `json:"color"`

	DateCreated time.Time `json:"dateCreated"`
	FirstEvent  time.Time `json:"firstEvent"`

	Features []string `json:"features"`
	Status   string   `json:"status"`
	Platform string   `json:"platform"`

	IsInternal bool `json:"isInternal"`
	IsMember   bool `json:"isMember"`
	HasAccess  bool `json:"hasAccess"`

	Avatar Avatar `json:"avatar"`

	// TODO: latestRelease
	Options map[string]interface{} `json:"options"`

	DigestsMinDelay      int      `json:"digestsMinDelay"`
	DigestsMaxDelay      int      `json:"digestsMaxDelay"`
	SubjectPrefix        string   `json:"subjectPrefix"`
	AllowedDomains       []string `json:"allowedDomains"`
	ResolveAge           int      `json:"resolveAge"`
	DataScrubber         bool     `json:"dataScrubber"`
	DataScrubberDefaults bool     `json:"dataScrubberDefaults"`
	SafeFields           []string `json:"safeFields"`
	SensitiveFields      []string `json:"sensitiveFields"`
	SubjectTemplate      string   `json:"subjectTemplate"`
	SecurityToken        string   `json:"securityToken"`
	SecurityTokenHeader  *string  `json:"securityTokenHeader"`
	VerifySSL            bool     `json:"verifySSL"`
	ScrubIPAddresses     bool     `json:"scrubIPAddresses"`
	ScrapeJavaScript     bool     `json:"scrapeJavaScript"`

	Organization Organization `json:"organization"`
	// TODO: plugins
	// TODO: platforms
	ProcessingIssues int `json:"processingIssues"`

	Team  Team   `json:"team"`
	Teams []Team `json:"teams"`

	GroupingEnhancements string `json:"groupingEnhancements"`
}

Project represents a Sentry project. https://github.com/getsentry/sentry/blob/22.5.0/src/sentry/api/serializers/models/project.py

type ProjectFilter added in v1.3.0

type ProjectFilter struct {
	ID     string          `json:"id"`
	Active json.RawMessage `json:"active"`
}

ProjectFilter represents inbounding filters applied to a project.

type ProjectFilterService added in v1.3.0

type ProjectFilterService service

ProjectOwnershipService provides methods for accessing Sentry project filters API endpoints.

func (*ProjectFilterService) Get added in v1.3.0

func (s *ProjectFilterService) Get(ctx context.Context, organizationSlug string, projectSlug string) ([]*ProjectFilter, *Response, error)

Get the filters.

func (*ProjectFilterService) GetFilterConfig added in v1.3.0

func (s *ProjectFilterService) GetFilterConfig(ctx context.Context, organizationSlug string, projectSlug string) (*FilterConfig, *Response, error)

GetFilterConfig retrieves filter configuration.

func (*ProjectFilterService) UpdateBrowserExtensions added in v1.3.0

func (s *ProjectFilterService) UpdateBrowserExtensions(ctx context.Context, organizationSlug string, projectSlug string, active bool) (*Response, error)

UpdateBrowserExtensions updates configuration for browser extension filter

func (*ProjectFilterService) UpdateLegacyBrowser added in v1.3.0

func (s *ProjectFilterService) UpdateLegacyBrowser(ctx context.Context, organizationSlug string, projectSlug string, browsers []string) (*Response, error)

UpdateLegacyBrowser updates configuration for legacy browser filters

type ProjectKey

type ProjectKey struct {
	ID          string               `json:"id"`
	Name        string               `json:"name"`
	Label       string               `json:"label"`
	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. https://github.com/getsentry/sentry/blob/9.0.0/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"`
	Security string `json:"security"`
	Minidump string `json:"minidump"`
	CDN      string `json:"cdn"`
}

ProjectKeyDSN represents a project key's DSN.

type ProjectKeyRateLimit

type ProjectKeyRateLimit struct {
	Window int `json:"window"`
	Count  int `json:"count"`
}

ProjectKeyRateLimit represents a project key's rate limit.

type ProjectKeysService added in v1.4.0

type ProjectKeysService service

ProjectKeysService provides methods for accessing Sentry project client key API endpoints. https://docs.sentry.io/api/projects/

func (*ProjectKeysService) Create added in v1.4.0

func (s *ProjectKeysService) Create(ctx context.Context, organizationSlug string, projectSlug string, params *CreateProjectKeyParams) (*ProjectKey, *Response, error)

Create a new client key bound to a project. https://docs.sentry.io/api/projects/post-project-keys/

func (*ProjectKeysService) Delete added in v1.4.0

func (s *ProjectKeysService) Delete(ctx context.Context, organizationSlug string, projectSlug string, keyID string) (*Response, error)

Delete a project. https://docs.sentry.io/api/projects/delete-project-details/

func (*ProjectKeysService) List added in v1.4.0

func (s *ProjectKeysService) List(ctx context.Context, organizationSlug string, projectSlug string, params *ListCursorParams) ([]*ProjectKey, *Response, error)

List client keys bound to a project. https://docs.sentry.io/api/projects/get-project-keys/

func (*ProjectKeysService) Update added in v1.4.0

func (s *ProjectKeysService) Update(ctx context.Context, organizationSlug string, projectSlug string, keyID string, params *UpdateProjectKeyParams) (*ProjectKey, *Response, error)

Update a client key. https://docs.sentry.io/api/projects/put-project-key-details/

type ProjectOwnership added in v1.3.0

type ProjectOwnership struct {
	Raw                string    `json:"raw"`
	FallThrough        bool      `json:"fallthrough"`
	DateCreated        time.Time `json:"dateCreated"`
	LastUpdated        time.Time `json:"lastUpdated"`
	IsActive           bool      `json:"isActive"`
	AutoAssignment     bool      `json:"autoAssignment"`
	CodeownersAutoSync *bool     `json:"codeownersAutoSync,omitempty"`
}

https://github.com/getsentry/sentry/blob/master/src/sentry/api/serializers/models/projectownership.py

type ProjectOwnershipsService added in v1.4.0

type ProjectOwnershipsService service

ProjectOwnershipsService provides methods for accessing Sentry project ownership API endpoints.

func (*ProjectOwnershipsService) Get added in v1.4.0

func (s *ProjectOwnershipsService) Get(ctx context.Context, organizationSlug string, projectSlug string) (*ProjectOwnership, *Response, error)

Get details on a project's ownership configuration.

func (*ProjectOwnershipsService) Update added in v1.4.0

func (s *ProjectOwnershipsService) Update(ctx context.Context, organizationSlug string, projectSlug string, params *UpdateProjectOwnershipParams) (*ProjectOwnership, *Response, error)

Update a Project's Ownership configuration

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"`
}

ProjectPluginAsset 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 ProjectPluginsService added in v1.4.0

type ProjectPluginsService service

ProjectPluginsService provides methods for accessing Sentry project plugin API endpoints.

func (*ProjectPluginsService) Disable added in v1.4.0

func (s *ProjectPluginsService) Disable(ctx context.Context, organizationSlug string, projectSlug string, id string) (*Response, error)

Disable a project plugin.

func (*ProjectPluginsService) Enable added in v1.4.0

func (s *ProjectPluginsService) Enable(ctx context.Context, organizationSlug string, projectSlug string, id string) (*Response, error)

Enable a project plugin.

func (*ProjectPluginsService) Get added in v1.4.0

func (s *ProjectPluginsService) Get(ctx context.Context, organizationSlug string, projectSlug string, id string) (*ProjectPlugin, *Response, error)

Get details of a project plugin.

func (*ProjectPluginsService) List added in v1.4.0

func (s *ProjectPluginsService) List(ctx context.Context, organizationSlug string, projectSlug string) ([]*ProjectPlugin, *Response, error)

List plugins bound to a project.

func (*ProjectPluginsService) Update added in v1.4.0

func (s *ProjectPluginsService) Update(ctx context.Context, organizationSlug string, projectSlug string, id string, params UpdateProjectPluginParams) (*ProjectPlugin, *Response, error)

Update settings for a given team. https://docs.sentry.io/api/teams/put-team-details/

type ProjectSummary added in v1.3.0

type ProjectSummary struct {
	ID           string `json:"id"`
	Name         string `json:"name"`
	Slug         string `json:"slug"`
	IsBookmarked bool   `json:"isBookmarked"`
	IsMember     bool   `json:"isMember"`
	HasAccess    bool   `json:"hasAccess"`

	DateCreated time.Time `json:"dateCreated"`
	FirstEvent  time.Time `json:"firstEvent"`

	Platform  *string  `json:"platform"`
	Platforms []string `json:"platforms"`

	Team  *ProjectSummaryTeam  `json:"team"`
	Teams []ProjectSummaryTeam `json:"teams"`
}

ProjectSummary represents the summary of a Sentry project.

type ProjectSummaryTeam added in v1.3.0

type ProjectSummaryTeam struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	Slug string `json:"slug"`
}

ProjectSummaryTeam represents a team in a ProjectSummary.

type ProjectsService added in v1.4.0

type ProjectsService service

ProjectsService provides methods for accessing Sentry project API endpoints. https://docs.sentry.io/api/projects/

func (*ProjectsService) AddTeam added in v1.4.0

func (s *ProjectsService) AddTeam(ctx context.Context, organizationSlug string, slug string, teamSlug string) (*Project, *Response, error)

AddTeam add a team to a project.

func (*ProjectsService) Create added in v1.4.0

func (s *ProjectsService) Create(ctx context.Context, organizationSlug string, teamSlug string, params *CreateProjectParams) (*Project, *Response, error)

Create a new project bound to a team.

func (*ProjectsService) Delete added in v1.4.0

func (s *ProjectsService) Delete(ctx context.Context, organizationSlug string, slug string) (*Response, error)

Delete a project. https://docs.sentry.io/api/projects/delete-a-project/

func (*ProjectsService) Get added in v1.4.0

func (s *ProjectsService) Get(ctx context.Context, organizationSlug string, slug string) (*Project, *Response, error)

Get details on an individual project. https://docs.sentry.io/api/projects/retrieve-a-project/

func (*ProjectsService) List added in v1.4.0

func (s *ProjectsService) List(ctx context.Context) ([]*Project, *Response, error)

List projects available. https://docs.sentry.io/api/projects/list-your-projects/

func (*ProjectsService) RemoveTeam added in v1.4.0

func (s *ProjectsService) RemoveTeam(ctx context.Context, organizationSlug string, slug string, teamSlug string) (*Response, error)

RemoveTeam remove a team from a project.

func (*ProjectsService) Update added in v1.4.0

func (s *ProjectsService) Update(ctx context.Context, organizationSlug string, slug string, params *UpdateProjectParams) (*Project, *Response, error)

Update various attributes and configurable settings for a given project. https://docs.sentry.io/api/projects/update-a-project/

type Rate added in v1.4.0

type Rate struct {
	// The maximum number of requests allowed within the window.
	Limit int

	// The number of requests this caller has left on this endpoint within the current window
	Remaining int

	// The time when the next rate limit window begins and the count resets, measured in UTC seconds from epoch
	Reset time.Time

	// The maximum number of concurrent requests allowed within the window
	ConcurrentLimit int

	// The number of concurrent requests this caller has left on this endpoint within the current window
	ConcurrentRemaining int
}

Rate represents the rate limit for the current client.

type RateLimitError added in v1.4.0

type RateLimitError struct {
	Rate     Rate
	Response *http.Response
	Detail   string
}

func (*RateLimitError) Error added in v1.4.0

func (r *RateLimitError) Error() string

func (*RateLimitError) Is added in v1.4.0

func (r *RateLimitError) Is(target error) bool

type Response added in v1.4.0

type Response struct {
	*http.Response

	// For APIs that support cursor pagination, the following field will be populated
	// to point to the next page if more results are available.
	// Set ListCursorParams.Cursor to this value when calling the endpoint again.
	Cursor string

	Rate Rate
}

Response is a Sentry API response. This wraps the standard http.Response and provides convenient access to things like pagination links and rate limits.

type Team

type Team struct {
	ID          *string    `json:"id,omitempty"`
	Slug        *string    `json:"slug,omitempty"`
	Name        *string    `json:"name,omitempty"`
	DateCreated *time.Time `json:"dateCreated,omitempty"`
	IsMember    *bool      `json:"isMember,omitempty"`
	TeamRole    *string    `json:"teamRole,omitempty"`
	HasAccess   *bool      `json:"hasAccess,omitempty"`
	IsPending   *bool      `json:"isPending,omitempty"`
	MemberCount *int       `json:"memberCount,omitempty"`
	Avatar      *Avatar    `json:"avatar,omitempty"`
}

Team represents a Sentry team that is bound to an organization. https://github.com/getsentry/sentry/blob/22.5.0/src/sentry/api/serializers/models/team.py#L109-L119

type TeamsService added in v1.4.0

type TeamsService service

TeamsService provides methods for accessing Sentry team API endpoints. https://docs.sentry.io/api/teams/

func (*TeamsService) Create added in v1.4.0

func (s *TeamsService) Create(ctx context.Context, organizationSlug string, params *CreateTeamParams) (*Team, *Response, error)

Create a new Sentry team bound to an organization. https://docs.sentry.io/api/teams/create-a-new-team/

func (*TeamsService) Delete added in v1.4.0

func (s *TeamsService) Delete(ctx context.Context, organizationSlug string, slug string) (*Response, error)

Delete a team. https://docs.sentry.io/api/teams/update-a-team/

func (*TeamsService) Get added in v1.4.0

func (s *TeamsService) Get(ctx context.Context, organizationSlug string, slug string) (*Team, *Response, error)

Get details on an individual team of an organization. https://docs.sentry.io/api/teams/retrieve-a-team/

func (*TeamsService) List added in v1.4.0

func (s *TeamsService) List(ctx context.Context, organizationSlug string) ([]*Team, *Response, error)

List returns a list of teams bound to an organization. https://docs.sentry.io/api/teams/list-an-organizations-teams/

func (*TeamsService) Update added in v1.4.0

func (s *TeamsService) Update(ctx context.Context, organizationSlug string, slug string, params *UpdateTeamParams) (*Team, *Response, error)

Update settings for a given team. https://docs.sentry.io/api/teams/update-a-team/

type UpdateOrganizationMemberParams added in v1.4.0

type UpdateOrganizationMemberParams struct {
	Role  string   `json:"role"`
	Teams []string `json:"teams,omitempty"`
}

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"`
	RateLimit *ProjectKeyRateLimit `json:"rateLimit,omitempty"`
}

UpdateProjectKeyParams are the parameters for ProjectKeyService.Update.

type UpdateProjectOwnershipParams added in v1.3.0

type UpdateProjectOwnershipParams struct {
	Raw                string `json:"raw,omitempty"`
	FallThrough        *bool  `json:"fallthrough,omitempty"`
	AutoAssignment     *bool  `json:"autoAssignment,omitempty"`
	CodeownersAutoSync *bool  `json:"codeownersAutoSync,omitempty"`
}

CreateProjectParams are the parameters for ProjectOwnershipService.Update.

type UpdateProjectParams

type UpdateProjectParams struct {
	Name            string                 `json:"name,omitempty"`
	Slug            string                 `json:"slug,omitempty"`
	Platform        string                 `json:"platform,omitempty"`
	IsBookmarked    *bool                  `json:"isBookmarked,omitempty"`
	DigestsMinDelay *int                   `json:"digestsMinDelay,omitempty"`
	DigestsMaxDelay *int                   `json:"digestsMaxDelay,omitempty"`
	ResolveAge      *int                   `json:"resolveAge,omitempty"`
	Options         map[string]interface{} `json:"options,omitempty"`
	AllowedDomains  []string               `json:"allowedDomains,omitempty"`

	GroupingEnhancements string `json:"groupingEnhancements,omitempty"`
}

UpdateProjectParams are the parameters for ProjectService.Update.

type UpdateProjectPluginParams

type UpdateProjectPluginParams map[string]interface{}

UpdateProjectPluginParams 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.

type User added in v1.3.0

type User struct {
	ID              string      `json:"id"`
	Name            string      `json:"name"`
	Username        string      `json:"username"`
	Email           string      `json:"email"`
	AvatarURL       string      `json:"avatarUrl"`
	IsActive        bool        `json:"isActive"`
	HasPasswordAuth bool        `json:"hasPasswordAuth"`
	IsManaged       bool        `json:"isManaged"`
	DateJoined      time.Time   `json:"dateJoined"`
	LastLogin       time.Time   `json:"lastLogin"`
	Has2FA          bool        `json:"has2fa"`
	LastActive      time.Time   `json:"lastActive"`
	IsSuperuser     bool        `json:"isSuperuser"`
	IsStaff         bool        `json:"isStaff"`
	Avatar          Avatar      `json:"avatar"`
	Emails          []UserEmail `json:"emails"`
}

User represents a Sentry User. https://github.com/getsentry/sentry/blob/275e6efa0f364ce05d9bfd09386b895b8a5e0671/src/sentry/api/serializers/models/user.py#L35

type UserEmail added in v1.3.0

type UserEmail struct {
	ID         string `json:"id"`
	Email      string `json:"email"`
	IsVerified bool   `json:"is_verified"`
}

UserEmail represents a user's email and its verified status.

Jump to

Keyboard shortcuts

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