gen

package
v1.22.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApproveLogEventPolicyParams added in v1.21.0

type ApproveLogEventPolicyParams struct {
	ApprovedAt *string
	ApprovedBy *string
	ID         *string
}

type Conversation

type Conversation struct {
	ID          *string
	AccountID   *string
	CreatedAt   *string
	Title       *string
	UpdatedAt   *string
	UserID      *string
	ViewID      *string
	WorkspaceID *string
}

type ConversationContext

type ConversationContext struct {
	ID             *string
	AccountID      *string
	AddedBy        *string
	ConversationID *string
	CreatedAt      *string
	EntityID       *string
	EntityType     *string
}

type CountObservedPoliciesByComplianceCategoryRow added in v1.22.0

type CountObservedPoliciesByComplianceCategoryRow struct {
	Category      *string
	ObservedCount int64
}

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type DatadogAccount

type DatadogAccount struct {
	ID                *string
	AccountID         *string
	CostPerGbIngested *float64
	CreatedAt         *string
	Name              *string
	Site              *string
	UpdatedAt         *string
}

type DatadogAccountStatusesCache

type DatadogAccountStatusesCache struct {
	ID                                     *string
	AccountID                              *string
	DatadogAccountID                       *string
	DisabledServices                       *int64
	EstimatedBytesReductionPerHour         *float64
	EstimatedCostReductionPerHourBytesUsd  *float64
	EstimatedCostReductionPerHourUsd       *float64
	EstimatedCostReductionPerHourVolumeUsd *float64
	EstimatedVolumeReductionPerHour        *float64
	Health                                 *string
	InactiveServices                       *int64
	LogActiveServices                      *int64
	LogEventAnalyzedCount                  *int64
	LogEventBytesPerHour                   *float64
	LogEventCostPerHourBytesUsd            *float64
	LogEventCostPerHourUsd                 *float64
	LogEventCostPerHourVolumeUsd           *float64
	LogEventCount                          *int64
	LogEventVolumePerHour                  *float64
	LogServiceCount                        *int64
	ObservedBytesPerHourAfter              *float64
	ObservedBytesPerHourBefore             *float64
	ObservedCostPerHourAfterBytesUsd       *float64
	ObservedCostPerHourAfterUsd            *float64
	ObservedCostPerHourAfterVolumeUsd      *float64
	ObservedCostPerHourBeforeBytesUsd      *float64
	ObservedCostPerHourBeforeUsd           *float64
	ObservedCostPerHourBeforeVolumeUsd     *float64
	ObservedVolumePerHourAfter             *float64
	ObservedVolumePerHourBefore            *float64
	OkServices                             *int64
	PolicyApprovedCount                    *int64
	PolicyDismissedCount                   *int64
	PolicyPendingCount                     *int64
	PolicyPendingCriticalCount             *int64
	PolicyPendingHighCount                 *int64
	PolicyPendingLowCount                  *int64
	PolicyPendingMediumCount               *int64
	ReadyForUse                            *int64
	RefreshedAt                            *string
	ServiceCostPerHourVolumeUsd            *float64
	ServiceVolumePerHour                   *float64
}

type DatadogLogIndex

type DatadogLogIndex struct {
	ID                          *string
	AccountID                   *string
	CostPerMillionEventsIndexed *float64
	CreatedAt                   *string
	DatadogAccountID            *string
	LastSeenAt                  *string
	Name                        *string
}

type DismissLogEventPolicyParams added in v1.21.0

type DismissLogEventPolicyParams struct {
	DismissedAt *string
	DismissedBy *string
	ID          *string
}

type GetAccountSummaryRow added in v1.14.0

