Documentation ¶
Index ¶
- Constants
- func DecodeRecord(record map[string]interface{}, target interface{}) error
- func DecodeRequest(request map[string]interface{}, target interface{}) error
- func LooksLikeShortID(value string) bool
- func PickleNoneDecodeHook(f reflect.Type, t reflect.Type, data interface{}) (interface{}, error)
- func StringMapDecodeHook(f reflect.Type, t reflect.Type, data interface{}) (interface{}, error)
- func TagsDecodeHook(f reflect.Type, t reflect.Type, data interface{}) (interface{}, error)
- func TimeDecodeHook(f reflect.Type, t reflect.Type, data interface{}) (interface{}, error)
- type Environment
- type Event
- type EventDetails
- type EventError
- type EventErrorType
- type EventMapping
- type Group
- type Identifier
- type NodeBlob
- type NodeRef
- type Organization
- type OrganizationMember
- type OrganizationMemberTeam
- type Project
- type RecordDecoder
- type RequestDecoder
- type SavedSearch
- type TagKey
- type TagKeyValue
- type Team
- type User
Constants ¶
const ( GroupStatusUnresolved = 0 GroupStatusResolved = 1 GroupStatusIgnored = 2 GroupStatusPendingDeletion = 3 GroupStatusDeletionInProgress = 4 GroupStatusPendingMerge = 5 // GroupStatusMuted status will be removed in Sentry 9.0 GroupStatusMuted = GroupStatusIgnored )
const ( OrganizationStatusVisible = 0 OrganizationStatusPendingDeletion = 1 OrganiztionStatusDeletionInProgress = 2 )
const ( ProjectStatusVisible = 0 ProjectStatusHidden = 1 ProjectStatusPendingDeletion = 2 ProjectStatusDeletionInProgress = 3 )
const ( TagKeyStatusVisible = 0 TagKeyStatusPendingDeletion = 1 TagKeyStatusDeletionInProgress = 2 )
const ( TeamStatusVisible = 0 TeamStatusPendingDeletion = 1 TeamStatusDeletionInProgress = 2 )
Variables ¶
This section is empty.
Functions ¶
func DecodeRecord ¶
func DecodeRequest ¶
func LooksLikeShortID ¶
func PickleNoneDecodeHook ¶
TODO Hook works but looks like we have to traverse maps and slices
func StringMapDecodeHook ¶
func TagsDecodeHook ¶
Types ¶
type Environment ¶
type Environment struct { ID int `db:"id" json:"id,string"` ProjectID int `db:"project_id" json:"-"` Name string `db:"name" json:"name"` DateCreated time.Time `db:"date_added" json:"-"` }
Environment ...
type Event ¶
type Event struct { ID int `db:"id" json:"id,string"` GroupID *int `db:"group_id" json:"groupID,string"` EventID *string `db:"message_id" json:"eventID"` ProjectID *int `db:"project_id" json:"-"` Message string `db:"message" json:"-"` Platform *string `db:"platform" json:"platform"` TimeSpent *int `db:"time_spent" json:"-"` // NOTE data has NodeField type DetailsRefRaw *string `db:"data" json:"-"` DetailsRef *NodeRef `db:"-" json:"-"` // TODO check that `dateCreated` is the name for JSON DateCreated time.Time `db:"datetime" json:"dateCreated"` }
Event represents an individual event.
type EventDetails ¶
type EventDetails struct { Ref int `kv:"_ref" in:"-" json:"-"` RefVersion int `kv:"_ref_version" in:"-" json:"-"` Server string `kv:"server_name" in:"server_name" json:"-"` Logger string `kv:"logger" in:"logger" json:"-"` Level string `kv:"level" in:"level" json:"-"` Culprit string `kv:"culprit" in:"culprit" json:"-"` Platform string `kv:"platform" in:"platform" json:"-"` Release *string `kv:"release" in:"release" json:"release"` Tags []TagKeyValue `kv:"tags" in:"tags" json:"tags"` Environment string `kv:"environment" in:"environment" json:"-"` Fingerprint []string `kv:"fingerprint" in:"fingerprint" json:"-"` Modules map[string]string `kv:"modules" in:"modules" json:"packages"` Extra map[string]interface{} `kv:"extra" in:"extra" json:"context"` // TODO those fields was not mentioned at https://docs.sentry.io/clientdev/attributes/ Version string `kv:"version" in:"-" json:"-"` Type string `kv:"type" json:"type"` Size int `kv:"-" json:"size"` Errors []EventError `kv:"errors" in:"-" json:"errors"` ReceivedTime time.Time `kv:"received" in:"-" json:"dateReceived"` Metadata map[string]string `kv:"metadata" in:"-" json:"metadata"` UserReport *string `kv:"-" json:"userReport"` }
func (*EventDetails) DecodeRecord ¶
func (event *EventDetails) DecodeRecord(record map[string]interface{}) error
type EventError ¶
type EventError struct { Type EventErrorType Name string Value interface{} }
type EventErrorType ¶
type EventErrorType string
const ( EventErrorInvalidData EventErrorType = "invalid_data" EventErrorInvalidAttribute EventErrorType = "invalid_attribute" EventErrorValueTooLong EventErrorType = "value_too_long" EventErrorUnknownError EventErrorType = "unknown_error" EventErrorSecurityViolation EventErrorType = "security_violation" EventErrorRestrictedIP EventErrorType = "restricted_ip" EventErrorJSGenericFetchError EventErrorType = "js_generic_fetch_error" EventErrorJSInvalidHTTPCode EventErrorType = "js_invalid_http_code" EventErrorJSInvalidContent EventErrorType = "js_invalid_content" EventErrorJSNoColumn EventErrorType = "js_no_column" EventErrorJSMissingSource EventErrorType = "js_no_source" EventErrorJSInvalidSourceMap EventErrorType = "js_invalid_source" EventErrorJSTooManyRemoteSources EventErrorType = "js_too_many_sources" EventErrorJSInvalidSourceEncoding EventErrorType = "js_invalid_source_encoding" EventErrorJSInvalidSourceMapLocation EventErrorType = "js_invalid_sourcemap_location" EventErrorJSTooLarge EventErrorType = "js_too_large" EventErrorJSFetchTimeout EventErrorType = "js_fetch_timeout" EventErrorNativeNoCrashedThread EventErrorType = "native_no_crashed_thread" EventErrorNativeInternalFailure EventErrorType = "native_internal_failure" EventErrorNativeNoSymsynd EventErrorType = "native_no_symsynd" )
type EventMapping ¶
type EventMapping struct { ID int `db:"id" json:"id,string"` ProjectID int `db:"project_id" json:"-"` GroupID int `db:"group_id" json:"-"` EventID string `db:"event_id" json:"-"` DateCreated time.Time `db:"date_added" json:"-"` }
EventMapping ...
type Group ¶
type Group struct { ID int `db:"id" json:"id,string"` Logger string `db:"logger" json:"-"` Level int `db:"level" json:"-"` Message string `db:"message" json:"title"` Culprit *string `db:"view" json:"culprit"` Status int `db:"status" json:"-"` TimesSeen int `db:"times_seen" json:"-"` LastSeen time.Time `db:"last_seen" json:"lastSeen"` FirstSeen time.Time `db:"first_seen" json:"firstSeen"` // Data is a GzippedDictField Data *string `db:"data" json:"-"` Score int `db:"score" json:"-"` ProjectID *int `db:"project_id" json:"-"` TimeSpentTotal int `db:"time_spent_total" json:"-"` TimeSpentCount int `db:"time_spent_count" json:"-"` ResolvedAt *time.Time `db:"resolved_at" json:"-"` ActiveAt *time.Time `db:"active_at" json:"-"` IsPublic *bool `db:"is_public" json:"isPublic"` Platform *string `db:"platform" json:"-"` NumComments *int `db:"num_comments" json:"numComments"` FirstReleaseID *int `db:"first_release_id" json:"-"` ShortID *int `db:"short_id" json:"-"` }
Group is an aggregated message which summarizes a set of Events.
type Identifier ¶
type Organization ¶
type Organization struct { ID int `db:"id" json:"id,string"` Name string `db:"name" json:"name"` Slug string `db:"slug" json:"slug"` Status int `db:"status" json:"-"` Flags int `db:"flags" json:"-"` DefaultRole string `db:"default_role" json:"-"` DateCreated time.Time `db:"date_added" json:"dateCreated"` }
Organization represents a group of individuals which maintain ownership of projects.
type OrganizationMember ¶
type OrganizationMember struct { ID int `db:"id" json:"id,string"` OrganizationID int `db:"organization_id" json:"organizationId"` UserID int `db:"user_id" json:"userId"` Type int `db:"type" json:"type"` DateCreated time.Time `db:"date_added" json:"dateCreated"` Email *string `db:"email" json:"email"` HasGlobalAccess bool `db:"has_global_access" json:"hasGlobalAccess"` Flags int64 `db:"flags" json:"flags"` Counter int `db:"counter" json:"counter"` Role string `db:"role" json:"role"` Token *string `db:"token" json:"token"` }
OrganizationMember identifies relationships between teams and users. Users listed as team members are considered to have access to all projects and could be thought of as team owners (though their access level may not) be set to ownership.
type OrganizationMemberTeam ¶
type Project ¶
type Project struct { ID int `db:"id" json:"id,string"` TeamID int `db:"team_id" json:"-"` OrganizationID int `db:"organization_id" json:"-"` Name string `db:"name" json:"name"` Slug string `db:"slug" json:"slug"` Public bool `db:"public" json:"isPublic"` Status int `db:"status" json:"-"` FirstEvent time.Time `db:"first_event" json:"firstEvent"` DateCreated time.Time `db:"date_added" json:"dateCreated"` }
Project is a permission based namespace which generally is the top level entry point for all data.
type RecordDecoder ¶
type RequestDecoder ¶
type SavedSearch ¶
type SavedSearch struct { ID int `db:"id" json:"id,string"` ProjectID int `db:"project_id" json:"-"` Name string `db:"name" json:"name"` Query string `db:"query" json:"query"` DateCreated time.Time `db:"date_added" json:"dateCreated"` IsDefault bool `db:"is_default" json:"isDefault"` }
SavedSearch is a model for saved search query.
type TagKey ¶
type TagKey struct { ID int `db:"id" json:"id,string"` ProjectID int `db:"project_id" json:"-"` Key string `db:"key" json:"key"` UniqueValues int `db:"values_seen" json:"uniqueValues"` Name *string `db:"label" json:"name"` Status int `db:"status" json:"-"` }
TagKey stores references to available filters keys.
type TagKeyValue ¶
type Team ¶
type Team struct { ID int `db:"id" json:"id,string"` Slug string `db:"slug" json:"slug"` Name string `db:"name" json:"name"` OrganizationID int `db:"organization_id" json:"-"` Status int `db:"status" json:"-"` DateCreated time.Time `db:"date_added" json:"dateCreated"` }
Team represents a group of individuals which maintain ownership of projects.
type User ¶
type User struct { ID int `db:"id" json:"id,string"` Username string `db:"username" json:"username"` // This column is called first_name for legacy reasons, but it is the entire // display name Name string `db:"first_name" json:"name"` Email string `db:"email" json:"email"` IsStaff bool `db:"is_staff" json:"-"` IsActive bool `db:"is_active" json:"-"` IsSuperuser bool `db:"is_superuser" json:"-"` IsManaged bool `db:"is_managed" json:"-"` IsPasswordExpired bool `db:"is_password_expired" json:"-"` LastPasswordChange time.Time `db:"last_password_change" json:"-"` Password string `db:"password" json:"-"` LastLogin time.Time `db:"last_login" json:"-"` DateCreated time.Time `db:"date_joined" json:"-"` }