gen

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 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 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 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
	LogActiveServices                         *int64
	LogAnalyzedCount                          *int64
	LogAnalyzingCount                         *int64
	LogAnalyzingServices                      *int64
	LogApprovedPolicyCount                    *int64
	LogBrokenServices                         *int64
	LogBytesPerHour                           *float64
	LogCleanCount                             *int64
	LogCostPerHourBytesUsd                    *float64
	LogCostPerHourUsd                         *float64
	LogCostPerHourVolumeUsd                   *float64
	LogDisabledServices                       *int64
	LogDiscoveredVolumeInWindow               *int64
	LogDiscoveringCount                       *int64
	LogDiscoveringServices                    *int64
	LogDismissedPolicyCount                   *int64
	LogError                                  *string
	LogErrorAt                                *string
	LogEstimablePolicyCount                   *int64
	LogEstimatedBytesReductionPerHour         *float64
	LogEstimatedCostReductionPerHourBytesUsd  *float64
	LogEstimatedCostReductionPerHourUsd       *float64
	LogEstimatedCostReductionPerHourVolumeUsd *float64
	LogEstimatedVolumeReductionPerHour        *float64
	LogEventCount                             *int64
	LogInactiveServices                       *int64
	LogObservedBytesPerHourAfter              *float64
	LogObservedBytesPerHourBefore             *float64
	LogObservedCostPerHourAfterBytesUsd       *float64
	LogObservedCostPerHourAfterUsd            *float64
	LogObservedCostPerHourAfterVolumeUsd      *float64
	LogObservedCostPerHourBeforeBytesUsd      *float64
	LogObservedCostPerHourBeforeUsd           *float64
	LogObservedCostPerHourBeforeVolumeUsd     *float64
	LogObservedVolumePerHourAfter             *float64
	LogObservedVolumePerHourBefore            *float64
	LogPendingCount                           *int64
	LogPendingPolicyCount                     *int64
	LogPercentComplete                        *float64
	LogPolicyCount                            *int64
	LogQuarantinedCount                       *int64
	LogReadyServices                          *int64
	LogResolvedCount                          *int64
	LogServiceCount                           *int64
	LogServiceVolumeInWindow                  *int64
	LogStaleServices                          *int64
	LogStatus                                 *string
	LogVolumePerHour                          *float64
	LogWarning                                *string
	LogWarningAt                              *string
	ReadyForUse                               *int64
	RefreshedAt                               *string
}

type DatadogLogIndex

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

type DiscoveryStatus

type DiscoveryStatus struct {
	ID                  *string
	AccountID           *string
	CompletedAt         *string
	ConsecutiveErrors   *int64
	ConsecutiveWarnings *int64
	CreatedAt           *string
	DatadogAccountID    *string
	DiscoveryType       *string
	LastError           *string
	LastErrorAt         *string
	LastWarning         *string
	LastWarningAt       *string
	ServiceID           *string
	StartedAt           *string
	UpdatedAt           *string
}

type GetAccountSummaryRow added in v1.14.0

type GetAccountSummaryRow struct {
	ReadyForUse                int64
	ServiceCount               int64
	ActiveServices             int64
	ReadyServices              int64
	BrokenServices             int64
	StaleServices              int64
	DiscoveringCount           int64
	AnalyzingCount             int64
	EventCount                 int64
	AnalyzedCount              int64
	CleanCount                 int64
	PendingCount               int64
	ResolvedCount              int64
	QuarantinedCount           int64
	PercentComplete            float64
	WorstStatus                string
	LogError                   interface{}
	PolicyCount                int64
	PendingPolicyCount         int64
	ApprovedPolicyCount        int64
	DismissedPolicyCount       int64
	EstimatedCostPerHour       *float64
	EstimatedCostPerHourBytes  *float64
	EstimatedCostPerHourVolume *float64
	EstimatedVolumePerHour     float64
	EstimatedBytesPerHour      float64
	ObservedCostBefore         *float64
	ObservedCostAfter          *float64
	ObservedVolumeBefore       float64
	ObservedVolumeAfter        float64
	TotalCostPerHour           *float64
	TotalVolumePerHour         float64
	TotalBytesPerHour          float64
}

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 ListPolicyCategoryStatusesRow

type ListPolicyCategoryStatusesRow struct {
	Category               string
	PendingCount           int64
	ApprovedCount          int64
	DismissedCount         int64
	EstimatedVolumePerHour *float64
	EstimatedBytesPerHour  *float64
	EstimatedCostPerHour   *float64
	RiskLevel              string
	Benefits               string
}

type ListServiceStatusesRow

type ListServiceStatusesRow struct {
	ServiceName        *string
	LogStatus          string
	LogError           string
	LogPercentComplete float64
	LogEventCount      int64
	LogAnalyzedCount   int64
	LogVolumePerHour   float64
	LogBytesPerHour    float64
	LogCostPerHourUsd  float64
}

type LogEvent

type LogEvent struct {
	ID          *string
	AccountID   *string
	AnalyzedAt  *string
	CreatedAt   *string
	Description *string
	Examples    *string
	Matchers    *string
	Name        *string
	ServiceID   *string
	UpdatedAt   *string
}

type LogEventPolicy