type GetAccountSummaryRow struct {
	ReadyForUse                int64
	Health                     interface{}
	ServiceCount               int64
	ActiveServices             int64
	OkServices                 int64
	DisabledServices           int64
	InactiveServices           int64
	EventCount                 int64
	AnalyzedCount              int64
	PendingPolicyCount         int64
	ApprovedPolicyCount        int64
	DismissedPolicyCount       int64
	PolicyPendingCriticalCount int64
	PolicyPendingHighCount     int64
	PolicyPendingMediumCount   int64
	PolicyPendingLowCount      int64
	EstimatedCostPerHour       *float64
	EstimatedCostPerHourBytes  *float64
	EstimatedCostPerHourVolume *float64
	EstimatedVolumePerHour     *float64
	EstimatedBytesPerHour      *float64
	ObservedCostBefore         *float64
	ObservedCostBeforeBytes    *float64
	ObservedCostBeforeVolume   *float64
	ObservedCostAfter          *float64
	ObservedCostAfterBytes     *float64
	ObservedCostAfterVolume    *float64
	ObservedVolumeBefore       *float64
	ObservedVolumeAfter        *float64
	ObservedBytesBefore        *float64
	ObservedBytesAfter         *float64
	TotalCostPerHour           *float64
	TotalCostPerHourBytes      *float64
	TotalCostPerHourVolume     *float64
	TotalVolumePerHour         *float64
	TotalBytesPerHour          *float64
	TotalServiceVolumePerHour  *float64
	TotalServiceCostPerHour    *float64
}

type GetPolicyCardRow added in v1.18.0

type GetPolicyCardRow struct {
	PolicyID                   string
	ServiceName                string
	LogEventName               string
	Category                   string
	CategoryType               string
	Action                     string
	Status                     string
	VolumePerHour              *float64
	BytesPerHour               *float64
	EstimatedCostPerHour       *float64
	EstimatedVolumePerHour     *float64
	EstimatedBytesPerHour      *float64
	Severity                   string
	SurvivalRate               *float64
	CategoryDisplayName        string
	Analysis                   string
	Examples                   string
	EventBaselineAvgBytes      *float64
	EventBaselineVolumePerHour *float64
	LogEventID                 string
}

type InsertConversationParams

type InsertConversationParams struct {
	ID          *string
	AccountID   *string
	WorkspaceID *string
	CreatedAt   *string
	UpdatedAt   *string
}

type InsertMessageParams

type InsertMessageParams struct {
	ID             *string
	AccountID      *string
	Content        *string
	ConversationID *string
	CreatedAt      *string
	Model          *string
	Role           *string
	StopReason     *string
}

type ListAllServiceStatusesRow added in v1.15.0

type ListAllServiceStatusesRow struct {
	ServiceName                            *string
	Health                                 string
	LogEventCount                          int64
	LogEventAnalyzedCount                  int64
	PolicyPendingCount                     int64
	PolicyApprovedCount                    int64
	PolicyDismissedCount                   int64
	PolicyPendingCriticalCount             int64
	PolicyPendingHighCount                 int64
	PolicyPendingMediumCount               int64
	PolicyPendingLowCount                  int64
	ServiceVolumePerHour                   *float64
	ServiceDebugVolumePerHour              *float64
	ServiceInfoVolumePerHour               *float64
	ServiceWarnVolumePerHour               *float64
	ServiceErrorVolumePerHour              *float64
	ServiceOtherVolumePerHour              *float64
	ServiceCostPerHourVolumeUsd            *float64
	LogEventVolumePerHour                  *float64
	LogEventBytesPerHour                   *float64
	LogEventCostPerHourUsd                 *float64
	LogEventCostPerHourBytesUsd            *float64
	LogEventCostPerHourVolumeUsd           *float64
	EstimatedVolumeReductionPerHour        *float64
	EstimatedBytesReductionPerHour         *float64
	EstimatedCostReductionPerHourUsd       *float64
	EstimatedCostReductionPerHourBytesUsd  *float64
	EstimatedCostReductionPerHourVolumeUsd *float64
	ObservedVolumePerHourBefore            *float64
	ObservedVolumePerHourAfter             *float64
	ObservedBytesPerHourBefore             *float64
	ObservedBytesPerHourAfter              *float64
	ObservedCostPerHourBeforeUsd           *float64
	ObservedCostPerHourBeforeBytesUsd      *float64
	ObservedCostPerHourBeforeVolumeUsd     *float64
	ObservedCostPerHourAfterUsd            *float64
	ObservedCostPerHourAfterBytesUsd       *float64
	ObservedCostPerHourAfterVolumeUsd      *float64
}

