Documentation
¶
Index ¶
- Constants
- Variables
- func Init(driver lit.Driver)
- type AcceptInvitationRequest
- type AiTrace
- type AiTraceDetailStats
- type AiTraceStats
- type AuthorizationCode
- type AuthorizeApproveRequest
- type AuthorizeDenyRequest
- type AuthorizeRedirectResponse
- type CountResult
- type CreatePATRequest
- type CreatePATResponse
- type Dashboard
- type DashboardAssignment
- type DashboardBundleExport
- type DashboardDefinition
- type DashboardExport
- type DashboardMetric
- type DashboardResponse
- type DashboardTemplate
- type DashboardTrendPoint
- type DashboardWidget
- type DeviceApproveRequest
- type DeviceAuthorization
- type DeviceAuthorizeRequest
- type DeviceAuthorizeResponse
- type DeviceLookupResponse
- type DiscoveredMetric
- type Endpoint
- type EndpointDetailStats
- type EndpointStackedChartResponse
- type EndpointStats
- type EndpointTimeSeriesPoint
- type EscalationPolicy
- type ExceptionGroup
- type ExceptionStackTrace
- type ExceptionTrendPoint
- type ForgotPasswordRequest
- type Invitation
- type InvitationInfoResponse
- type InvitationWithInviter
- type InviteUserRequest
- type JSONText
- type LogRecord
- type LoginRequest
- type LoginResponse
- type MemberProjectRole
- type MetricPoint
- type MetricRegistry
- type NotificationChannel
- type NotificationHistoryEntry
- type NotificationMessage
- type NotificationRule
- type NotificationRuleWithChannel
- type NotificationSeverity
- type OauthClient
- type OauthClientLookupResponse
- type OncallLayer
- type OncallOverride
- type OncallRestriction
- type OncallSchedule
- type OncallScheduleDefinition
- type Organization
- type OrganizationMember
- type OrganizationSettingsResponse
- type OrganizationUser
- type OutboxDelivery
- type OutboxHealthCounts
- type OutboxRuleEnqueue
- type Page
- type PageNotification
- type PasswordResetTokenInfo
- type PersonalAccessToken
- type Profile
- type ProfileGroup
- type ProfileSample
- type ProfileSeriesGroup
- type ProfileStack
- type ProfileStackValue
- type ProfileTypeInfo
- type Project
- type ProjectDashboard
- type ProjectTeam
- type ProjectWithBackendUrl
- type RefreshToken
- type RegisterClientRequest
- type RegisterClientResponse
- type RegisterRequest
- type RegisterResponse
- type ResetPasswordRequest
- type ServerMetricTrend
- type Session
- type SessionRecording
- type SourceMap
- type SourceMapFlattenMigration
- type SourceMapProjectId
- type Span
- type StarredDashboardWidget
- type StarredWidget
- type StarredWidgetWithHome
- type StringSlice
- type Task
- type TaskDetailStats
- type TaskStats
- type Team
- type TeamMember
- type TeamMemberWithUser
- type TeamProjectRow
- type TeamWithCounts
- type TimeSeriesPoint
- type TokenRequest
- type TokenSetResponse
- type UpdateMemberRoleRequest
- type UpdateProjectRoleRequest
- type User
- type UserContactMethod
- type UserNotificationRule
- type UserOrganizationResponse
- type UserResponse
- type WidgetGroup
- type WidgetGroupWidget
- type WidgetGroupWidgetWithStar
- type WidgetGroupWithWidgets
Constants ¶
const ( PageStatusOpen = "open" PageStatusAcknowledged = "acknowledged" PageStatusResolved = "resolved" )
const ( UrgencyHigh = "high" UrgencyLow = "low" )
const ( PageNotificationPending = "pending" PageNotificationSent = "sent" PageNotificationFailed = "failed" PageNotificationCancelled = "cancelled" )
const ( MetricNameMemoryUsage = "mem.used" MetricNameMemoryTotal = "mem.total" MetricNameCpuUsage = "cpu.used_pcnt" MetricNameGoRoutines = "go.go_routines" MetricNameHeapObjects = "go.heap_objects" MetricNameNumGC = "go.num_gc" MetricNameGCPauseTotal = "go.gc_pause" )
const ( OutboxKindRule = "rule" OutboxKindPage = "page" OutboxKindVerification = "verification" OutboxPending = "pending" OutboxSending = "sending" OutboxSent = "sent" OutboxFailed = "failed" OutboxCancelled = "cancelled" )
Variables ¶
var ExtensionModelRegistrations []func(lit.Driver)
Functions ¶
Types ¶
type AcceptInvitationRequest ¶
type AiTrace ¶
type AiTrace struct {
Id uuid.UUID `json:"id" ch:"id"`
ProjectId uuid.UUID `json:"projectId" ch:"project_id"`
RecordedAt time.Time `json:"recordedAt" ch:"recorded_at"`
Duration time.Duration `json:"duration" ch:"duration"`
StatusCode uint8 `json:"statusCode" ch:"status_code"`
Model string `json:"model" ch:"model"`
ResponseModel string `json:"responseModel" ch:"response_model"`
Provider string `json:"provider" ch:"provider"`
Operation string `json:"operation" ch:"operation"`
InputTokens int64 `json:"inputTokens" ch:"input_tokens"`
OutputTokens int64 `json:"outputTokens" ch:"output_tokens"`
TotalTokens int64 `json:"totalTokens" ch:"total_tokens"`
CachedTokens int64 `json:"cachedTokens" ch:"cached_tokens"`
ReasoningTokens int64 `json:"reasoningTokens" ch:"reasoning_tokens"`
InputCost float64 `json:"inputCost" ch:"input_cost"`
OutputCost float64 `json:"outputCost" ch:"output_cost"`
TotalCost float64 `json:"totalCost" ch:"total_cost"`
TraceName string `json:"traceName" ch:"trace_name"`
UserId string `json:"userId" ch:"user_id"`
FinishReason string `json:"finishReason" ch:"finish_reason"`
ServerName string `json:"serverName" ch:"server_name"`
AppVersion string `json:"appVersion" ch:"app_version"`
StorageKey string `json:"storageKey" ch:"storage_key"`
Attributes map[string]string `json:"attributes" ch:"attributes"`
DistributedTraceId *uuid.UUID `json:"distributedTraceId,omitempty" ch:"distributed_trace_id"`
IsRoot bool `json:"isRoot" ch:"is_root"`
}
type AiTraceDetailStats ¶
type AiTraceDetailStats struct {
Count int64 `json:"count"`
AvgDuration float64 `json:"avgDuration"`
MedianDuration float64 `json:"medianDuration"`
P95Duration float64 `json:"p95Duration"`
TotalTokens int64 `json:"totalTokens"`
TotalCost float64 `json:"totalCost"`
AvgInputTokens float64 `json:"avgInputTokens"`
AvgOutputTokens float64 `json:"avgOutputTokens"`
Throughput float64 `json:"throughput"`
}
type AiTraceStats ¶
type AiTraceStats struct {
TraceName string `json:"traceName"`
Count uint64 `json:"count"`
P50Duration time.Duration `json:"p50Duration"`
P95Duration time.Duration `json:"p95Duration"`
AvgDuration time.Duration `json:"avgDuration"`
TotalTokens int64 `json:"totalTokens"`
TotalCost float64 `json:"totalCost"`
AvgInputTokens float64 `json:"avgInputTokens"`
AvgOutputTokens float64 `json:"avgOutputTokens"`
LastSeen time.Time `json:"lastSeen"`
HasRoot bool `json:"hasRoot"`
HasNonRoot bool `json:"hasNonRoot"`
}
type AuthorizationCode ¶ added in v1.8.15
type AuthorizeApproveRequest ¶ added in v1.8.15
type AuthorizeDenyRequest ¶ added in v1.8.15
type AuthorizeRedirectResponse ¶ added in v1.8.15
type AuthorizeRedirectResponse struct {
RedirectTo string `json:"redirectTo"`
}
type CountResult ¶
type CountResult struct {
Count int `lit:"count"`
}
type CreatePATRequest ¶ added in v1.8.14
type CreatePATResponse ¶ added in v1.8.14
type Dashboard ¶ added in v1.9.4
type Dashboard struct {
Id int `json:"id" lit:"id"`
OrganizationId int `json:"organizationId" lit:"organization_id"`
Name string `json:"name" lit:"name"`
Description string `json:"description" lit:"description"`
Definition JSONText `json:"definition" lit:"definition"`
TemplateKey *string `json:"templateKey" lit:"template_key"`
CreatedBy *int `json:"createdBy" lit:"created_by"`
CreatedAt time.Time `json:"createdAt" lit:"created_at"`
UpdatedAt time.Time `json:"updatedAt" lit:"updated_at"`
}
type DashboardAssignment ¶ added in v1.9.4
type DashboardBundleExport ¶ added in v1.9.4
type DashboardBundleExport struct {
SchemaVersion int `json:"schemaVersion"`
Dashboards []DashboardExport `json:"dashboards"`
}
type DashboardDefinition ¶ added in v1.9.4
type DashboardDefinition struct {
SchemaVersion int `json:"schemaVersion"`
Widgets []DashboardWidget `json:"widgets"`
}
type DashboardExport ¶ added in v1.9.4
type DashboardExport struct {
SchemaVersion int `json:"schemaVersion"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
Widgets []DashboardWidget `json:"widgets"`
}
type DashboardMetric ¶
type DashboardMetric struct {
ID string `json:"id"`
Name string `json:"name"`
Value float64 `json:"value"`
Unit string `json:"unit"`
Trend []DashboardTrendPoint `json:"trend"`
Servers []ServerMetricTrend `json:"servers,omitempty"`
Change24h float64 `json:"change24h"`
Status string `json:"status"`
}
type DashboardResponse ¶
type DashboardResponse struct {
Metrics []DashboardMetric `json:"metrics"`
AvailableServers []string `json:"availableServers"`
LastUpdated time.Time `json:"lastUpdated"`
}
type DashboardTemplate ¶ added in v1.9.4
type DashboardTemplate struct {
Id int `json:"id" lit:"id"`
Key string `json:"key" lit:"key"`
Name string `json:"name" lit:"name"`
Description string `json:"description" lit:"description"`
Category string `json:"category" lit:"category"`
Definition JSONText `json:"definition" lit:"definition"`
CreatedAt time.Time `json:"createdAt" lit:"created_at"`
UpdatedAt time.Time `json:"updatedAt" lit:"updated_at"`
}
type DashboardTrendPoint ¶
type DashboardWidget ¶ added in v1.9.4
type DashboardWidget struct {
Id string `json:"id"`
Title string `json:"title"`
WidgetType string `json:"widgetType"`
Config json.RawMessage `json:"config"`
}
type DeviceApproveRequest ¶ added in v1.8.14
type DeviceApproveRequest struct {
UserCode string `json:"user_code"`
}
type DeviceAuthorization ¶ added in v1.8.14
type DeviceAuthorizeRequest ¶ added in v1.8.14
type DeviceAuthorizeRequest struct {
ClientId string `json:"client_id" form:"client_id"`
}
type DeviceAuthorizeResponse ¶ added in v1.8.14
type DeviceLookupResponse ¶ added in v1.8.14
type DiscoveredMetric ¶
type Endpoint ¶
type Endpoint struct {
Id uuid.UUID `json:"id" ch:"id"`
ProjectId uuid.UUID `json:"projectId" ch:"project_id"`
// endpoint is the route from the router/does not contain actual params so it's safe to group on it
Endpoint string `json:"endpoint" ch:"endpoint"`
Duration time.Duration `json:"duration" ch:"duration"`
RecordedAt time.Time `json:"recordedAt" ch:"recorded_at"`
StatusCode int16 `json:"statusCode" ch:"status_code"`
BodySize int32 `json:"bodySize" ch:"body_size"`
ClientIP string `json:"clientIP" ch:"client_ip"`
Attributes map[string]string `json:"attributes" ch:"attributes"`
AppVersion string `json:"appVersion" ch:"app_version"`
ServerName string `json:"serverName" ch:"server_name"`
DistributedTraceId *uuid.UUID `json:"distributedTraceId,omitempty" ch:"distributed_trace_id"`
SpanId *uuid.UUID `json:"spanId,omitempty" ch:"span_id"`
IsStream bool `json:"isStream" ch:"is_stream"`
IsRoot bool `json:"isRoot" ch:"is_root"`
}
type EndpointDetailStats ¶
type EndpointDetailStats struct {
Count int64 `json:"count"`
AvgDuration float64 `json:"avgDuration"` // in ms
MedianDuration float64 `json:"medianDuration"` // in ms
P95Duration float64 `json:"p95Duration"` // in ms
P99Duration float64 `json:"p99Duration"` // in ms
Apdex float64 `json:"apdex"` // 0-1 score
ErrorRate float64 `json:"errorRate"` // percentage
Throughput float64 `json:"throughput"` // requests per minute
IsStream bool `json:"isStream"` // true => latency/Apdex are not meaningful for this endpoint
}
EndpointDetailStats contains detailed statistics for a specific endpoint
type EndpointStackedChartResponse ¶
type EndpointStackedChartResponse struct {
Endpoints []string `json:"endpoints"` // Top 5 + "Other"
Series []EndpointTimeSeriesPoint `json:"series"`
}
EndpointStackedChartResponse contains the data for rendering a stacked area chart
type EndpointStats ¶
type EndpointStats struct {
Endpoint string `json:"endpoint"`
Count uint64 `json:"count"`
P50Duration time.Duration `json:"p50Duration"`
P95Duration time.Duration `json:"p95Duration"`
P99Duration time.Duration `json:"p99Duration"`
AvgDuration time.Duration `json:"avgDuration"`
LastSeen time.Time `json:"lastSeen"`
Impact float64 `json:"impact"` // 0-1 impact score
ImpactReason string `json:"impactReason"` // human-readable explanation of the dominant impact factor
IsStream bool `json:"isStream"` // true => latency/Apdex/impact intentionally zero
HasRoot bool `json:"hasRoot"`
HasNonRoot bool `json:"hasNonRoot"`
}
type EndpointTimeSeriesPoint ¶
type EndpointTimeSeriesPoint struct {
Timestamp time.Time `json:"timestamp"`
Endpoint string `json:"endpoint"`
Value float64 `json:"value"`
}
EndpointTimeSeriesPoint represents a single data point in a time series for endpoint charts
type EscalationPolicy ¶ added in v1.9.10
type EscalationPolicy struct {
Id int `json:"id" lit:"id"`
OrganizationId int `json:"organizationId" lit:"organization_id"`
Name string `json:"name" lit:"name"`
Definition JSONText `json:"definition" lit:"definition"`
CreatedBy *int `json:"createdBy" lit:"created_by"`
CreatedAt time.Time `json:"createdAt" lit:"created_at"`
UpdatedAt time.Time `json:"updatedAt" lit:"updated_at"`
}
type ExceptionGroup ¶
type ExceptionGroup struct {
ExceptionHash string `json:"exceptionHash" ch:"exception_hash"`
StackTrace string `json:"stackTrace" ch:"stack_trace"`
LastSeen time.Time `json:"lastSeen" ch:"last_seen"`
FirstSeen time.Time `json:"firstSeen" ch:"first_seen"`
Count uint64 `json:"count" ch:"count"`
HourlyTrend []ExceptionTrendPoint `json:"hourlyTrend,omitempty"`
}
type ExceptionStackTrace ¶
type ExceptionStackTrace struct {
Id uuid.UUID `json:"id" ch:"id"`
ProjectId uuid.UUID `json:"projectId" ch:"project_id"`
TraceId *uuid.UUID `json:"traceId" ch:"trace_id"`
TraceType string `json:"traceType" ch:"trace_type"` // "endpoint" or "task"
ExceptionHash string `json:"exceptionHash" ch:"exception_hash"`
StackTrace string `json:"stackTrace" ch:"stack_trace"`
RecordedAt time.Time `json:"recordedAt" ch:"recorded_at"`
Attributes map[string]string `json:"attributes" ch:"attributes"`
AppVersion string `json:"appVersion" ch:"app_version"`
ServerName string `json:"serverName" ch:"server_name"`
IsMessage bool `json:"isMessage" ch:"is_message"`
DistributedTraceId *uuid.UUID `json:"distributedTraceId,omitempty" ch:"distributed_trace_id"`
SessionId *uuid.UUID `json:"sessionId,omitempty" ch:"session_id"`
}
type ExceptionTrendPoint ¶
type ForgotPasswordRequest ¶
type ForgotPasswordRequest struct {
Email string `json:"email" binding:"required,email"`
}
type Invitation ¶
type Invitation struct {
Id int `json:"id"`
OrganizationId int `json:"organizationId"`
Email string `json:"email"`
Role string `json:"role"`
Token string `json:"-"`
InvitedBy int `json:"invitedBy"`
Status string `json:"status"`
ExpiresAt time.Time `json:"expiresAt"`
AcceptedAt *time.Time `json:"acceptedAt,omitempty"`
CreatedAt time.Time `json:"createdAt"`
}
type InvitationInfoResponse ¶
type InvitationWithInviter ¶
type InvitationWithInviter struct {
Id int `json:"id"`
OrganizationId int `json:"organizationId"`
Email string `json:"email"`
Role string `json:"role"`
InvitedBy int `json:"invitedBy"`
InviterName string `json:"inviterName" lit:"inviter_name"`
Status string `json:"status"`
ExpiresAt time.Time `json:"expiresAt"`
AcceptedAt *time.Time `json:"acceptedAt,omitempty"`
CreatedAt time.Time `json:"createdAt"`
}
type InviteUserRequest ¶
type JSONText ¶ added in v1.9.4
type JSONText []byte
func (JSONText) MarshalJSON ¶ added in v1.9.4
func (*JSONText) UnmarshalJSON ¶ added in v1.9.4
type LogRecord ¶
type LogRecord struct {
Id uuid.UUID `json:"id" ch:"id"`
ProjectId uuid.UUID `json:"projectId" ch:"project_id"`
Timestamp time.Time `json:"timestamp" ch:"timestamp"`
TraceId string `json:"traceId" ch:"trace_id"`
SpanId string `json:"spanId" ch:"span_id"`
TraceFlags uint8 `json:"traceFlags" ch:"trace_flags"`
SeverityText string `json:"severityText" ch:"severity_text"`
SeverityNumber uint8 `json:"severityNumber" ch:"severity_number"`
ServiceName string `json:"serviceName" ch:"service_name"`
Body string `json:"body" ch:"body"`
ResourceSchemaUrl string `json:"resourceSchemaUrl" ch:"resource_schema_url"`
ResourceAttributes map[string]string `json:"resourceAttributes" ch:"resource_attributes"`
ScopeSchemaUrl string `json:"scopeSchemaUrl" ch:"scope_schema_url"`
ScopeName string `json:"scopeName" ch:"scope_name"`
ScopeVersion string `json:"scopeVersion" ch:"scope_version"`
ScopeAttributes map[string]string `json:"scopeAttributes" ch:"scope_attributes"`
LogAttributes map[string]string `json:"logAttributes" ch:"log_attributes"`
}
type LoginRequest ¶
type LoginResponse ¶
type LoginResponse struct {
Token string `json:"token"`
User UserResponse `json:"user"`
Projects []*ProjectWithBackendUrl `json:"projects"`
Organizations []*UserOrganizationResponse `json:"organizations"`
}
type MemberProjectRole ¶ added in v1.9.2
type MetricPoint ¶
type MetricRegistry ¶
type MetricRegistry struct {
Id int `json:"id" lit:"id"`
ProjectId uuid.UUID `json:"projectId" lit:"project_id"`
Name string `json:"name" lit:"name"`
MetricType string `json:"metricType" lit:"metric_type"`
Unit string `json:"unit" lit:"unit"`
Description string `json:"description" lit:"description"`
CreatedAt time.Time `json:"createdAt" lit:"created_at"`
}
type NotificationChannel ¶
type NotificationChannel struct {
Id int `json:"id" lit:"id"`
ProjectId uuid.UUID `json:"projectId" lit:"project_id"`
Name string `json:"name" lit:"name"`
ChannelType string `json:"channelType" lit:"channel_type"`
Config json.RawMessage `json:"config" lit:"config"`
Enabled bool `json:"enabled" lit:"enabled"`
CreatedBy *int `json:"createdBy" lit:"created_by"`
CreatedAt time.Time `json:"createdAt" lit:"created_at"`
UpdatedAt time.Time `json:"updatedAt" lit:"updated_at"`
}
type NotificationHistoryEntry ¶ added in v1.8.1
type NotificationHistoryEntry struct {
RuleId int `json:"ruleId"`
RuleType string `json:"ruleType"`
RuleName string `json:"ruleName"`
ChannelType string `json:"channelType"`
ChannelName string `json:"channelName"`
Severity string `json:"severity"`
Subject string `json:"subject"`
Body string `json:"body"`
Status string `json:"status"`
ErrorMessage string `json:"errorMessage"`
URL string `json:"url"`
CreatedAt time.Time `json:"createdAt"`
}
type NotificationMessage ¶ added in v1.9.10
type NotificationMessage struct {
Subject string
Body string
HTMLBody string
Severity NotificationSeverity
RuleType string
RuleName string
URL string
Endpoint string
// DedupToken is the stable identity of what fired within the rule
// (exception hash, endpoint, task or metric name; empty for rule-level
// conditions). Page dedup keys are built from it — never from URL, which
// can embed a time window that changes every fire. Not persisted: dedup
// only matters at page-open time.
DedupToken string `json:"-"`
}
NotificationMessage is what adapters deliver. Field names are the persisted JSON shape of notification_outbox.message, so renaming a field is a wire-format change for rows in flight across a restart or upgrade.
type NotificationRule ¶
type NotificationRule struct {
Id int `json:"id" lit:"id"`
ProjectId uuid.UUID `json:"projectId" lit:"project_id"`
ChannelId int `json:"channelId" lit:"channel_id"`
Name string `json:"name" lit:"name"`
RuleType string `json:"ruleType" lit:"rule_type"`
Config json.RawMessage `json:"config" lit:"config"`
Enabled bool `json:"enabled" lit:"enabled"`
CooldownMinutes int `json:"cooldownMinutes" lit:"cooldown_minutes"`
Severity string `json:"severity" lit:"severity"`
SnoozedUntil *time.Time `json:"snoozedUntil" lit:"snoozed_until"`
CreatedBy *int `json:"createdBy" lit:"created_by"`
CreatedAt time.Time `json:"createdAt" lit:"created_at"`
UpdatedAt time.Time `json:"updatedAt" lit:"updated_at"`
}
type NotificationRuleWithChannel ¶
type NotificationRuleWithChannel struct {
Id int `json:"id" lit:"id"`
ProjectId uuid.UUID `json:"projectId" lit:"project_id"`
ChannelId int `json:"channelId" lit:"channel_id"`
Name string `json:"name" lit:"name"`
RuleType string `json:"ruleType" lit:"rule_type"`
Config json.RawMessage `json:"config" lit:"config"`
Enabled bool `json:"enabled" lit:"enabled"`
CooldownMinutes int `json:"cooldownMinutes" lit:"cooldown_minutes"`
Severity string `json:"severity" lit:"severity"`
SnoozedUntil *time.Time `json:"snoozedUntil" lit:"snoozed_until"`
CreatedBy *int `json:"createdBy" lit:"created_by"`
CreatedAt time.Time `json:"createdAt" lit:"created_at"`
UpdatedAt time.Time `json:"updatedAt" lit:"updated_at"`
ChannelName string `json:"channelName" lit:"channel_name"`
ChannelType string `json:"channelType" lit:"channel_type"`
}
type NotificationSeverity ¶ added in v1.9.10
type NotificationSeverity string
const ( NotificationSeverityInfo NotificationSeverity = "info" NotificationSeverityWarning NotificationSeverity = "warning" NotificationSeverityCritical NotificationSeverity = "critical" )
type OauthClient ¶ added in v1.8.15
type OauthClientLookupResponse ¶ added in v1.8.15
type OauthClientLookupResponse struct {
ClientName string `json:"clientName"`
}
type OncallLayer ¶ added in v1.9.10
type OncallLayer struct {
Id string `json:"id"`
Name string `json:"name"`
RotationType string `json:"rotationType"`
HandoffTime string `json:"handoffTime"`
HandoffDay int `json:"handoffDay"`
IntervalDays int `json:"intervalDays"`
RotationStart string `json:"rotationStart"`
UserIds []int `json:"userIds"`
Restrictions []OncallRestriction `json:"restrictions"`
}
type OncallOverride ¶ added in v1.9.10
type OncallOverride struct {
Id int `json:"id" lit:"id"`
ScheduleId int `json:"scheduleId" lit:"schedule_id"`
UserId int `json:"userId" lit:"user_id"`
StartAt time.Time `json:"startAt" lit:"start_at"`
EndAt time.Time `json:"endAt" lit:"end_at"`
CreatedBy *int `json:"createdBy" lit:"created_by"`
CreatedAt time.Time `json:"createdAt" lit:"created_at"`
}
type OncallRestriction ¶ added in v1.9.10
type OncallSchedule ¶ added in v1.9.10
type OncallSchedule struct {
Id int `json:"id" lit:"id"`
OrganizationId int `json:"organizationId" lit:"organization_id"`
TeamId int `json:"teamId" lit:"team_id"`
Name string `json:"name" lit:"name"`
Description string `json:"description" lit:"description"`
Timezone string `json:"timezone" lit:"timezone"`
Definition JSONText `json:"definition" lit:"definition"`
CreatedBy *int `json:"createdBy" lit:"created_by"`
CreatedAt time.Time `json:"createdAt" lit:"created_at"`
UpdatedAt time.Time `json:"updatedAt" lit:"updated_at"`
}
type OncallScheduleDefinition ¶ added in v1.9.10
type OncallScheduleDefinition struct {
SchemaVersion int `json:"schemaVersion"`
Layers []OncallLayer `json:"layers"`
}
type Organization ¶
type OrganizationMember ¶
type OrganizationMember struct {
Id int `json:"id"`
Email string `json:"email"`
Name string `json:"name"`
Role string `json:"role"`
CreatedAt time.Time `json:"createdAt"`
}
OrganizationMember represents a user with their role in an organization
type OrganizationSettingsResponse ¶
type OrganizationSettingsResponse struct {
Organization *Organization `json:"organization"`
Members []*OrganizationMember `json:"members"`
Invitations []*InvitationWithInviter `json:"invitations"`
UserRole string `json:"userRole"`
}
OrganizationSettingsResponse is returned for the settings page
type OrganizationUser ¶
type OutboxDelivery ¶ added in v1.9.10
type OutboxDelivery struct {
Id int `json:"id" lit:"id"`
Kind string `json:"kind" lit:"kind"`
Status string `json:"status" lit:"status"`
AdapterType string `json:"adapterType" lit:"adapter_type"`
AdapterConfig JSONText `json:"-" lit:"adapter_config"`
Message JSONText `json:"-" lit:"message"`
Attempts int `json:"attempts" lit:"attempts"`
NextAttemptAt time.Time `json:"nextAttemptAt" lit:"next_attempt_at"`
ClaimedAt *time.Time `json:"claimedAt" lit:"claimed_at"`
CancelKey string `json:"cancelKey" lit:"cancel_key"`
PageNotificationId *int `json:"pageNotificationId" lit:"page_notification_id"`
RuleId *int `json:"ruleId" lit:"rule_id"`
ProjectId *uuid.UUID `json:"projectId" lit:"project_id"`
ChannelName string `json:"channelName" lit:"channel_name"`
LastError string `json:"lastError" lit:"last_error"`
CreatedAt time.Time `json:"createdAt" lit:"created_at"`
SentAt *time.Time `json:"sentAt" lit:"sent_at"`
}
OutboxDelivery is one persisted notification send. AdapterConfig can hold secrets (SMTP credentials, webhook secrets), so it is never serialized to JSON responses.
type OutboxHealthCounts ¶ added in v1.9.10
type OutboxRuleEnqueue ¶ added in v1.9.10
type Page ¶ added in v1.9.10
type Page struct {
Id int `json:"id" lit:"id"`
OrganizationId int `json:"organizationId" lit:"organization_id"`
ProjectId uuid.UUID `json:"projectId" lit:"project_id"`
PolicyId *int `json:"policyId" lit:"policy_id"`
PolicySnapshot JSONText `json:"policySnapshot" lit:"policy_snapshot"`
RuleId *int `json:"ruleId" lit:"rule_id"`
RuleName string `json:"ruleName" lit:"rule_name"`
RuleType string `json:"ruleType" lit:"rule_type"`
Subject string `json:"subject" lit:"subject"`
Body string `json:"body" lit:"body"`
URL string `json:"url" lit:"url"`
Severity string `json:"severity" lit:"severity"`
Urgency string `json:"urgency" lit:"urgency"`
Status string `json:"status" lit:"status"`
DedupKey string `json:"-" lit:"dedup_key"`
EventCount int `json:"eventCount" lit:"event_count"`
LastEventAt time.Time `json:"lastEventAt" lit:"last_event_at"`
EscalationLevel int `json:"escalationLevel" lit:"escalation_level"`
RepeatIteration int `json:"repeatIteration" lit:"repeat_iteration"`
NextEscalationAt *time.Time `json:"nextEscalationAt" lit:"next_escalation_at"`
LastEscalatedAt *time.Time `json:"lastEscalatedAt" lit:"last_escalated_at"`
AcknowledgedBy *int `json:"acknowledgedBy" lit:"acknowledged_by"`
AcknowledgedVia string `json:"acknowledgedVia" lit:"acknowledged_via"`
AcknowledgedAt *time.Time `json:"acknowledgedAt" lit:"acknowledged_at"`
ResolvedBy *int `json:"resolvedBy" lit:"resolved_by"`
ResolvedAt *time.Time `json:"resolvedAt" lit:"resolved_at"`
CreatedAt time.Time `json:"createdAt" lit:"created_at"`
UpdatedAt time.Time `json:"updatedAt" lit:"updated_at"`
}
type PageNotification ¶ added in v1.9.10
type PageNotification struct {
Id int `json:"id" lit:"id"`
PageId int `json:"pageId" lit:"page_id"`
Level int `json:"level" lit:"level"`
Iteration int `json:"iteration" lit:"iteration"`
UserId *int `json:"userId" lit:"user_id"`
TargetDesc string `json:"targetDesc" lit:"target_desc"`
MethodType string `json:"methodType" lit:"method_type"`
Status string `json:"status" lit:"status"`
ErrorMsg string `json:"errorMsg" lit:"error_msg"`
ScheduledFor *time.Time `json:"scheduledFor" lit:"scheduled_for"`
AckTokenHash string `json:"-" lit:"ack_token_hash"`
CreatedAt time.Time `json:"createdAt" lit:"created_at"`
SentAt *time.Time `json:"sentAt" lit:"sent_at"`
}
type PasswordResetTokenInfo ¶
type PersonalAccessToken ¶ added in v1.8.14
type Profile ¶ added in v1.8.3
type Profile struct {
Id uuid.UUID `json:"id" ch:"id"`
ProjectId uuid.UUID `json:"projectId" ch:"project_id"`
RecordedAt time.Time `json:"recordedAt" ch:"recorded_at"`
Duration time.Duration `json:"duration" ch:"duration"`
ServiceName string `json:"serviceName" ch:"service_name"`
ProfileType string `json:"profileType" ch:"profile_type"`
Unit string `json:"unit" ch:"unit"`
IsGauge bool `json:"isGauge" ch:"is_gauge"`
SampleCount uint64 `json:"sampleCount" ch:"sample_count"`
TotalValue int64 `json:"totalValue" ch:"total_value"`
ServerName string `json:"serverName" ch:"server_name"`
AppVersion string `json:"appVersion" ch:"app_version"`
Attributes map[string]string `json:"attributes" ch:"attributes"`
StorageKey string `json:"storageKey" ch:"storage_key"`
TraceId string `json:"traceId" ch:"trace_id"`
SpanId string `json:"spanId" ch:"span_id"`
DistributedTraceId *uuid.UUID `json:"distributedTraceId,omitempty" ch:"distributed_trace_id"`
}
type ProfileGroup ¶ added in v1.8.9
type ProfileGroup struct {
ServiceName string `json:"serviceName" ch:"service_name"`
Type string `json:"type" ch:"profile_type"`
Unit string `json:"unit" ch:"unit"`
IsGauge bool `json:"isGauge" ch:"is_gauge"`
ProfileCount int64 `json:"profileCount" ch:"profile_count"`
SampleCount int64 `json:"sampleCount" ch:"sample_count"`
TotalValue int64 `json:"totalValue" ch:"total_value"`
LastSeen time.Time `json:"lastSeen" ch:"last_seen"`
Sparkline []float64 `json:"sparkline"`
}
type ProfileSample ¶ added in v1.8.3
type ProfileSample struct {
ProjectId uuid.UUID `json:"projectId" ch:"project_id"`
ProfileId uuid.UUID `json:"profileId" ch:"profile_id"`
ServiceName string `json:"serviceName" ch:"service_name"`
Type string `json:"type" ch:"type"`
Unit string `json:"unit" ch:"unit"`
IsGauge bool `json:"isGauge" ch:"is_gauge"`
Start time.Time `json:"start" ch:"start_time"`
End time.Time `json:"end" ch:"end_time"`
StackHash uint64 `json:"stackHash" ch:"stack_hash"`
Value int64 `json:"value" ch:"value"`
Labels map[string]string `json:"labels" ch:"labels"`
ServerName string `json:"serverName" ch:"server_name"`
AppVersion string `json:"appVersion" ch:"app_version"`
TraceId string `json:"traceId" ch:"trace_id"`
SpanId string `json:"spanId" ch:"span_id"`
}
type ProfileSeriesGroup ¶ added in v1.8.12
type ProfileSeriesGroup struct {
Key string `json:"key"`
Points []TimeSeriesPoint `json:"points"`
}
type ProfileStack ¶ added in v1.8.3
type ProfileStackValue ¶ added in v1.8.9
type ProfileTypeInfo ¶ added in v1.8.12
type Project ¶
type Project struct {
Id uuid.UUID `json:"id"`
Name string `json:"name"`
Token string `json:"token"`
Framework string `json:"framework"`
OrganizationId *int `json:"organizationId"`
CreatedAt time.Time `json:"createdAt"`
SourceMapToken *string `json:"sourceMapToken,omitempty"`
DropHealthyHealthchecks bool `json:"dropHealthyHealthchecks"`
HealthcheckPaths StringSlice `json:"healthcheckPaths"`
ProfileLabelAllowlist StringSlice `json:"profileLabelAllowlist"`
}
func (Project) ToProjectWithBackendUrl ¶
func (p Project) ToProjectWithBackendUrl() *ProjectWithBackendUrl
type ProjectDashboard ¶ added in v1.9.4
type ProjectTeam ¶ added in v1.9.10
type ProjectWithBackendUrl ¶
type RefreshToken ¶ added in v1.8.14
type RegisterClientRequest ¶ added in v1.8.15
type RegisterClientResponse ¶ added in v1.8.15
type RegisterClientResponse struct {
ClientId string `json:"client_id"`
ClientName string `json:"client_name"`
RedirectUris []string `json:"redirect_uris"`
GrantTypes []string `json:"grant_types"`
ResponseTypes []string `json:"response_types"`
TokenEndpointAuthMethod string `json:"token_endpoint_auth_method"`
ClientIdIssuedAt int64 `json:"client_id_issued_at"`
}
type RegisterRequest ¶
type RegisterRequest struct {
Email string `json:"email" binding:"required,email"`
Name string `json:"name" binding:"required"`
Password string `json:"password" binding:"required,min=8"`
OrganizationName string `json:"organizationName" binding:"required"`
Timezone string `json:"timezone" binding:"required"`
ProjectName string `json:"projectName" binding:"required"`
Framework string `json:"framework" binding:"required"`
CaptchaToken string `json:"captchaToken"`
}
type RegisterResponse ¶
type RegisterResponse struct {
Token string `json:"token"`
User UserResponse `json:"user"`
Project ProjectWithBackendUrl `json:"project"`
Projects []*ProjectWithBackendUrl `json:"projects"`
Organizations []*UserOrganizationResponse `json:"organizations"`
}
type ResetPasswordRequest ¶
type ResetPasswordRequest struct {
Password string `json:"password" binding:"required,min=8"`
}
type ServerMetricTrend ¶
type ServerMetricTrend struct {
ServerName string `json:"serverName"`
Value float64 `json:"value"`
Trend []DashboardTrendPoint `json:"trend"`
}
ServerMetricTrend represents trend data for a single server
type Session ¶
type Session struct {
Id uuid.UUID `json:"id" ch:"id"`
ProjectId uuid.UUID `json:"projectId" ch:"project_id"`
StartedAt time.Time `json:"startedAt" ch:"started_at"`
EndedAt *time.Time `json:"endedAt,omitempty" ch:"ended_at"`
Duration int64 `json:"duration" ch:"duration"`
ClientIP string `json:"clientIP" ch:"client_ip"`
Attributes map[string]string `json:"attributes" ch:"attributes"`
AppVersion string `json:"appVersion" ch:"app_version"`
ServerName string `json:"serverName" ch:"server_name"`
DistributedTraceId *uuid.UUID `json:"distributedTraceId,omitempty" ch:"distributed_trace_id"`
}
type SessionRecording ¶
type SessionRecording struct {
Id uuid.UUID `json:"id" ch:"id"`
ProjectId uuid.UUID `json:"projectId" ch:"project_id"`
ExceptionId uuid.UUID `json:"exceptionId" ch:"exception_id"`
SessionId *uuid.UUID `json:"sessionId,omitempty" ch:"session_id"`
SegmentIndex int32 `json:"segmentIndex" ch:"segment_index"`
FilePath string `json:"filePath" ch:"file_path"`
RecordedAt time.Time `json:"recordedAt" ch:"recorded_at"`
}
type SourceMapFlattenMigration ¶ added in v1.8.0
type SourceMapProjectId ¶ added in v1.8.0
type Span ¶
type Span struct {
Id uuid.UUID `json:"id" ch:"id"`
TraceId uuid.UUID `json:"traceId" ch:"trace_id"`
ProjectId uuid.UUID `json:"projectId" ch:"project_id"`
Name string `json:"name" ch:"name"`
StartTime time.Time `json:"startTime" ch:"start_time"`
Duration time.Duration `json:"duration" ch:"duration"`
RecordedAt time.Time `json:"recordedAt" ch:"recorded_at"`
ParentSpanId *uuid.UUID `json:"parentSpanId,omitempty" ch:"parent_span_id"`
Attributes map[string]string `json:"attributes,omitempty" ch:"attributes"`
}
type StarredDashboardWidget ¶ added in v1.9.4
type StarredDashboardWidget struct {
Id int `json:"id" lit:"id"`
ProjectId uuid.UUID `json:"projectId" lit:"project_id"`
DashboardId int `json:"dashboardId" lit:"dashboard_id"`
WidgetId string `json:"widgetId" lit:"widget_id"`
Position int `json:"position" lit:"position"`
ColSpan int `json:"colSpan" lit:"col_span"`
Size string `json:"size" lit:"size"`
CreatedAt time.Time `json:"createdAt" lit:"created_at"`
}
type StarredWidget ¶ added in v1.8.15
type StarredWidgetWithHome ¶ added in v1.8.15
type StarredWidgetWithHome struct {
Id int `json:"id" lit:"id"`
WidgetGroupId int `json:"widgetGroupId" lit:"widget_group_id"`
Title string `json:"title" lit:"title"`
WidgetType string `json:"widgetType" lit:"widget_type"`
Config json.RawMessage `json:"config" lit:"config"`
Position int `json:"position" lit:"position"`
HomePosition int `json:"homePosition" lit:"home_position"`
HomeColSpan int `json:"homeColSpan" lit:"home_col_span"`
HomeSize string `json:"homeSize" lit:"home_size"`
CreatedAt time.Time `json:"createdAt" lit:"created_at"`
UpdatedAt time.Time `json:"updatedAt" lit:"updated_at"`
}
type StringSlice ¶ added in v1.7.32
type StringSlice []string
func (*StringSlice) Scan ¶ added in v1.7.32
func (s *StringSlice) Scan(src any) error
type Task ¶
type Task struct {
Id uuid.UUID `json:"id" ch:"id"`
ProjectId uuid.UUID `json:"projectId" ch:"project_id"`
TaskName string `json:"taskName" ch:"task_name"`
Duration time.Duration `json:"duration" ch:"duration"`
RecordedAt time.Time `json:"recordedAt" ch:"recorded_at"`
ClientIP string `json:"clientIP" ch:"client_ip"`
Attributes map[string]string `json:"attributes" ch:"attributes"`
AppVersion string `json:"appVersion" ch:"app_version"`
ServerName string `json:"serverName" ch:"server_name"`
DistributedTraceId *uuid.UUID `json:"distributedTraceId,omitempty" ch:"distributed_trace_id"`
SpanId *uuid.UUID `json:"spanId,omitempty" ch:"span_id"`
IsRoot bool `json:"isRoot" ch:"is_root"`
}
type TaskDetailStats ¶
type TaskDetailStats struct {
Count int64 `json:"count"`
AvgDuration float64 `json:"avgDuration"` // in ms
MedianDuration float64 `json:"medianDuration"` // in ms
P95Duration float64 `json:"p95Duration"` // in ms
P99Duration float64 `json:"p99Duration"` // in ms
Throughput float64 `json:"throughput"` // tasks per minute
}
TaskDetailStats contains detailed statistics for a specific task
type TaskStats ¶
type TaskStats struct {
TaskName string `json:"taskName"`
Count uint64 `json:"count"`
P50Duration time.Duration `json:"p50Duration"`
P95Duration time.Duration `json:"p95Duration"`
AvgDuration time.Duration `json:"avgDuration"`
LastSeen time.Time `json:"lastSeen"`
HasRoot bool `json:"hasRoot"`
HasNonRoot bool `json:"hasNonRoot"`
}
type Team ¶ added in v1.9.10
type Team struct {
Id int `json:"id" lit:"id"`
OrganizationId int `json:"organizationId" lit:"organization_id"`
Name string `json:"name" lit:"name"`
Description string `json:"description" lit:"description"`
CreatedAt time.Time `json:"createdAt" lit:"created_at"`
UpdatedAt time.Time `json:"updatedAt" lit:"updated_at"`
}
type TeamMember ¶ added in v1.9.10
type TeamMemberWithUser ¶ added in v1.9.10
type TeamProjectRow ¶ added in v1.9.10
type TeamWithCounts ¶ added in v1.9.10
type TeamWithCounts struct {
Id int `json:"id" lit:"id"`
OrganizationId int `json:"organizationId" lit:"organization_id"`
Name string `json:"name" lit:"name"`
Description string `json:"description" lit:"description"`
CreatedAt time.Time `json:"createdAt" lit:"created_at"`
UpdatedAt time.Time `json:"updatedAt" lit:"updated_at"`
MemberCount int `json:"memberCount" lit:"member_count"`
ProjectCount int `json:"projectCount" lit:"project_count"`
ScheduleCount int `json:"scheduleCount" lit:"schedule_count"`
}
type TimeSeriesPoint ¶
TimeSeriesPoint is used internally for querying time-bucketed data and is serialized directly in the /api/metrics/query response.
type TokenRequest ¶ added in v1.8.14
type TokenRequest struct {
GrantType string `json:"grant_type" form:"grant_type"`
DeviceCode string `json:"device_code" form:"device_code"`
RefreshToken string `json:"refresh_token" form:"refresh_token"`
ClientId string `json:"client_id" form:"client_id"`
Code string `json:"code" form:"code"`
CodeVerifier string `json:"code_verifier" form:"code_verifier"`
RedirectUri string `json:"redirect_uri" form:"redirect_uri"`
Resource string `json:"resource" form:"resource"`
}
type TokenSetResponse ¶ added in v1.8.14
type UpdateMemberRoleRequest ¶
type UpdateMemberRoleRequest struct {
Role string `json:"role" binding:"required,oneof=admin user readonly"`
}
UpdateMemberRoleRequest is the request body for updating a member's role
type UpdateProjectRoleRequest ¶ added in v1.9.2
type UpdateProjectRoleRequest struct {
Role string `json:"role" binding:"required,oneof=default user readonly"`
}
type User ¶
type User struct {
Id int `json:"id"`
Email string `json:"email"`
Name string `json:"name"`
Password string `json:"-"`
CreatedAt time.Time `json:"createdAt"`
PasswordResetToken *string `json:"-"`
PasswordResetExpiresAt *time.Time `json:"-"`
PasswordResetRequestedAt *time.Time `json:"-"`
OauthProvider *string `json:"-"`
OauthUserId *string `json:"-"`
AvatarUrl *string `json:"avatarUrl,omitempty"`
}
func (*User) ToResponse ¶
func (u *User) ToResponse() UserResponse
type UserContactMethod ¶ added in v1.9.10
type UserContactMethod struct {
Id int `json:"id" lit:"id"`
UserId int `json:"userId" lit:"user_id"`
MethodType string `json:"methodType" lit:"method_type"`
Config JSONText `json:"config" lit:"config"`
Enabled bool `json:"enabled" lit:"enabled"`
Verified bool `json:"verified" lit:"verified"`
VerificationCodeHash string `json:"-" lit:"verification_code_hash"`
VerificationExpiresAt *time.Time `json:"-" lit:"verification_expires_at"`
VerificationAttempts int `json:"-" lit:"verification_attempts"`
CreatedAt time.Time `json:"createdAt" lit:"created_at"`
}
type UserNotificationRule ¶ added in v1.9.10
type UserNotificationRule struct {
Id int `json:"id" lit:"id"`
UserId int `json:"userId" lit:"user_id"`
Urgency string `json:"urgency" lit:"urgency"`
Position int `json:"position" lit:"position"`
DelayMinutes int `json:"delayMinutes" lit:"delay_minutes"`
ContactMethodId int `json:"contactMethodId" lit:"contact_method_id"`
CreatedAt time.Time `json:"createdAt" lit:"created_at"`
}
type UserResponse ¶
type WidgetGroup ¶
type WidgetGroup struct {
Id int `json:"id" lit:"id"`
ProjectId uuid.UUID `json:"projectId" lit:"project_id"`
Name string `json:"name" lit:"name"`
Description string `json:"description" lit:"description"`
IsDefault bool `json:"isDefault" lit:"is_default"`
CreatedBy *int `json:"createdBy" lit:"created_by"`
CreatedAt time.Time `json:"createdAt" lit:"created_at"`
UpdatedAt time.Time `json:"updatedAt" lit:"updated_at"`
}
type WidgetGroupWidget ¶
type WidgetGroupWidget struct {
Id int `json:"id" lit:"id"`
WidgetGroupId int `json:"widgetGroupId" lit:"widget_group_id"`
Title string `json:"title" lit:"title"`
WidgetType string `json:"widgetType" lit:"widget_type"`
Config JSONText `json:"config" lit:"config"`
Position int `json:"position" lit:"position"`
CreatedAt time.Time `json:"createdAt" lit:"created_at"`
UpdatedAt time.Time `json:"updatedAt" lit:"updated_at"`
}
type WidgetGroupWidgetWithStar ¶ added in v1.8.15
type WidgetGroupWidgetWithStar struct {
Id int `json:"id" lit:"id"`
WidgetGroupId int `json:"widgetGroupId" lit:"widget_group_id"`
Title string `json:"title" lit:"title"`
WidgetType string `json:"widgetType" lit:"widget_type"`
Config json.RawMessage `json:"config" lit:"config"`
Position int `json:"position" lit:"position"`
IsStarred bool `json:"isStarred" lit:"is_starred"`
CreatedAt time.Time `json:"createdAt" lit:"created_at"`
UpdatedAt time.Time `json:"updatedAt" lit:"updated_at"`
}
type WidgetGroupWithWidgets ¶
type WidgetGroupWithWidgets struct {
WidgetGroup
Widgets []WidgetGroupWidgetWithStar `json:"widgets"`
}
Source Files
¶
- ai_trace.model.go
- auth.model.go
- auth_token.model.go
- count_result.model.go
- dashboard.model.go
- dashboards.model.go
- endpoint.model.go
- escalation.model.go
- exception_stack_trace.model.go
- invitation.model.go
- jsontext.go
- log_record.model.go
- metric_record.model.go
- metric_registry.model.go
- models.go
- notification.model.go
- notification_message.model.go
- oncall.model.go
- organization.model.go
- outbox.model.go
- profile.model.go
- project.model.go
- project_user_role.model.go
- session.model.go
- session_recording.model.go
- source_map.model.go
- span.model.go
- task.model.go
- user.model.go
- widget_group.model.go