type LogEventPolicy struct {
	ID          *string
	AccountID   *string
	Analysis    *string
	ApprovedAt  *string
	ApprovedBy  *string
	Benefits    *string
	Category    *string
	CreatedAt   *string
	DismissedAt *string
	DismissedBy *string
	LogEventID  *string
	Model       *string
	Objectivity *string
	RiskLevel   *string
	UpdatedAt   *string
	WorkspaceID *string
}

type LogEventPolicyStatusesCache

type LogEventPolicyStatusesCache struct {
	ID                                     *string
	AccountID                              *string
	ApprovedAt                             *string
	Benefits                               *string
	Category                               *string
	CreatedAt                              *string
	DismissedAt                            *string
	EstimatedBytesReductionPerHour         *float64
	EstimatedCostReductionPerHourBytesUsd  *float64
	EstimatedCostReductionPerHourUsd       *float64
	EstimatedCostReductionPerHourVolumeUsd *float64
	EstimatedVolumeReductionPerHour        *float64
	LogEventID                             *string
	Objectivity                            *string
	PolicyID                               *string
	RefreshedAt                            *string
	RiskLevel                              *string
	Status                                 *string
	WorkspaceID                            *string
}

type LogEventStatusesCache

type LogEventStatusesCache struct {
	ID                                     *string
	AccountID                              *string
	ApprovedPolicyCount                    *int64
	BytesPerHour                           *float64
	CostPerHourBytesUsd                    *float64
	CostPerHourUsd                         *float64
	CostPerHourVolumeUsd                   *float64
	DatadogAccountID                       *string
	DismissedPolicyCount                   *int64
	Error                                  *string
	EstimablePolicyCount                   *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
	RefreshedAt                            *string
	ServiceID                              *string
	Status                                 *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 {
	CountConversations(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)
	CountServices(ctx context.Context) (int64, error)
	DeleteMessage(ctx context.Context, id *string) 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)
	GetService(ctx context.Context, id *string) (Service, error)
	InsertConversation(ctx context.Context, arg InsertConversationParams) error
	InsertMessage(ctx context.Context, arg InsertMessageParams) error
	ListConversationsByAccount(ctx context.Context, accountID *string) ([]Conversation, error)
	ListMessagesByConversation(ctx context.Context, conversationID *string) ([]Message, error)
	ListMessagesByConversationDesc(ctx context.Context, conversationID *string) ([]Message, error)
	ListPolicyCategoryStatuses(ctx context.Context) ([]ListPolicyCategoryStatusesRow, error)
	ListServiceStatuses(ctx context.Context) ([]ListServiceStatusesRow, error)
	ListServices(ctx context.Context) ([]Service, error)
	ListServicesByAccount(ctx context.Context, accountID *string) ([]Service, 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) CountConversations

func (q *Queries) CountConversations(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) 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) 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) 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) ListConversationsByAccount

func (q *Queries) ListConversationsByAccount(ctx context.Context, accountID *string) ([]Conversation, 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) ListPolicyCategoryStatuses

func (q *Queries) ListPolicyCategoryStatuses(ctx context.Context) ([]ListPolicyCategoryStatusesRow, error)

func (*Queries) ListServiceStatuses

func (q *Queries) ListServiceStatuses(ctx context.Context) ([]ListServiceStatusesRow, 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) 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
	LogAnalyzedCount                          *int64
	LogAnalyzingCount                         *int64
	LogApprovedPolicyCount                    *int64
	LogBytesPerHour                           *float64
	LogCleanCount                             *int64
	LogCostPerHourBytesUsd                    *float64
	LogCostPerHourUsd                         *float64
	LogCostPerHourVolumeUsd                   *float64
	LogDiscoveredVolumeInWindow               *int64
	LogDiscoveringCount                       *int64
	LogDismissedPolicyCount                   *int64
	LogError                                  *string
	LogErrorAt                                *string
	LogEstimablePolicyCount                   *int64
	LogEstimatedBytesReductionPerHour         *float64
	LogEstimatedCostReductionPerHourBytesUsd  *float64
	LogEstimatedCostReductionPerHourUsd       *float64
	LogEstimatedCostReductionPerHourVolumeUsd *float64
	LogEstimatedVolumeReductionPerHour        *float64
	LogEventCount                             *int64
	LogObservedBytesPerHourAfter              *float64
	LogObservedBytesPerHourBefore             *float64
	LogObservedCostPerHourAfterBytesUsd       *float64
	LogObservedCostPerHourAfterUsd            *float64
	LogObservedCostPerHourAfterVolumeUsd      *float64
	LogObservedCostPerHourBeforeBytesUsd      *float64
	LogObservedCostPerHourBeforeUsd           *float64
	LogObservedCostPerHourBeforeVolumeUsd     *float64
	LogObservedVolumePerHourAfter             *float64
	LogObservedVolumePerHourBefore            *float64
	LogPendingCount                           *int64
	LogPendingPolicyCount                     *int64
	LogPercentComplete                        *float64
	LogPolicyCount                            *int64
	LogQuarantinedCount                       *int64
	LogResolvedCount                          *int64
	LogServiceVolumeInWindow                  *int64
	LogStatus                                 *string
	LogVolumePerHour                          *float64
	LogWarning                                *string
	LogWarningAt                              *string
	RefreshedAt                               *string
	ServiceID                                 *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