type ListCategoryStatusesByCostAndTypeRow added in v1.18.0

type ListCategoryStatusesByCostAndTypeRow struct {
	Category                               string
	CategoryType                           string
	PolicyAction                           string
	DisplayName                            string
	Principle                              string
	PendingCount                           int64
	ApprovedCount                          int64
	DismissedCount                         int64
	EstimatedVolumeReductionPerHour        *float64
	EstimatedBytesReductionPerHour         *float64
	EstimatedCostReductionPerHourUsd       *float64
	EstimatedCostReductionPerHourBytesUsd  *float64
	EstimatedCostReductionPerHourVolumeUsd *float64
	EventsWithVolumes                      int64
	TotalEventCount                        int64
	PolicyPendingCriticalCount             int64
	PolicyPendingHighCount                 int64
	PolicyPendingMediumCount               int64
	PolicyPendingLowCount                  int64
}

type ListEnabledServiceStatusesRow added in v1.15.0

type ListEnabledServiceStatusesRow struct {
	ServiceName                            *string
	Health                                 string
	LogEventCount                          int64
	LogEventAnalyzedCount                  int64
	PolicyPendingCount                     int64
	PolicyApprovedCount                    int64
	PolicyDismissedCount                   int64
	PolicyPendingCriticalCount             int64
	PolicyPendingHighCount                 int64
	PolicyPendingMediumCount               int64
	PolicyPendingLowCount                  int64
	ServiceVolumePerHour                   *float64
	ServiceDebugVolumePerHour              *float64
	ServiceInfoVolumePerHour               *float64
	ServiceWarnVolumePerHour               *float64
	ServiceErrorVolumePerHour              *float64
	ServiceOtherVolumePerHour              *float64
	ServiceCostPerHourVolumeUsd            *float64
	LogEventVolumePerHour                  *float64
	LogEventBytesPerHour                   *float64
	LogEventCostPerHourUsd                 *float64
	LogEventCostPerHourBytesUsd            *float64
	LogEventCostPerHourVolumeUsd           *float64
	EstimatedVolumeReductionPerHour        *float64
	EstimatedBytesReductionPerHour         *float64
	EstimatedCostReductionPerHourUsd       *float64
	EstimatedCostReductionPerHourBytesUsd  *float64
	EstimatedCostReductionPerHourVolumeUsd *float64
	ObservedVolumePerHourBefore            *float64
	ObservedVolumePerHourAfter             *float64
	ObservedBytesPerHourBefore             *float64
	ObservedBytesPerHourAfter              *float64
	ObservedCostPerHourBeforeUsd           *float64
	ObservedCostPerHourBeforeBytesUsd      *float64
	ObservedCostPerHourBeforeVolumeUsd     *float64
	ObservedCostPerHourAfterUsd            *float64
	ObservedCostPerHourAfterBytesUsd       *float64
	ObservedCostPerHourAfterVolumeUsd      *float64
}

type ListFieldsByLogEventRow added in v1.18.0

type ListFieldsByLogEventRow struct {
	FieldPath        string
	BaselineAvgBytes *float64
}

type ListLogEventStatusesByServiceParams added in v1.17.0

type ListLogEventStatusesByServiceParams struct {
	Name  *string
	Limit int64
}

type ListLogEventStatusesByServiceRow added in v1.17.0

type ListLogEventStatusesByServiceRow struct {
	LogEventName               string
	VolumePerHour              *float64
	BytesPerHour               *float64
	CostPerHourUsd             *float64
	PendingPolicyCount         int64
	ApprovedPolicyCount        int64
	PolicyPendingCriticalCount int64
	PolicyPendingHighCount     int64
	PolicyPendingMediumCount   int64
	PolicyPendingLowCount      int64
}

type ListPendingCompliancePoliciesByCategoryParams added in v1.16.0

type ListPendingCompliancePoliciesByCategoryParams struct {
	Category *string
	Limit    int64
}

type ListPendingCompliancePoliciesByCategoryRow added in v1.16.0

