Documentation
¶
Overview ¶
Package generated provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT.
Index ¶
- func GetSwagger() (swagger *openapi3.T, err error)
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- func RegisterHandlers(router fiber.Router, si ServerInterface)
- func RegisterHandlersWithOptions(router fiber.Router, si ServerInterface, options FiberServerOptions)
- type CoverageDetail
- type CoverageSummary
- type Error
- type ExternalBounds
- type ExternalModel
- type FiberServerOptions
- type InternalError
- type IntervalTypeTransformation
- type IntervalTypeTransformationFormat
- type ListAllModelsParams
- type ListAllModelsParamsType
- type ListExternalModelsParams
- type ListScheduledRunsParams
- type ListTransformationCoverageParams
- type ListTransformationsParams
- type ListTransformationsParamsStatus
- type ListTransformationsParamsType
- type MiddlewareFunc
- type ModelSummary
- type ModelSummaryType
- type NotFound
- type Range
- type ScheduledRun
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) GetExternalBounds(c fiber.Ctx) error
- func (siw *ServerInterfaceWrapper) GetExternalModel(c fiber.Ctx) error
- func (siw *ServerInterfaceWrapper) GetIntervalTypes(c fiber.Ctx) error
- func (siw *ServerInterfaceWrapper) GetScheduledRun(c fiber.Ctx) error
- func (siw *ServerInterfaceWrapper) GetTransformation(c fiber.Ctx) error
- func (siw *ServerInterfaceWrapper) GetTransformationCoverage(c fiber.Ctx) error
- func (siw *ServerInterfaceWrapper) ListAllModels(c fiber.Ctx) error
- func (siw *ServerInterfaceWrapper) ListExternalBounds(c fiber.Ctx) error
- func (siw *ServerInterfaceWrapper) ListExternalModels(c fiber.Ctx) error
- func (siw *ServerInterfaceWrapper) ListScheduledRuns(c fiber.Ctx) error
- func (siw *ServerInterfaceWrapper) ListTransformationCoverage(c fiber.Ctx) error
- func (siw *ServerInterfaceWrapper) ListTransformations(c fiber.Ctx) error
- type TransformationModel
- type TransformationModelBase
- type TransformationModelBaseContentType
- type TransformationModelBaseMetadataLastRunStatus
- type TransformationModelBaseType
- type TransformationModelContentType
- type TransformationModelMetadataLastRunStatus
- type TransformationModelType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSwagger ¶
GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.
func PathToRawSpec ¶
Constructs a synthetic filesystem for resolving external references when loading openapi specifications.
func RegisterHandlers ¶
func RegisterHandlers(router fiber.Router, si ServerInterface)
RegisterHandlers creates http.Handler with routing matching OpenAPI spec.
func RegisterHandlersWithOptions ¶
func RegisterHandlersWithOptions(router fiber.Router, si ServerInterface, options FiberServerOptions)
RegisterHandlersWithOptions creates http.Handler with additional options
Types ¶
type CoverageDetail ¶
type CoverageDetail struct {
// Id Fully qualified model ID (database.table)
Id string `json:"id"`
// Ranges All processed ranges from admin_incremental table
Ranges []Range `json:"ranges"`
}
CoverageDetail defines model for CoverageDetail.
type CoverageSummary ¶
type CoverageSummary struct {
// Id Fully qualified model ID (database.table)
Id string `json:"id"`
// Ranges Processed ranges from admin_incremental table
Ranges []Range `json:"ranges"`
}
CoverageSummary defines model for CoverageSummary.
type Error ¶
type Error struct {
// Code HTTP status code
Code int `json:"code"`
// Error Human-readable error message
Error string `json:"error"`
}
Error defines model for Error.
type ExternalBounds ¶
type ExternalBounds struct {
// Id Fully qualified model ID (database.table)
Id string `json:"id"`
// InitialScanComplete Whether initial scan is complete
InitialScanComplete *bool `json:"initial_scan_complete,omitempty"`
// InitialScanStarted Timestamp when initial scan started
InitialScanStarted *time.Time `json:"initial_scan_started,omitempty"`
// LastFullScan Timestamp of last full scan
LastFullScan *time.Time `json:"last_full_scan,omitempty"`
// LastIncrementalScan Timestamp of last incremental scan
LastIncrementalScan *time.Time `json:"last_incremental_scan,omitempty"`
// Max Maximum position in external source
Max int `json:"max"`
// Min Minimum position in external source
Min int `json:"min"`
// PreviousMax Previous maximum position (for tracking changes)
PreviousMax *int `json:"previous_max,omitempty"`
// PreviousMin Previous minimum position (for tracking changes)
PreviousMin *int `json:"previous_min,omitempty"`
}
ExternalBounds defines model for ExternalBounds.
type ExternalModel ¶
type ExternalModel struct {
// Cache Cache configuration for external source
Cache *struct {
// FullScanInterval Interval for full cache refresh
FullScanInterval *string `json:"full_scan_interval,omitempty"`
// IncrementalScanInterval Interval for incremental cache updates
IncrementalScanInterval *string `json:"incremental_scan_interval,omitempty"`
} `json:"cache,omitempty"`
Database string `json:"database"`
Description *string `json:"description,omitempty"`
// Id Fully qualified ID (database.table)
Id string `json:"id"`
// Interval Interval configuration for external source
Interval *struct {
// Type Type of interval (e.g., "second", "slot", "epoch", "block")
Type *string `json:"type,omitempty"`
} `json:"interval,omitempty"`
// Lag Number of blocks/slots to lag behind head
Lag *int `json:"lag,omitempty"`
// Metadata System-managed metadata
Metadata *struct {
CreatedAt *time.Time `json:"created_at,omitempty"`
LastSyncedAt *time.Time `json:"last_synced_at,omitempty"`
// RowCount Approximate row count in destination table
RowCount *int `json:"row_count,omitempty"`
// SizeBytes Approximate table size in bytes
SizeBytes *int `json:"size_bytes,omitempty"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
} `json:"metadata,omitempty"`
Table string `json:"table"`
}
ExternalModel defines model for ExternalModel.
type FiberServerOptions ¶
type FiberServerOptions struct {
BaseURL string
Middlewares []MiddlewareFunc
}
FiberServerOptions provides options for the Fiber server.
type IntervalTypeTransformation ¶
type IntervalTypeTransformation struct {
// Expression Optional CEL (Common Expression Language) expression to transform the value.
// Uses 'value' as the input variable.
// Supports math functions via math.* namespace (e.g., math.floor, math.ceil, math.round).
// If omitted, value is passed through unchanged (identity transformation).
Expression *string `json:"expression,omitempty"`
// Format Optional display format hint for the frontend.
// - datetime: Format as full date and time (e.g., "2024-01-15 14:30:00")
// - date: Format as date only (e.g., "2024-01-15")
// - time: Format as time only (e.g., "14:30:00")
// - duration: Format as human-readable duration (e.g., "2h 30m")
// - relative: Format as relative time (e.g., "2 hours ago")
// If omitted, value is displayed as a raw number.
Format *IntervalTypeTransformationFormat `json:"format,omitempty"`
// Name Display name for this transformation
Name string `json:"name"`
}
IntervalTypeTransformation A single transformation step for an interval type
type IntervalTypeTransformationFormat ¶
type IntervalTypeTransformationFormat string
IntervalTypeTransformationFormat Optional display format hint for the frontend. - datetime: Format as full date and time (e.g., "2024-01-15 14:30:00") - date: Format as date only (e.g., "2024-01-15") - time: Format as time only (e.g., "14:30:00") - duration: Format as human-readable duration (e.g., "2h 30m") - relative: Format as relative time (e.g., "2 hours ago") If omitted, value is displayed as a raw number.
const ( Date IntervalTypeTransformationFormat = "date" Datetime IntervalTypeTransformationFormat = "datetime" Duration IntervalTypeTransformationFormat = "duration" Relative IntervalTypeTransformationFormat = "relative" Time IntervalTypeTransformationFormat = "time" )
Defines values for IntervalTypeTransformationFormat.
type ListAllModelsParams ¶
type ListAllModelsParams struct {
// Type Filter by model type
Type *ListAllModelsParamsType `form:"type,omitempty" json:"type,omitempty"`
// Database Filter by database name
Database *string `form:"database,omitempty" json:"database,omitempty"`
// Search Search by model ID or description (case-insensitive)
Search *string `form:"search,omitempty" json:"search,omitempty"`
}
ListAllModelsParams defines parameters for ListAllModels.
type ListAllModelsParamsType ¶
type ListAllModelsParamsType string
ListAllModelsParamsType defines parameters for ListAllModels.
const ( ListAllModelsParamsTypeExternal ListAllModelsParamsType = "external" ListAllModelsParamsTypeTransformation ListAllModelsParamsType = "transformation" )
Defines values for ListAllModelsParamsType.
type ListExternalModelsParams ¶
type ListExternalModelsParams struct {
// Database Filter by database name
Database *string `form:"database,omitempty" json:"database,omitempty"`
}
ListExternalModelsParams defines parameters for ListExternalModels.
type ListScheduledRunsParams ¶
type ListScheduledRunsParams struct {
// Database Filter by database name
Database *string `form:"database,omitempty" json:"database,omitempty"`
}
ListScheduledRunsParams defines parameters for ListScheduledRuns.
type ListTransformationCoverageParams ¶
type ListTransformationCoverageParams struct {
// Database Filter by database name
Database *string `form:"database,omitempty" json:"database,omitempty"`
}
ListTransformationCoverageParams defines parameters for ListTransformationCoverage.
type ListTransformationsParams ¶
type ListTransformationsParams struct {
// Database Filter by database name
Database *string `form:"database,omitempty" json:"database,omitempty"`
// Type Filter by transformation type
Type *ListTransformationsParamsType `form:"type,omitempty" json:"type,omitempty"`
// Status Filter by last run status
Status *ListTransformationsParamsStatus `form:"status,omitempty" json:"status,omitempty"`
}
ListTransformationsParams defines parameters for ListTransformations.
type ListTransformationsParamsStatus ¶
type ListTransformationsParamsStatus string
ListTransformationsParamsStatus defines parameters for ListTransformations.
const ( Failed ListTransformationsParamsStatus = "failed" Pending ListTransformationsParamsStatus = "pending" Running ListTransformationsParamsStatus = "running" Success ListTransformationsParamsStatus = "success" )
Defines values for ListTransformationsParamsStatus.
type ListTransformationsParamsType ¶
type ListTransformationsParamsType string
ListTransformationsParamsType defines parameters for ListTransformations.
const ( Incremental ListTransformationsParamsType = "incremental" Scheduled ListTransformationsParamsType = "scheduled" )
Defines values for ListTransformationsParamsType.
type MiddlewareFunc ¶
type ModelSummary ¶
type ModelSummary struct {
Database string `json:"database"`
Description *string `json:"description,omitempty"`
// Id Fully qualified ID (database.table)
Id string `json:"id"`
Table string `json:"table"`
// Type Model type
Type ModelSummaryType `json:"type"`
}
ModelSummary Lightweight model representation for listings
type ModelSummaryType ¶
type ModelSummaryType string
ModelSummaryType Model type
const ( ModelSummaryTypeExternal ModelSummaryType = "external" ModelSummaryTypeTransformation ModelSummaryType = "transformation" )
Defines values for ModelSummaryType.
type Range ¶
type Range struct {
// Interval Size of processed range
Interval int `json:"interval"`
// Position Starting position of processed range
Position int `json:"position"`
}
Range defines model for Range.
type ScheduledRun ¶
type ScheduledRun struct {
// Id Fully qualified model ID (database.table)
Id string `json:"id"`
// LastRun Timestamp of last execution
LastRun *time.Time `json:"last_run,omitempty"`
}
ScheduledRun defines model for ScheduledRun.
type ServerInterface ¶
type ServerInterface interface {
// Get interval type transformations
// (GET /interval/types)
GetIntervalTypes(c fiber.Ctx) error
// List all models (lightweight)
// (GET /models)
ListAllModels(c fiber.Ctx, params ListAllModelsParams) error
// List external models
// (GET /models/external)
ListExternalModels(c fiber.Ctx, params ListExternalModelsParams) error
// List external model bounds
// (GET /models/external/bounds)
ListExternalBounds(c fiber.Ctx) error
// Get external model by ID
// (GET /models/external/{id})
GetExternalModel(c fiber.Ctx, id string) error
// Get external model bounds by ID
// (GET /models/external/{id}/bounds)
GetExternalBounds(c fiber.Ctx, id string) error
// List transformation models
// (GET /models/transformations)
ListTransformations(c fiber.Ctx, params ListTransformationsParams) error
// List transformation coverage
// (GET /models/transformations/coverage)
ListTransformationCoverage(c fiber.Ctx, params ListTransformationCoverageParams) error
// List scheduled transformation runs
// (GET /models/transformations/runs)
ListScheduledRuns(c fiber.Ctx, params ListScheduledRunsParams) error
// Get transformation model by ID
// (GET /models/transformations/{id})
GetTransformation(c fiber.Ctx, id string) error
// Get transformation coverage by ID
// (GET /models/transformations/{id}/coverage)
GetTransformationCoverage(c fiber.Ctx, id string) error
// Get scheduled transformation run by ID
// (GET /models/transformations/{id}/runs)
GetScheduledRun(c fiber.Ctx, id string) error
}
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) GetExternalBounds ¶
func (siw *ServerInterfaceWrapper) GetExternalBounds(c fiber.Ctx) error
GetExternalBounds operation middleware
func (*ServerInterfaceWrapper) GetExternalModel ¶
func (siw *ServerInterfaceWrapper) GetExternalModel(c fiber.Ctx) error
GetExternalModel operation middleware
func (*ServerInterfaceWrapper) GetIntervalTypes ¶
func (siw *ServerInterfaceWrapper) GetIntervalTypes(c fiber.Ctx) error
GetIntervalTypes operation middleware
func (*ServerInterfaceWrapper) GetScheduledRun ¶
func (siw *ServerInterfaceWrapper) GetScheduledRun(c fiber.Ctx) error
GetScheduledRun operation middleware
func (*ServerInterfaceWrapper) GetTransformation ¶
func (siw *ServerInterfaceWrapper) GetTransformation(c fiber.Ctx) error
GetTransformation operation middleware
func (*ServerInterfaceWrapper) GetTransformationCoverage ¶
func (siw *ServerInterfaceWrapper) GetTransformationCoverage(c fiber.Ctx) error
GetTransformationCoverage operation middleware
func (*ServerInterfaceWrapper) ListAllModels ¶
func (siw *ServerInterfaceWrapper) ListAllModels(c fiber.Ctx) error
ListAllModels operation middleware
func (*ServerInterfaceWrapper) ListExternalBounds ¶
func (siw *ServerInterfaceWrapper) ListExternalBounds(c fiber.Ctx) error
ListExternalBounds operation middleware
func (*ServerInterfaceWrapper) ListExternalModels ¶
func (siw *ServerInterfaceWrapper) ListExternalModels(c fiber.Ctx) error
ListExternalModels operation middleware
func (*ServerInterfaceWrapper) ListScheduledRuns ¶
func (siw *ServerInterfaceWrapper) ListScheduledRuns(c fiber.Ctx) error
ListScheduledRuns operation middleware
func (*ServerInterfaceWrapper) ListTransformationCoverage ¶
func (siw *ServerInterfaceWrapper) ListTransformationCoverage(c fiber.Ctx) error
ListTransformationCoverage operation middleware
func (*ServerInterfaceWrapper) ListTransformations ¶
func (siw *ServerInterfaceWrapper) ListTransformations(c fiber.Ctx) error
ListTransformations operation middleware
type TransformationModel ¶
type TransformationModel struct {
// Content SQL query or exec command defining the transformation
Content string `json:"content"`
// ContentType Execution method (SQL query or shell command)
ContentType TransformationModelContentType `json:"content_type"`
Database string `json:"database"`
// DependsOn Upstream model dependencies
DependsOn *[]string `json:"depends_on,omitempty"`
Description *string `json:"description,omitempty"`
// Id Fully qualified ID (database.table)
Id string `json:"id"`
// Interval Interval configuration (present when type=incremental)
Interval *struct {
// Max Maximum interval size
Max *int `json:"max,omitempty"`
// Min Minimum interval size
Min *int `json:"min,omitempty"`
// Type Type of interval (e.g., "second", "slot", "epoch", "block")
Type *string `json:"type,omitempty"`
} `json:"interval,omitempty"`
// Limits Limits (present when type=incremental)
Limits *struct {
// Max Maximum position limit
Max *int `json:"max,omitempty"`
// Min Minimum position limit
Min *int `json:"min,omitempty"`
} `json:"limits,omitempty"`
// Metadata System-managed metadata
Metadata *struct {
CreatedAt *time.Time `json:"created_at,omitempty"`
LastRunAt *time.Time `json:"last_run_at,omitempty"`
LastRunStatus *TransformationModelMetadataLastRunStatus `json:"last_run_status,omitempty"`
RowCount *int `json:"row_count,omitempty"`
SizeBytes *int `json:"size_bytes,omitempty"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
} `json:"metadata,omitempty"`
// Schedule Cron expression (present when type=scheduled)
Schedule *string `json:"schedule,omitempty"`
// Schedules Schedules (present when type=incremental)
Schedules *struct {
// Backfill Backfill schedule
Backfill *string `json:"backfill,omitempty"`
// Forwardfill Forward fill schedule
Forwardfill *string `json:"forwardfill,omitempty"`
} `json:"schedules,omitempty"`
Table string `json:"table"`
// Tags Tags for categorization
Tags *[]string `json:"tags,omitempty"`
// Type Transformation type (scheduled or incremental)
Type TransformationModelType `json:"type"`
}
TransformationModel defines model for TransformationModel.
type TransformationModelBase ¶
type TransformationModelBase struct {
// Content SQL query or exec command defining the transformation
Content string `json:"content"`
// ContentType Execution method (SQL query or shell command)
ContentType TransformationModelBaseContentType `json:"content_type"`
Database string `json:"database"`
// DependsOn Upstream model dependencies
DependsOn *[]string `json:"depends_on,omitempty"`
Description *string `json:"description,omitempty"`
// Id Fully qualified ID (database.table)
Id string `json:"id"`
// Metadata System-managed metadata
Metadata *struct {
CreatedAt *time.Time `json:"created_at,omitempty"`
LastRunAt *time.Time `json:"last_run_at,omitempty"`
LastRunStatus *TransformationModelBaseMetadataLastRunStatus `json:"last_run_status,omitempty"`
RowCount *int `json:"row_count,omitempty"`
SizeBytes *int `json:"size_bytes,omitempty"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
} `json:"metadata,omitempty"`
Table string `json:"table"`
// Tags Tags for categorization
Tags *[]string `json:"tags,omitempty"`
// Type Transformation type (scheduled or incremental)
Type TransformationModelBaseType `json:"type"`
}
TransformationModelBase defines model for TransformationModelBase.
type TransformationModelBaseContentType ¶
type TransformationModelBaseContentType string
TransformationModelBaseContentType Execution method (SQL query or shell command)
const ( TransformationModelBaseContentTypeExec TransformationModelBaseContentType = "exec" TransformationModelBaseContentTypeSql TransformationModelBaseContentType = "sql" )
Defines values for TransformationModelBaseContentType.
type TransformationModelBaseMetadataLastRunStatus ¶
type TransformationModelBaseMetadataLastRunStatus string
TransformationModelBaseMetadataLastRunStatus defines model for TransformationModelBase.Metadata.LastRunStatus.
const ( TransformationModelBaseMetadataLastRunStatusFailed TransformationModelBaseMetadataLastRunStatus = "failed" TransformationModelBaseMetadataLastRunStatusPending TransformationModelBaseMetadataLastRunStatus = "pending" TransformationModelBaseMetadataLastRunStatusRunning TransformationModelBaseMetadataLastRunStatus = "running" TransformationModelBaseMetadataLastRunStatusSuccess TransformationModelBaseMetadataLastRunStatus = "success" )
Defines values for TransformationModelBaseMetadataLastRunStatus.
type TransformationModelBaseType ¶
type TransformationModelBaseType string
TransformationModelBaseType Transformation type (scheduled or incremental)
const ( TransformationModelBaseTypeIncremental TransformationModelBaseType = "incremental" TransformationModelBaseTypeScheduled TransformationModelBaseType = "scheduled" )
Defines values for TransformationModelBaseType.
type TransformationModelContentType ¶
type TransformationModelContentType string
TransformationModelContentType Execution method (SQL query or shell command)
const ( TransformationModelContentTypeExec TransformationModelContentType = "exec" TransformationModelContentTypeSql TransformationModelContentType = "sql" )
Defines values for TransformationModelContentType.
type TransformationModelMetadataLastRunStatus ¶
type TransformationModelMetadataLastRunStatus string
TransformationModelMetadataLastRunStatus defines model for TransformationModel.Metadata.LastRunStatus.
const ( TransformationModelMetadataLastRunStatusFailed TransformationModelMetadataLastRunStatus = "failed" TransformationModelMetadataLastRunStatusPending TransformationModelMetadataLastRunStatus = "pending" TransformationModelMetadataLastRunStatusRunning TransformationModelMetadataLastRunStatus = "running" TransformationModelMetadataLastRunStatusSuccess TransformationModelMetadataLastRunStatus = "success" )
Defines values for TransformationModelMetadataLastRunStatus.
type TransformationModelType ¶
type TransformationModelType string
TransformationModelType Transformation type (scheduled or incremental)
const ( TransformationModelTypeIncremental TransformationModelType = "incremental" TransformationModelTypeScheduled TransformationModelType = "scheduled" )
Defines values for TransformationModelType.