db

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2025 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 Blueprint

type Blueprint struct {
	ID            interface{}
	BlueprintName string
	Config        string
	Version       sql.NullInt64
	CreatedAt     interface{}
	UpdatedAt     interface{}
	Metadata      interface{}
}

type CountLogsWithFiltersParams

type CountLogsWithFiltersParams struct {
	Level     interface{}
	TraceID   interface{}
	StartTime interface{}
	EndTime   interface{}
}

type CreateBlueprintParams

type CreateBlueprintParams struct {
	BlueprintName string
	Config        string
	Version       sql.NullInt64
	CreatedAt     interface{}
	UpdatedAt     interface{}
	Metadata      interface{}
}

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 GetBlueprintsParams

type GetBlueprintsParams struct {
	Limit  int64
	Offset int64
}

type GetLogsParams

type GetLogsParams struct {
	Limit  int64
	Offset int64
}

type GetLogsWithFiltersParams

type GetLogsWithFiltersParams struct {
	Level     interface{}
	TraceID   interface{}
	StartTime interface{}
	EndTime   interface{}
	Offset    int64
	Limit     int64
}

type GetRootSpansParams

type GetRootSpansParams struct {
	Limit  int64
	Offset int64
}

type GetRootSpansRow

type GetRootSpansRow struct {
	TraceID   string
	Name      string
	StartTime string
	EndTime   string
}

type GetTraceStatsRow

type GetTraceStatsRow struct {
	TraceID    string
	SpanCount  int64
	ErrorCount sql.NullFloat64
}

type InsertLogParams

type InsertLogParams struct {
	Timestamp  string
	Level      string
	Message    string
	TraceID    sql.NullString
	SpanID     sql.NullString
	Attributes sql.NullString
}

type InsertSpanParams

type InsertSpanParams struct {
	SpanID       string
	TraceID      string
	ParentSpanID sql.NullString
	Name         string
	StartTime    string
	EndTime      string
	DurationNs   int64
	Attributes   sql.NullString
	ServiceName  string
	HasError     bool
}

type Log

type Log struct {
	ID         int64
	Timestamp  string
	Level      string
	Message    string
	TraceID    sql.NullString
	SpanID     sql.NullString
	Attributes sql.NullString
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CountLogs

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

func (*Queries) CountLogsWithFilters

func (q *Queries) CountLogsWithFilters(ctx context.Context, arg CountLogsWithFiltersParams) (int64, error)

func (*Queries) CountTraces

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

func (*Queries) CreateBlueprint

func (q *Queries) CreateBlueprint(ctx context.Context, arg CreateBlueprintParams) error

func (*Queries) GetBlueprint

func (q *Queries) GetBlueprint(ctx context.Context, id interface{}) (Blueprint, error)

func (*Queries) GetBlueprints

func (q *Queries) GetBlueprints(ctx context.Context, arg GetBlueprintsParams) ([]Blueprint, error)

func (*Queries) GetLogs

func (q *Queries) GetLogs(ctx context.Context, arg GetLogsParams) ([]Log, error)

func (*Queries) GetLogsWithFilters

func (q *Queries) GetLogsWithFilters(ctx context.Context, arg GetLogsWithFiltersParams) ([]Log, error)

func (*Queries) GetRootSpans

func (q *Queries) GetRootSpans(ctx context.Context, arg GetRootSpansParams) ([]GetRootSpansRow, error)

func (*Queries) GetTraceDetails

func (q *Queries) GetTraceDetails(ctx context.Context, traceID string) ([]Span, error)

func (*Queries) GetTraceStats

func (q *Queries) GetTraceStats(ctx context.Context) ([]GetTraceStatsRow, error)

func (*Queries) InsertLog

func (q *Queries) InsertLog(ctx context.Context, arg InsertLogParams) error

func (*Queries) InsertSpan

func (q *Queries) InsertSpan(ctx context.Context, arg InsertSpanParams) error

func (*Queries) WithTx

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

type Span

type Span struct {
	SpanID       string
	TraceID      string
	ParentSpanID sql.NullString
	Name         string
	StartTime    string
	EndTime      string
	DurationNs   int64
	Attributes   sql.NullString
	ServiceName  string
	HasError     bool
}

Jump to

Keyboard shortcuts

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