type ListPendingCompliancePoliciesByCategoryRow struct {
	ServiceName   string
	LogEventName  string
	Analysis      string
	VolumePerHour *float64
	AnyObserved   int64
}

type ListPendingPIIPoliciesRow added in v1.15.0

type ListPendingPIIPoliciesRow struct {
	ServiceName   string
	LogEventName  string
	Analysis      string
	VolumePerHour *float64
	AnyObserved   int64
}

type ListTopPendingPoliciesByCategoryParams added in v1.15.0

type ListTopPendingPoliciesByCategoryParams struct {
	Category *string
	Limit    int64
}

type ListTopPendingPoliciesByCategoryRow added in v1.15.0

type ListTopPendingPoliciesByCategoryRow struct {
	ServiceName                string
	LogEventName               string
	VolumePerHour              *float64
	BytesPerHour               *float64
	EstimatedCostPerHour       *float64
	EstimatedCostPerHourBytes  *float64
	EstimatedCostPerHourVolume *float64
	EstimatedBytesPerHour      *float64
	EstimatedVolumePerHour     *float64
}

type LogEvent

type LogEvent struct {
	ID                    *string
	AccountID             *string
	BaselineAvgBytes      *float64
	BaselineVolumePerHour *float64
	CreatedAt             *string
	Description           *string
	EventNature           *string
	Examples              *string
	Matchers              *string
	Name                  *string
	ServiceID             *string
	Severity              *string
	SignalPurpose         *string
	UpdatedAt             *string
}

type LogEventField added in v1.16.0

type LogEventField struct {
	ID                     *string
	AccountID              *string
	BaselineAvgBytes       *float64
	CreatedAt              *string
	DistributionObservedAt *string
	FieldPath              *string
	LastSeenAt             *string
	LogEventID             *string
	ValueDistribution      *string
}

type LogEventPolicy

type LogEventPolicy struct {
	ID                            *string
	AccountID                     *string
	Action                        *string
	Analysis                      *string
	ApprovedAt                    *string
	ApprovedBaselineAvgBytes      *float64
	ApprovedBaselineVolumePerHour *float64
	ApprovedBy                    *string
	Category                      *string
	CategoryType                  *string
	CreatedAt                     *string
	DismissedAt                   *string
	DismissedBy                   *string
	LogEventID                    *string
	Severity                      *string
	Subjective                    *int64
	UpdatedAt                     *string
	WorkspaceID                   *string
}

type LogEventPolicyCategoryStatusesCache added in v1.18.0

type LogEventPolicyCategoryStatusesCache struct {
	ID                                     *string
	AccountID                              *string
	Action                                 *string
	ApprovedCount                          *int64
	Boundary                               *string
	Category                               *string
	CategoryType                           *string
	DismissedCount                         *int64
	DisplayName                            *string
	EstimatedBytesReductionPerHour         *float64
	EstimatedCostReductionPerHourBytesUsd  *float64
	EstimatedCostReductionPerHourUsd       *float64
	EstimatedCostReductionPerHourVolumeUsd *float64
	EstimatedVolumeReductionPerHour        *float64
	EventsWithVolumes                      *int64
	PendingCount                           *int64
	PolicyPendingCriticalCount             *int64
	PolicyPendingHighCount                 *int64
	PolicyPendingLowCount                  *int64
	PolicyPendingMediumCount               *int64
	Principle                              *string
	RefreshedAt                            *string
	Subjective                             *int64
	TotalEventCount                        *int64
}

type LogEventPolicyStatusesCache

type LogEventPolicyStatusesCache struct {
	ID                                     *string
	AccountID                              *string
	Action                                 *string
	ApprovedAt                             *string
	BytesPerHour                           *float64
	Category                               *string
	CategoryType                           *string
	CreatedAt                              *string
	DismissedAt                            *string
	EstimatedBytesReductionPerHour         *float64
	EstimatedCostReductionPerHourBytesUsd  *float64
	EstimatedCostReductionPerHourUsd       *float64
	EstimatedCostReductionPerHourVolumeUsd *float64
	EstimatedVolumeReductionPerHour        *float64
	LogEventID                             *string
	LogEventName                           *string
	PolicyID                               *string
	RefreshedAt                            *string
	ServiceID                              *string
	ServiceName                            *string
	Severity                               *string
	Status                                 *string
	Subjective                             *int64
	SurvivalRate                           *float64
	VolumePerHour                          *float64
	WorkspaceID                            *string
}

