sentry

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: MIT Imports: 15 Imported by: 0

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

func Bool(v bool) *bool

Bool returns a pointer to the bool value passed in.

func BoolValue

func BoolValue(v *bool) bool

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

func CheckResponse

func CheckResponse(r *http.Response) error

func Float64

func Float64(v float64) *float64

Float64 returns a pointer to the float64 value passed in.

func Float64Value

func Float64Value(v *float64) float64

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

func Int

func Int(v int) *int

Int returns a pointer to the int value passed in.

func IntValue

func IntValue(v *int) int

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

func InterfaceNumber added in v1.0.2

func InterfaceNumber(v json.Number) *interface{}

func InterfaceString added in v1.0.2

func InterfaceString(v string) *interface{}

func String

func String(v string) *string

String returns a pointer to the string value passed in.

func StringValue

func StringValue(v *string) string

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

func Time

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

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

func TimeValue

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

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

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

func (*APIError) UnmarshalJSON

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

type Avatar

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

Avatar represents an avatar.

type BrowserExtensionParams

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
	ReleaseDeployments       *ReleaseDeploymentsService
	Teams                    *TeamsService
	Pagerduty                *PagerdutyService
	// 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

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

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

func (*Client) Do

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

func (*Client) NewRequest

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

NewRequest creates an API request.

type CreateOrganizationCodeMappingParams

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

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

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

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

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

type DashboardWidgetErrors map[string][]string

type DashboardWidgetLayout

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

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

type DashboardWidgetsService service

DashboardWidgetsService provides methods for accessing Sentry dashboard widget API endpoints.

func (*DashboardWidgetsService) Validate

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

Validate a dashboard widget configuration.

type DashboardsService

type DashboardsService service

DashboardsService provides methods for accessing Sentry dashboard API endpoints.

func (*DashboardsService) Create

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

Create a dashboard.

func (*DashboardsService) Delete

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

Delete a dashboard.

func (*DashboardsService) Get

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

Get details on a dashboard.

func (*DashboardsService) List

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

List dashboards in an organization.

func (*DashboardsService) Update

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

Update a dashboard.

type ErrorResponse

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

func (*ErrorResponse) Error

func (r *ErrorResponse) Error() string

func (*ErrorResponse) Is

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

type FilterConfig

type FilterConfig struct {
	BrowserExtension bool
	LegacyBrowsers   []string
}

FilterConfig represents configuration for project filter

type IntegrationConfigData

type IntegrationConfigData map[string]interface{}

IntegrationConfigData for defining integration-specific configuration data.

type IssueAlert

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

type IssueAlertAction map[string]interface{}

IssueAlertAction for defining actions.

type IssueAlertCondition added in v1.0.2

type IssueAlertCondition map[string]interface{}

IssueAlertCondition for defining conditions.

type IssueAlertCreatedBy

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

type IssueAlertFilter map[string]interface{}

IssueAlertFilter for defining actions.

type IssueAlertTaskDetail

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

type IssueAlertsService service

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

func (*IssueAlertsService) Create

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

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

Delete an issue alert.

func (*IssueAlertsService) Get

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

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

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

Update an issue alert.

type LegacyBrowserParams

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

LegacyBrowserParams defines parameters for legacy browser request

type ListCursorParams

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

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

type ListOrganizationIntegrationsParams

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

type ListOrganizationRepositoriesParams

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

type MetricAlert struct {
	ID               *string               `json:"id,omitempty"`
	Name             *string               `json:"name,omitempty"`
	Environment      *string               `json:"environment,omitempty"`
	DataSet          *string               `json:"dataset,omitempty"`
	EventTypes       []string              `json:"eventTypes,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"`
	TaskUUID         *string               `json:"uuid,omitempty"` // This is actually the UUID of the async task that can be spawned to create the metric
}

type MetricAlertTaskDetail

type MetricAlertTaskDetail struct {
	Status    *string      `json:"status,omitempty"`
	AlertRule *MetricAlert `json:"alertRule,omitempty"`
	Error     *string      `json:"error,omitempty"`
}

MetricAlertTaskDetail represents the inline struct Sentry defines for task details https://github.com/getsentry/sentry/blob/22.12.0/src/sentry/incidents/endpoints/project_alert_rule_task_details.py#L31

type MetricAlertTrigger

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

