metrics

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ColumnTraceID       = "trace_id"
	ColumnGatewayID     = "gateway_id"
	ColumnTenantID      = "tenant_id"
	ColumnOccurredOn    = "occurred_on"
	ColumnSchemaVersion = "schema_version"
	ColumnRequestBody   = "request_body"
	ColumnResponseBody  = "response_body"
	ColumnCreatedAt     = "created_at"
)
View Source
const MigrationVersionTable = migrations.VersionTableName
View Source
const MigrationVersionTableDDL = migrations.VersionTableDDL
View Source
const SchemaVersion = 2
View Source
const TableName = "trustgate_data"

Variables

This section is empty.

Functions

func InsertColumns

func InsertColumns() []string

func ReadColumns

func ReadColumns() []string

Types

type Column

type Column struct {
	Name     string
	Type     ColumnType
	Nullable bool
}

Column describes one field of the metrics contract: its name, logical type, and whether it is nullable. It is the shared source of truth consumers use to derive or validate per-dialect DDL.

func RawColumns

func RawColumns() []Column

RawColumns returns the full raw-record column contract in write order.

type ColumnType

type ColumnType string

ColumnType is the dialect-agnostic logical type of a metrics column. Consumers map it to their storage engine's concrete type.

const (
	ColumnTypeString    ColumnType = "string"
	ColumnTypeInt64     ColumnType = "int64"
	ColumnTypeInt32     ColumnType = "int32"
	ColumnTypeTimestamp ColumnType = "timestamp"
)

type DataClass

type DataClass string
const (
	Metadata DataClass = "metadata"
	Raw      DataClass = "raw"
)

type Migration

type Migration = migrations.Migration

func Migrations

func Migrations() []Migration

type SensibleRecord

type SensibleRecord struct {
	TraceID       string  `db:"trace_id" json:"trace_id"`
	GatewayID     string  `db:"gateway_id" json:"gateway_id"`
	TenantID      *string `db:"tenant_id" json:"tenant_id,omitempty"`
	OccurredOn    int64   `db:"occurred_on" json:"occurred_on"`
	SchemaVersion int     `db:"schema_version" json:"schema_version"`
	RequestBody   string  `db:"request_body" json:"request_body"`
	ResponseBody  *string `db:"response_body" json:"response_body,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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