type LogEventStatusesCache

type LogEventStatusesCache struct {
	ID                                     *string
	AccountID                              *string
	ApprovedPolicyCount                    *int64
	BytesPerHour                           *float64
	CostPerHourBytesUsd                    *float64
	CostPerHourUsd                         *float64
	CostPerHourVolumeUsd                   *float64
	DismissedPolicyCount                   *int64
	EstimatedBytesReductionPerHour         *float64
	EstimatedCostReductionPerHourBytesUsd  *float64
	EstimatedCostReductionPerHourUsd       *float64
	EstimatedCostReductionPerHourVolumeUsd *float64
	EstimatedVolumeReductionPerHour        *float64
	HasBeenAnalyzed                        *int64
	HasVolumes                             *int64
	LogEventID                             *string
	ObservedBytesPerHourAfter              *float64
	ObservedBytesPerHourBefore             *float64
	ObservedCostPerHourAfterBytesUsd       *float64
	ObservedCostPerHourAfterUsd            *float64
	ObservedCostPerHourAfterVolumeUsd      *float64
	ObservedCostPerHourBeforeBytesUsd      *float64
	ObservedCostPerHourBeforeUsd           *float64
	ObservedCostPerHourBeforeVolumeUsd     *float64
	ObservedVolumePerHourAfter             *float64
	ObservedVolumePerHourBefore            *float64
	PendingPolicyCount                     *int64
	PolicyCount                            *int64
	PolicyPendingCriticalCount             *int64
	PolicyPendingHighCount                 *int64
	PolicyPendingLowCount                  *int64
	PolicyPendingMediumCount               *int64
	RefreshedAt                            *string
	ServiceID                              *string
	VolumePerHour                          *float64
}

type Message

type Message struct {
	ID             *string
	AccountID      *string
	Content        *string
	ConversationID *string
	CreatedAt      *string
	Model          *string
	Role           *string
	StopReason     *string
}

type Querier