type MetricAlertTriggerAction struct {
	ID                 *string      `json:"id,omitempty"`
	AlertRuleTriggerID *string      `json:"alertRuleTriggerId,omitempty"`
	Type               *string      `json:"type,omitempty"`
	TargetType         *string      `json:"targetType,omitempty"`
	TargetIdentifier   *interface{} `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

type MetricAlertsService service

func (*MetricAlertsService) Create

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

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

Delete an Alert Rule.

func (*MetricAlertsService) Get

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

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

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

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

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

func (*OrganizationCodeMappingsService) Delete

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

func (*OrganizationCodeMappingsService) List

List organization integrations.

func (*OrganizationCodeMappingsService) Update

type OrganizationIntegration

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
	ConfigData                    *IntegrationConfigData `json:"configData"`
	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

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

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-L1245 Endpoints: https://github.com/getsentry/sentry/blob/22.7.0/src/sentry/api/endpoints/integrations/organization_integrations/index.py Endpoints: https://github.com/getsentry/sentry/blob/22.7.0/src/sentry/api/endpoints/integrations/organization_integrations/details.py

func (*OrganizationIntegrationsService) Get

func (s *OrganizationIntegrationsService) Get(ctx context.Context, organizationSlug string, integrationID string) (*OrganizationIntegration, *Response, error)

Get organization integration details.

func (*OrganizationIntegrationsService) List

List organization integrations.

func (*OrganizationIntegrationsService) UpdateConfig

func (s *OrganizationIntegrationsService) UpdateConfig(ctx context.Context, organizationSlug string, integrationID string, params *UpdateConfigOrganizationIntegrationsParams) (*Response, error)

UpdateConfig - update configData for organization integration. https://github.com/getsentry/sentry/blob/22.7.0/src/sentry/api/endpoints/integrations/organization_integrations/details.py#L94-L102

type OrganizationMember

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

type OrganizationMembersService service

OrganizationMembersService provides methods for accessing Sentry membership API endpoints.

func (*OrganizationMembersService) Create

func (*OrganizationMembersService) Delete

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

func (*OrganizationMembersService) Get

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

func (*OrganizationMembersService) List

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

List organization members.

func (*OrganizationMembersService) Update

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

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

func (*OrganizationRepositoriesService) Delete

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

func (*OrganizationRepositoriesService) List

List organization integrations.

type OrganizationRepository

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 OrganizationStatus

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

OrganizationStatus represents a Sentry organization's status.

type OrganizationsService

type OrganizationsService service

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

func (*OrganizationsService) Create

Create a new Sentry organization.

func (*OrganizationsService) Delete

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

Delete a Sentry organization.

func (*OrganizationsService) Get

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

func (*OrganizationsService) List

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

func (*OrganizationsService) Update

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

type PagerdutyIntegration

type PagerdutyIntegration struct {
	Id         string `json:"id"`
	Name       string `json:"name"`
	ConfigData struct {
		ServiceTable []struct {
			Service        string `json:"service"`
			IntegrationKey string `json:"integration_key"`
			Id             int    `json:"id"`
		} `json:"service_table"`
	} `json:"configData"`
	ExternalId                    string `json:"externalId"`
	OrganizationId                int    `json:"organizationId"`
	OrganizationIntegrationStatus string `json:"organizationIntegrationStatus"`
}

type PagerdutyService

type PagerdutyService service

func (*PagerdutyService) Get

func (s *PagerdutyService) Get(ctx context.Context, organization string, integrationId int) (*PagerdutyIntegration, *Response, error)

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"`
	FingerprintingRules  string   `json:"fingerprintingRules"`
	GroupingEnhancements string   `json:"groupingEnhancements"`
	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"`
}

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

type ProjectFilter

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

type ProjectFilterService service

ProjectOwnershipService provides methods for accessing Sentry project filters API endpoints.

func (*ProjectFilterService) Get added in v1.0.2

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

Get the filters.

func (*ProjectFilterService) GetFilterConfig added in v1.0.2

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

GetFilterConfig retrieves filter configuration.

func (*ProjectFilterService) UpdateBrowserExtensions added in v1.0.2

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

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

type ProjectKeysService service

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

func (*ProjectKeysService) Create

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

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

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

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

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

type ProjectOwnershipsService service

ProjectOwnershipsService provides methods for accessing Sentry project ownership API endpoints.

func (*ProjectOwnershipsService) Get

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

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

type ProjectPluginsService service

ProjectPluginsService provides methods for accessing Sentry project plugin API endpoints.

func (*ProjectPluginsService) Disable

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

Disable a project plugin.

func (*ProjectPluginsService) Enable

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

Enable a project plugin.

func (*ProjectPluginsService) Get

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

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

List plugins bound to a project.

func (*ProjectPluginsService) Update

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

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

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

ProjectSummaryTeam represents a team in a ProjectSummary.

type ProjectsService

type ProjectsService service

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

func (*ProjectsService) AddTeam

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

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

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

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

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

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

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

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.

func ParseRate

func ParseRate(r *http.Response) Rate

ParseRate parses the rate limit headers.

type RateLimitError

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

func (*RateLimitError) Error

func (r *RateLimitError) Error() string

func (*RateLimitError) Is

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

type ReleaseDeployment

type ReleaseDeployment struct {
	ID           string     `json:"id"`
	Name         *string    `json:"name,omitempty"`
	Environment  string     `json:"environment,omitempty"`
	URL          *string    `json:"url,omitempty"`
	Projects     []string   `json:"projects,omitempty"`
	DateStarted  *time.Time `json:"dateStarted,omitempty"`
	DateFinished *time.Time `json:"dateFinished,omitempty"`
}

type ReleaseDeploymentsService

type ReleaseDeploymentsService service

func (*ReleaseDeploymentsService) Create

func (s *ReleaseDeploymentsService) Create(ctx context.Context, organizationSlug string, version string, params *ReleaseDeployment) (*ReleaseDeployment, *Response, error)

Create a new Release Deploy to a project.

func (*ReleaseDeploymentsService) Get

func (s *ReleaseDeploymentsService) Get(ctx context.Context, organizationSlug string, version string, deployID string) (*ReleaseDeployment, *Response, error)

Get a Release Deploy for a project.

type Response

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

type TeamsService service

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

func (*TeamsService) Create

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

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

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

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

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 UpdateConfigOrganizationIntegrationsParams

type UpdateConfigOrganizationIntegrationsParams = IntegrationConfigData

type UpdateOrganizationMemberParams

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

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"`
	FingerprintingRules  string                 `json:"fingerprintingRules,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

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

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