type Querier interface {
	ApproveLogEventPolicy(ctx context.Context, arg ApproveLogEventPolicyParams) error
	CountConversations(ctx context.Context) (int64, error)
	CountFixedPIIPolicies(ctx context.Context) (int64, error)
	CountLogEventPolicies(ctx context.Context) (int64, error)
	CountLogEvents(ctx context.Context) (int64, error)
	CountMessages(ctx context.Context) (int64, error)
	CountMessagesByConversation(ctx context.Context, conversationID *string) (int64, error)
	// Returns, per compliance category, how many pending policies have observed (leaking) data.
	CountObservedPoliciesByComplianceCategory(ctx context.Context) ([]CountObservedPoliciesByComplianceCategoryRow, error)
	CountServices(ctx context.Context) (int64, error)
	DeleteMessage(ctx context.Context, id *string) error
	DismissLogEventPolicy(ctx context.Context, arg DismissLogEventPolicyParams) error
	GetAccountSummary(ctx context.Context) (GetAccountSummaryRow, error)
	GetConversation(ctx context.Context, id *string) (Conversation, error)
	GetLatestConversationByAccount(ctx context.Context, accountID *string) (Conversation, error)
	GetLatestMessageByConversation(ctx context.Context, conversationID *string) (Message, error)
	GetMessage(ctx context.Context, id *string) (Message, error)
	// Fetches a single policy with all context needed for rich card rendering.
	// Main table: log_event_policy_statuses_cache (denormalized policy + metrics).
	// JOINs enrich with: category display name, AI analysis, log examples, baselines.
	GetPolicyCard(ctx context.Context, policyID *string) (GetPolicyCardRow, error)
	GetService(ctx context.Context, id *string) (Service, error)
	InsertConversation(ctx context.Context, arg InsertConversationParams) error
	InsertMessage(ctx context.Context, arg InsertMessageParams) error
	ListAllServiceStatuses(ctx context.Context) ([]ListAllServiceStatusesRow, error)
	// Pre-computed per-category rollup filtered by category_type (waste or compliance).
	ListCategoryStatusesByCostAndType(ctx context.Context, categoryType *string) ([]ListCategoryStatusesByCostAndTypeRow, error)
	ListConversationsByAccount(ctx context.Context, accountID *string) ([]Conversation, error)
	ListEnabledServiceStatuses(ctx context.Context, rowLimit int64) ([]ListEnabledServiceStatusesRow, error)
	// Returns per-field metadata for a log event, used to show per-field byte impact
	// in quality policies (instrumentation_bloat, oversized_fields, duplicate_fields).
	ListFieldsByLogEvent(ctx context.Context, logEventID *string) ([]ListFieldsByLogEventRow, error)
	ListLogEventStatusesByService(ctx context.Context, arg ListLogEventStatusesByServiceParams) ([]ListLogEventStatusesByServiceRow, error)
	ListMessagesByConversation(ctx context.Context, conversationID *string) ([]Message, error)
	ListMessagesByConversationDesc(ctx context.Context, conversationID *string) ([]Message, error)
	// Compliance policy queries for PII, Secrets, PHI, and Payment Data leakage.
	// Returns pending compliance policies for a specific category, sorted by observed then volume.
	ListPendingCompliancePoliciesByCategory(ctx context.Context, arg ListPendingCompliancePoliciesByCategoryParams) ([]ListPendingCompliancePoliciesByCategoryRow, error)
	ListPendingPIIPolicies(ctx context.Context) ([]ListPendingPIIPoliciesRow, error)
	ListServices(ctx context.Context) ([]Service, error)
	ListServicesByAccount(ctx context.Context, accountID *string) ([]Service, error)
	ListTopPendingPoliciesByCategory(ctx context.Context, arg ListTopPendingPoliciesByCategoryParams) ([]ListTopPendingPoliciesByCategoryRow, error)
	SetServiceEnabled(ctx context.Context, arg SetServiceEnabledParams) error
	UpdateConversationTitle(ctx context.Context, arg UpdateConversationTitleParams) error
	UpdateMessageContent(ctx context.Context, arg UpdateMessageContentParams) error
	UpdateMessageMeta(ctx context.Context, arg UpdateMessageMetaParams) error
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) ApproveLogEventPolicy added in v1.21.0

func (q *Queries) ApproveLogEventPolicy(ctx context.Context, arg ApproveLogEventPolicyParams) error

func (*Queries) CountConversations

func (q *Queries) CountConversations(ctx context.Context) (int64, error)

func (*Queries) CountFixedPIIPolicies added in v1.15.0

func (q *Queries) CountFixedPIIPolicies(ctx context.Context) (int64, error)

func (*Queries) CountLogEventPolicies

func (q *Queries) CountLogEventPolicies(ctx context.Context) (int64, error)

func (*Queries) CountLogEvents

func (q *Queries) CountLogEvents(ctx context.Context) (int64, error)

func (*Queries) CountMessages

func (q *Queries) CountMessages(ctx context.Context) (int64, error)

func (*Queries) CountMessagesByConversation

func (q *Queries) CountMessagesByConversation(ctx context.Context, conversationID *string) (int64, error)

func (*Queries) CountObservedPoliciesByComplianceCategory added in v1.22.0

func (q *Queries) CountObservedPoliciesByComplianceCategory(ctx context.Context) ([]CountObservedPoliciesByComplianceCategoryRow, error)

Returns, per compliance category, how many pending policies have observed (leaking) data.

func (*Queries) CountServices

func (q *Queries) CountServices(ctx context.Context) (int64, error)

func (*Queries) DeleteMessage added in v1.14.0

func (q *Queries) DeleteMessage(ctx context.Context, id *string) error

func (*Queries) DismissLogEventPolicy added in v1.21.0

func (q *Queries) DismissLogEventPolicy(ctx context.Context, arg DismissLogEventPolicyParams) error

func (*Queries) GetAccountSummary added in v1.14.0

func (q *Queries) GetAccountSummary(ctx context.Context) (GetAccountSummaryRow, error)

func (*Queries) GetConversation

func (q *Queries) GetConversation(ctx context.Context, id *string) (Conversation, error)

func (*Queries) GetLatestConversationByAccount

func (q *Queries) GetLatestConversationByAccount(ctx context.Context, accountID *string) (Conversation, error)

func (*Queries) GetLatestMessageByConversation

func (q *Queries) GetLatestMessageByConversation(ctx context.Context, conversationID *string) (Message, error)

func (*Queries) GetMessage

func (q *Queries) GetMessage(ctx context.Context, id *string) (Message, error)

func (*Queries) GetPolicyCard added in v1.18.0

func (q *Queries) GetPolicyCard(ctx context.Context, policyID *string) (GetPolicyCardRow, error)

Fetches a single policy with all context needed for rich card rendering. Main table: log_event_policy_statuses_cache (denormalized policy + metrics). JOINs enrich with: category display name, AI analysis, log examples, baselines.

func (*Queries) GetService

func (q *Queries) GetService(ctx context.Context, id *string) (Service, error)

func (*Queries) InsertConversation

func (q *Queries) InsertConversation(ctx context.Context, arg InsertConversationParams) error

func (*Queries) InsertMessage

func (q *Queries) InsertMessage(ctx context.Context, arg InsertMessageParams) error

func (*Queries) ListAllServiceStatuses added in v1.15.0

func (q *Queries) ListAllServiceStatuses(ctx context.Context) ([]ListAllServiceStatusesRow, error)

func (*Queries) ListCategoryStatusesByCostAndType added in v1.18.0

func (q *Queries) ListCategoryStatusesByCostAndType(ctx context.Context, categoryType *string) ([]ListCategoryStatusesByCostAndTypeRow, error)

Pre-computed per-category rollup filtered by category_type (waste or compliance).

func (*Queries) ListConversationsByAccount

func (q *Queries) ListConversationsByAccount(ctx context.Context, accountID *string) ([]Conversation, error)

func (*Queries) ListEnabledServiceStatuses added in v1.15.0

func (q *Queries) ListEnabledServiceStatuses(ctx context.Context, rowLimit int64) ([]ListEnabledServiceStatusesRow, error)

func (*Queries) ListFieldsByLogEvent added in v1.18.0

func (q *Queries) ListFieldsByLogEvent(ctx context.Context, logEventID *string) ([]ListFieldsByLogEventRow, error)

Returns per-field metadata for a log event, used to show per-field byte impact in quality policies (instrumentation_bloat, oversized_fields, duplicate_fields).

func (*Queries) ListLogEventStatusesByService added in v1.17.0

func (q *Queries) ListLogEventStatusesByService(ctx context.Context, arg ListLogEventStatusesByServiceParams) ([]ListLogEventStatusesByServiceRow, error)

func (*Queries) ListMessagesByConversation

func (q *Queries) ListMessagesByConversation(ctx context.Context, conversationID *string) ([]Message, error)

func (*Queries) ListMessagesByConversationDesc

func (q *Queries) ListMessagesByConversationDesc(ctx context.Context, conversationID *string) ([]Message, error)

func (*Queries) ListPendingCompliancePoliciesByCategory added in v1.16.0

Compliance policy queries for PII, Secrets, PHI, and Payment Data leakage. Returns pending compliance policies for a specific category, sorted by observed then volume.

func (*Queries) ListPendingPIIPolicies added in v1.15.0

func (q *Queries) ListPendingPIIPolicies(ctx context.Context) ([]ListPendingPIIPoliciesRow, error)

func (*Queries) ListServices

func (q *Queries) ListServices(ctx context.Context) ([]Service, error)

func (*Queries) ListServicesByAccount

func (q *Queries) ListServicesByAccount(ctx context.Context, accountID *string) ([]Service, error)

func (*Queries) ListTopPendingPoliciesByCategory added in v1.15.0

func (*Queries) SetServiceEnabled added in v1.15.0

func (q *Queries) SetServiceEnabled(ctx context.Context, arg SetServiceEnabledParams) error

func (*Queries) UpdateConversationTitle

func (q *Queries) UpdateConversationTitle(ctx context.Context, arg UpdateConversationTitleParams) error

func (*Queries) UpdateMessageContent

func (q *Queries) UpdateMessageContent(ctx context.Context, arg UpdateMessageContentParams) error

func (*Queries) UpdateMessageMeta

func (q *Queries) UpdateMessageMeta(ctx context.Context, arg UpdateMessageMetaParams) error

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

type Service

type Service struct {
	ID                    *string
	AccountID             *string
	CreatedAt             *string
	Description           *string
	Enabled               *int64
	InitialWeeklyLogCount *int64
	Name                  *string
	UpdatedAt             *string
}

type ServiceStatusesCache

type ServiceStatusesCache struct {
	ID                                     *string
	AccountID                              *string
	DatadogAccountID                       *string
	EstimatedBytesReductionPerHour         *float64
	EstimatedCostReductionPerHourBytesUsd  *float64
	EstimatedCostReductionPerHourUsd       *float64
	EstimatedCostReductionPerHourVolumeUsd *float64
	EstimatedVolumeReductionPerHour        *float64
	Health                                 *string
	LogEventAnalyzedCount                  *int64
	LogEventBytesPerHour                   *float64
	LogEventCostPerHourBytesUsd            *float64
	LogEventCostPerHourUsd                 *float64
	LogEventCostPerHourVolumeUsd           *float64
	LogEventCount                          *int64
	LogEventVolumePerHour                  *float64
	ObservedBytesPerHourAfter              *float64
	ObservedBytesPerHourBefore             *float64
	ObservedCostPerHourAfterBytesUsd       *float64
	ObservedCostPerHourAfterUsd            *float64
	ObservedCostPerHourAfterVolumeUsd      *float64
	ObservedCostPerHourBeforeBytesUsd      *float64
	ObservedCostPerHourBeforeUsd           *float64
	ObservedCostPerHourBeforeVolumeUsd     *float64
	ObservedVolumePerHourAfter             *float64
	ObservedVolumePerHourBefore            *float64
	PolicyApprovedCount                    *int64
	PolicyDismissedCount                   *int64
	PolicyPendingCount                     *int64
	PolicyPendingCriticalCount             *int64
	PolicyPendingHighCount                 *int64
	PolicyPendingLowCount                  *int64
	PolicyPendingMediumCount               *int64
	RefreshedAt                            *string
	ServiceCostPerHourVolumeUsd            *float64
	ServiceDebugVolumePerHour              *float64
	ServiceErrorVolumePerHour              *float64
	ServiceID                              *string
	ServiceInfoVolumePerHour               *float64
	ServiceOtherVolumePerHour              *float64
	ServiceVolumePerHour                   *float64
	ServiceWarnVolumePerHour               *float64
}

type SetServiceEnabledParams added in v1.15.0

type SetServiceEnabledParams struct {
	Enabled *int64
	ID      *string
}

type Team

type Team struct {
	ID          *string
	AccountID   *string
	CreatedAt   *string
	Name        *string
	UpdatedAt   *string
	WorkspaceID *string
}

type UpdateConversationTitleParams

type UpdateConversationTitleParams struct {
	Title     *string
	UpdatedAt *string
	ID        *string
}

type UpdateMessageContentParams

type UpdateMessageContentParams struct {
	Content *string
	ID      *string
}

type UpdateMessageMetaParams

type UpdateMessageMetaParams struct {
	Model      *string
	StopReason *string
	ID         *string
}

type View

type View struct {
	ID             *string
	AccountID      *string
	ConversationID *string
	CreatedAt      *string
	CreatedBy      *string
	EntityType     *string
	ForkedFromID   *string
	MessageID      *string
	Query          *string
}

type ViewFavorite

type ViewFavorite struct {
	ID        *string
	AccountID *string
	CreatedAt *string
	UserID    *string
	ViewID    *string
}

type Workspace

type Workspace struct {
	ID        *string
	AccountID *string
	CreatedAt *string
	Name      *string
	Purpose   *string
	UpdatedAt *string
}

Jump to

Keyboard shortcuts

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