Documentation
¶
Index ¶
- Constants
- Variables
- func LogQueryHookErrorHandler(db *bun.DB, hook bun.QueryHook, err error)
- func NewGroupedCountQuery(db bun.IDB, model any, groupColumn string) *bun.SelectQuery
- func PanicQueryHookErrorHandler(db *bun.DB, hook bun.QueryHook, err error)
- func RegisterMany2ManyModel(model ...any)
- func RegisterModel(model ...any)
- func RunInTx(ctx context.Context, db bun.IDB, fn func(ctx context.Context, tx bun.Tx) error) (err error)
- func VirtualFieldExpr(dialect, sourceField, key string, asJSON bool) string
- type Client
- func (c Client) Check() error
- func (c Client) Close() error
- func (c Client) Config() Config
- func (c Client) DB() *bun.DB
- func (c Client) GetFixtures() *Fixtures
- func (c Client) GetMigrations() *Migrations
- func (c Client) LastPlan() *MigrationPlan
- func (c Client) Migrate(ctx context.Context) error
- func (c Client) MigrateSources(ctx context.Context, sourceNames ...string) error
- func (c Client) MustConnect()
- func (c *Client) Name() string
- func (c Client) Ping(ctx context.Context) error
- func (c Client) Plan(ctx context.Context) (*MigrationPlan, error)
- func (c Client) PlanSources(ctx context.Context, sourceNames ...string) (*MigrationPlan, error)
- func (c *Client) Priority() int
- func (c Client) RegisterDialectMigrations(root fs.FS, opts ...DialectMigrationOption) *Migrations
- func (c Client) RegisterFixtures(migrations ...fs.FS) *Fixtures
- func (c Client) RegisterOrderedMigrationSources(sources ...OrderedMigrationSource) error
- func (c Client) RegisterSQLMigrations(migrations ...fs.FS) *Migrations
- func (c Client) Report() *migrate.MigrationGroup
- func (c Client) Rollback(ctx context.Context, opts ...migrate.MigrationOption) error
- func (c Client) RollbackAll(ctx context.Context, opts ...migrate.MigrationOption) error
- func (c Client) Seed(ctx context.Context) error
- func (c *Client) SetLogger(logger Logger)
- func (c *Client) Start(ctx context.Context) error
- func (c *Client) Stop(ctx context.Context) error
- func (c Client) ValidateDialects(ctx context.Context) error
- type ClientOption
- type Config
- type DialectMigrationOption
- func WithDefaultDialect(name string) DialectMigrationOption
- func WithDialectAliases(overrides map[string]string) DialectMigrationOption
- func WithDialectName(name string) DialectMigrationOption
- func WithDialectResolver(resolver DialectResolver) DialectMigrationOption
- func WithDialectSourceLabel(label string) DialectMigrationOption
- func WithDialectValidationContract(contract DialectValidationContract) DialectMigrationOption
- func WithDialectValidator(fn DialectValidationFunc) DialectMigrationOption
- func WithValidateOnMigrate(enabled bool) DialectMigrationOption
- func WithValidationTargets(names ...string) DialectMigrationOption
- type DialectResolver
- type DialectValidationContract
- type DialectValidationFunc
- type DialectValidationResult
- type DriverConfig
- type FixtureOption
- type Fixtures
- type GroupCount
- type JSONMap
- type JSONStringSlice
- type Logger
- type MigrationPlan
- type MigrationPlanEntry
- type MigrationSourceKind
- type Migrations
- func (m *Migrations) BackfillStableOrderedMigrationMarkers(ctx context.Context, db *bun.DB, legacySources []OrderedMigrationSource, ...) error
- func (m *Migrations) LastPlan() *MigrationPlan
- func (m *Migrations) Migrate(ctx context.Context, db *bun.DB) error
- func (m *Migrations) MigrateSources(ctx context.Context, db *bun.DB, sourceNames ...string) error
- func (m *Migrations) Plan(ctx context.Context, db *bun.DB) (*MigrationPlan, error)
- func (m *Migrations) PlanSources(ctx context.Context, db *bun.DB, sourceNames ...string) (*MigrationPlan, error)
- func (m *Migrations) RegisterDialectMigrations(root fs.FS, opts ...DialectMigrationOption) *Migrations
- func (m *Migrations) RegisterOrderedMigrationSources(sources ...OrderedMigrationSource) error
- func (m *Migrations) RegisterSQLMigrations(migrations ...fs.FS) *Migrations
- func (m *Migrations) Report() *migrate.MigrationGroup
- func (m *Migrations) Rollback(ctx context.Context, db *bun.DB, opts ...migrate.MigrationOption) error
- func (m *Migrations) RollbackAll(ctx context.Context, db *bun.DB, opts ...migrate.MigrationOption) error
- func (m *Migrations) SetLogger(logger Logger)
- func (m *Migrations) ValidateDialects(ctx context.Context, db *bun.DB) error
- type OrderedMigrationIdentityMode
- type OrderedMigrationMetadata
- type OrderedMigrationRepairOption
- type OrderedMigrationRepairOptions
- type OrderedMigrationSource
- type OrderedMigrationSourceOption
- type OrderedSourceDriftError
- type OrderedSourceGraphError
- type OrderedSourceRepairError
- type QueryHookErrorHandler
- type QueryHookKeyer
Constants ¶
const ( VirtualDialectPostgres = "postgres" VirtualDialectSQLite = "sqlite" )
const DefaultDriver = "postgres"
DefaultDriver is the Postgres driver
const MaxOrderedMigrationSourceOrder = 999999
MaxOrderedMigrationSourceOrder is the largest explicit source-stable order that fits the fixed-width lexical migration name prefix.
const Name = "persistence"
Name is the string identifier of the module
Variables ¶
var ( ErrQueryHookNil = errors.New("query hook is nil") ErrQueryHookNilPointer = errors.New("query hook is a nil pointer") )
var ( ErrOrderedSourceInvalidConfig = errors.New("invalid ordered migration source configuration") ErrOrderedSourceMixedIdentity = errors.New("mixed ordered migration source identity modes") ErrOrderedSourceDuplicateKey = errors.New("duplicate ordered migration source key") ErrOrderedSourceUnknownDep = errors.New("unknown ordered migration source dependency") ErrOrderedSourceCycle = errors.New("ordered migration source dependency cycle") ErrOrderedSourceOrderInversion = errors.New("ordered migration source dependency order inversion") ErrOrderedSourceMissingSelected = errors.New("selected ordered migration source dependency is missing") )
var ( ErrOrderedSourceDrift = errors.New("ordered migration source graph drift") ErrOrderedSourceRepair = errors.New("ordered migration source repair failed") ErrOrderedSourceRepairMissingMapping = errors.New("ordered migration source repair missing legacy mapping") ErrOrderedSourceRepairAmbiguousMarker = errors.New("ordered migration source repair ambiguous legacy marker") ErrOrderedSourceRepairMarkerMismatch = errors.New("ordered migration source repair marker/source mismatch") )
var ( // ErrTxDBNil indicates RunInTx was called with a nil database handle. ErrTxDBNil = errors.New("persistence: transaction db handle is nil") // ErrTxFuncNil indicates RunInTx was called with a nil callback. ErrTxFuncNil = errors.New("persistence: transaction callback is nil") )
var LoggerEnabled = false
var Priority int
Priority is the module's loading priority
Functions ¶
func LogQueryHookErrorHandler ¶ added in v0.10.0
LogQueryHookErrorHandler logs and skips invalid query hooks.
func NewGroupedCountQuery ¶ added in v0.11.0
NewGroupedCountQuery builds a grouped count query ordered by group key.
The query uses bun.Ident placeholders to avoid string-concatenated SQL.
func PanicQueryHookErrorHandler ¶ added in v0.10.0
PanicQueryHookErrorHandler panics on invalid query hooks.
func RegisterMany2ManyModel ¶ added in v0.0.3
func RegisterMany2ManyModel(model ...any)
func RegisterModel ¶
func RegisterModel(model ...any)
RegisterModel registers a model in Bun or, if the global instance is not yet initialized, will enqueue the models, which will be registered once the global instance is initialized. RegisterModel registers models by name so they can be referenced in table relations and fixtures. persistence.RegisterModel((*models.User)(nil)) persistence.RegisterModel(&model.User{})
func RunInTx ¶ added in v0.11.0
func RunInTx(ctx context.Context, db bun.IDB, fn func(ctx context.Context, tx bun.Tx) error) (err error)
RunInTx executes fn in a transaction.
When db is an existing bun.Tx (or *bun.Tx), fn is executed directly without starting a nested transaction/savepoint. Otherwise, a new transaction is started and committed on success, and rolled back on error or panic.
func VirtualFieldExpr ¶ added in v0.7.0
VirtualFieldExpr returns a SQL snippet for the given dialect to access a JSON/JSONB field. When asJSON is false, text extraction is used (suitable for comparisons/order-by). When asJSON is true, the raw JSON value is returned.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the persistence client
func New ¶
New creates a new client Optionally if Config has defined these methods they will configure the related functionality: - GetSeedsEnabled - GetMigrationsEnabled
func (Client) GetFixtures ¶
GetFixtures will return fixtures
func (Client) GetMigrations ¶
func (c Client) GetMigrations() *Migrations
GetMigrations will migrate db
func (Client) LastPlan ¶ added in v0.13.1
func (c Client) LastPlan() *MigrationPlan
LastPlan returns the last resolved migration plan.
func (Client) MigrateSources ¶ added in v0.13.1
MigrateSources runs migrations for a selected subset of registered sources.
func (Client) Plan ¶ added in v0.13.1
func (c Client) Plan(ctx context.Context) (*MigrationPlan, error)
Plan resolves the current migration plan for all registered sources.
func (Client) PlanSources ¶ added in v0.13.1
PlanSources resolves the migration plan for a selected subset of sources.
func (Client) RegisterDialectMigrations ¶ added in v0.6.0
func (c Client) RegisterDialectMigrations(root fs.FS, opts ...DialectMigrationOption) *Migrations
RegisterDialectMigrations adds dialect-aware SQL migrations.
func (Client) RegisterFixtures ¶
RegisterFixtures adds file based fixtures
func (Client) RegisterOrderedMigrationSources ¶ added in v0.12.0
func (c Client) RegisterOrderedMigrationSources(sources ...OrderedMigrationSource) error
RegisterOrderedMigrationSources adds ordered, source-aware SQL migration sources.
func (Client) RegisterSQLMigrations ¶
func (c Client) RegisterSQLMigrations(migrations ...fs.FS) *Migrations
RegisterSQLMigrations adds SQL based migrations
func (Client) Report ¶
func (c Client) Report() *migrate.MigrationGroup
Report returns the status of migrations. It returns nil if Execute has not been called or has failed.
func (Client) Rollback ¶
Rollback previously executed migrations. It will rollback a group at a time. See https://bun.uptrace.dev/guide/migrations.html#migration-groups-and-rollbacks.
func (Client) RollbackAll ¶
RollbackAll rollbacks every registered migration group.
type ClientOption ¶ added in v0.10.0
type ClientOption func(*clientOptions)
ClientOption configures the persistence client.
func WithBundebug ¶ added in v0.10.0
func WithBundebug() ClientOption
WithBundebug enables bundebug query hook registration.
func WithBunotel ¶ added in v0.10.0
func WithBunotel() ClientOption
WithBunotel enables bunotel query hook registration.
func WithQueryHookErrorHandler ¶ added in v0.10.0
func WithQueryHookErrorHandler(handler QueryHookErrorHandler) ClientOption
WithQueryHookErrorHandler sets the hook registration error handler.
func WithQueryHooks ¶ added in v0.10.0
func WithQueryHooks(hooks ...bun.QueryHook) ClientOption
WithQueryHooks registers custom query hooks with default priority.
func WithQueryHooksPriority ¶ added in v0.10.0
func WithQueryHooksPriority(priority int, hooks ...bun.QueryHook) ClientOption
WithQueryHooksPriority registers custom hooks with the given priority.
type Config ¶
type Config interface {
GetDebug() bool
GetDriver() string
GetServer() string
GetPingTimeout() time.Duration
GetOtelIdentifier() string
}
Config has values for configurable properties
type DialectMigrationOption ¶ added in v0.6.0
type DialectMigrationOption func(*dialectOptions)
DialectMigrationOption configures dialect-aware migration registration.
func WithDefaultDialect ¶ added in v0.6.0
func WithDefaultDialect(name string) DialectMigrationOption
WithDefaultDialect overrides the fallback dialect used when detection fails.
func WithDialectAliases ¶ added in v0.6.0
func WithDialectAliases(overrides map[string]string) DialectMigrationOption
WithDialectAliases extends or overrides the built-in alias map.
func WithDialectName ¶ added in v0.6.0
func WithDialectName(name string) DialectMigrationOption
WithDialectName forces a specific dialect to be used for this registration.
func WithDialectResolver ¶ added in v0.6.0
func WithDialectResolver(resolver DialectResolver) DialectMigrationOption
WithDialectResolver sets a callback that resolves the active dialect at runtime.
func WithDialectSourceLabel ¶ added in v0.6.0
func WithDialectSourceLabel(label string) DialectMigrationOption
WithDialectSourceLabel sets a human-readable label used in validation errors.
func WithDialectValidationContract ¶ added in v0.12.0
func WithDialectValidationContract(contract DialectValidationContract) DialectMigrationOption
WithDialectValidationContract enables strict, opt-in dialect coverage validation.
func WithDialectValidator ¶ added in v0.6.0
func WithDialectValidator(fn DialectValidationFunc) DialectMigrationOption
WithDialectValidator overrides the default panic-on-failure behavior.
func WithValidateOnMigrate ¶ added in v0.12.0
func WithValidateOnMigrate(enabled bool) DialectMigrationOption
WithValidateOnMigrate runs dialect validation before migration execution.
func WithValidationTargets ¶ added in v0.6.0
func WithValidationTargets(names ...string) DialectMigrationOption
WithValidationTargets enables dialect validation for the provided targets. Passing no names causes the resolved dialect to be validated.
type DialectResolver ¶ added in v0.6.0
DialectResolver allows callers to supply a dialect name dynamically.
type DialectValidationContract ¶ added in v0.12.0
type DialectValidationContract struct {
MandatoryTargets []string
RequireAtLeastOneSQL bool
RequireUpDownPairs bool
RequireVersionParityAcrossTargets bool
}
DialectValidationContract enables stricter, opt-in source-level checks.
type DialectValidationFunc ¶ added in v0.6.0
type DialectValidationFunc func(ctx context.Context, result DialectValidationResult) error
DialectValidationFunc is invoked when validation detects missing coverage.
type DialectValidationResult ¶ added in v0.6.0
type DialectValidationResult struct {
SourceLabel string
RegistrationIdx int
CheckedDialects []string
MissingDialects map[string][]string
DialectAliases map[string]string
AvailableLayers []layerDiagnostic
RequestedTargets []string
ValidationContract *DialectValidationContract
}
DialectValidationResult summarizes the dialect coverage outcome for a registration.
type DriverConfig ¶
DriverConfig remains the same
type FixtureOption ¶
type FixtureOption func(s *Fixtures)
FixtureOption configures the seed manager
func WithFileFilter ¶
func WithFileFilter(fn func(path, name string) bool) FixtureOption
WithFileFilter will add a file filter function. Each file found in the given dir will be passed throu this function, and if it returns false the file will be filtered out.
func WithTemplateFuncs ¶
func WithTemplateFuncs(funcMap template.FuncMap) FixtureOption
WithTemplateFuncs are used to solve functions in seed file
func WithTrucateTables ¶
func WithTrucateTables() FixtureOption
WithTrucateTables will truncate tables
type Fixtures ¶
type Fixtures struct {
FileFilter func(path, name string) bool
// contains filtered or unexported fields
}
Fixtures manages fixtures and seeds
func NewSeedManager ¶
func NewSeedManager(db *bun.DB, opts ...FixtureOption) *Fixtures
NewSeedManager generates a new seed manger
func (*Fixtures) AddOptions ¶
func (s *Fixtures) AddOptions(opts ...FixtureOption) *Fixtures
AddOptions will configure options
type GroupCount ¶ added in v0.11.0
GroupCount is a deterministic grouped-count row shape.
type JSONMap ¶ added in v0.11.0
JSONMap is a portable JSON object wrapper for Bun models. It is suitable for PostgreSQL JSONB and SQLite JSON/TEXT columns.
type JSONStringSlice ¶ added in v0.11.0
type JSONStringSlice []string
JSONStringSlice is a portable JSON string-array wrapper for Bun models. It is suitable for PostgreSQL JSONB and SQLite JSON/TEXT columns.
func (*JSONStringSlice) Scan ¶ added in v0.11.0
func (s *JSONStringSlice) Scan(src any) error
Scan implements sql.Scanner.
type MigrationPlan ¶ added in v0.13.1
type MigrationPlan struct {
SelectedSources []string `json:"selected_sources,omitempty"`
Entries []MigrationPlanEntry `json:"entries"`
}
MigrationPlan describes the resolved migration order for a source selection.
type MigrationPlanEntry ¶ added in v0.13.1
type MigrationPlanEntry struct {
SyntheticName string `json:"synthetic_name"`
SourceName string `json:"source_name"`
SourceKind MigrationSourceKind `json:"source_kind"`
SourceLabel string `json:"source_label,omitempty"`
SourceKey string `json:"source_key,omitempty"`
SourceOrder int `json:"source_order,omitempty"`
SourceDependsOn []string `json:"source_depends_on,omitempty"`
ResolvedPosition int `json:"resolved_source_position,omitempty"`
IdentityMode OrderedMigrationIdentityMode `json:"identity_mode,omitempty"`
OriginalVersion string `json:"original_version"`
OriginalComment string `json:"original_comment"`
UpPath string `json:"up_path,omitempty"`
DownPath string `json:"down_path,omitempty"`
ExecutionOrder int `json:"execution_order"`
Dialect string `json:"dialect,omitempty"`
Applied bool `json:"applied"`
AppliedGroupID int64 `json:"applied_group_id,omitempty"`
AppliedAt time.Time `json:"applied_at"`
}
MigrationPlanEntry captures one resolved migration in execution order.
type MigrationSourceKind ¶ added in v0.13.1
type MigrationSourceKind string
MigrationSourceKind identifies the registration model that produced a plan entry.
const ( MigrationSourceKindSQL MigrationSourceKind = "sql" MigrationSourceKindDialect MigrationSourceKind = "dialect" MigrationSourceKindOrdered MigrationSourceKind = "ordered" )
type Migrations ¶
Migrations holds configuration options for migrations See https://bun.uptrace.dev/guide/migrations.html
func NewMigrations ¶ added in v0.1.0
func NewMigrations() *Migrations
func (*Migrations) BackfillStableOrderedMigrationMarkers ¶ added in v0.15.0
func (m *Migrations) BackfillStableOrderedMigrationMarkers( ctx context.Context, db *bun.DB, legacySources []OrderedMigrationSource, opts ...OrderedMigrationRepairOption, ) error
func (*Migrations) LastPlan ¶ added in v0.13.1
func (m *Migrations) LastPlan() *MigrationPlan
func (*Migrations) Migrate ¶
Migrate runs SQL file-based migrations discovered from registered filesystems.
func (*Migrations) MigrateSources ¶ added in v0.13.1
func (m *Migrations) MigrateSources( ctx context.Context, db *bun.DB, sourceNames ...string, ) error
MigrateSources runs migrations for a selected subset of registered sources.
func (*Migrations) Plan ¶ added in v0.13.1
func (m *Migrations) Plan(ctx context.Context, db *bun.DB) (*MigrationPlan, error)
func (*Migrations) PlanSources ¶ added in v0.13.1
func (m *Migrations) PlanSources( ctx context.Context, db *bun.DB, sourceNames ...string, ) (*MigrationPlan, error)
func (*Migrations) RegisterDialectMigrations ¶ added in v0.6.0
func (m *Migrations) RegisterDialectMigrations(root fs.FS, opts ...DialectMigrationOption) *Migrations
RegisterDialectMigrations registers migrations that may differ per dialect.
func (*Migrations) RegisterOrderedMigrationSources ¶ added in v0.12.0
func (m *Migrations) RegisterOrderedMigrationSources(sources ...OrderedMigrationSource) error
RegisterOrderedMigrationSources registers ordered SQL migration sources.
func (*Migrations) RegisterSQLMigrations ¶
func (m *Migrations) RegisterSQLMigrations(migrations ...fs.FS) *Migrations
RegisterSQLMigrations adds SQL based migrations
func (*Migrations) Report ¶
func (m *Migrations) Report() *migrate.MigrationGroup
Report returns the status of the last migration group. It returns nil if Execute has not been called or has failed.
func (*Migrations) Rollback ¶
func (m *Migrations) Rollback(ctx context.Context, db *bun.DB, opts ...migrate.MigrationOption) error
Rollback will only roll back the most recent migration, which will be from the SQL set if it exists, otherwise from the Go set. TODO: more robust implementation which requires more complex logic
func (*Migrations) RollbackAll ¶
func (m *Migrations) RollbackAll(ctx context.Context, db *bun.DB, opts ...migrate.MigrationOption) error
RollbackAll rollbacks every registered migration group.
func (*Migrations) SetLogger ¶ added in v0.1.0
func (m *Migrations) SetLogger(logger Logger)
func (*Migrations) ValidateDialects ¶ added in v0.6.0
ValidateDialects executes configured dialect validation callbacks.
type OrderedMigrationIdentityMode ¶ added in v0.15.0
type OrderedMigrationIdentityMode int
OrderedMigrationIdentityMode controls how ordered migration source names are converted into Bun migration names.
const ( // OrderedMigrationIdentityPositional preserves the legacy registration-position // identity format: ord_000001_000001. OrderedMigrationIdentityPositional OrderedMigrationIdentityMode = iota // OrderedMigrationIdentitySourceStable uses source keys and explicit source // order values for durable migration identities. OrderedMigrationIdentitySourceStable )
func (OrderedMigrationIdentityMode) String ¶ added in v0.15.0
func (mode OrderedMigrationIdentityMode) String() string
type OrderedMigrationMetadata ¶ added in v0.12.0
type OrderedMigrationMetadata struct {
SyntheticName string
SourceName string
SourceKey string
SourceOrder int
SourceDependsOn []string
ResolvedPosition int
IdentityMode OrderedMigrationIdentityMode
OriginalVersion string
OriginalComment string
UpPath string
DownPath string
}
OrderedMigrationMetadata keeps the mapping from synthetic migration names back to source and original files for debug/reporting.
type OrderedMigrationRepairOption ¶ added in v0.15.0
type OrderedMigrationRepairOption func(*OrderedMigrationRepairOptions)
func WithOrderedMigrationRepairCleanupLegacyMarkers ¶ added in v0.15.0
func WithOrderedMigrationRepairCleanupLegacyMarkers(enabled bool) OrderedMigrationRepairOption
type OrderedMigrationRepairOptions ¶ added in v0.15.0
type OrderedMigrationRepairOptions struct {
CleanupLegacyMarkers bool
}
type OrderedMigrationSource ¶ added in v0.12.0
type OrderedMigrationSource struct {
Name string
Root fs.FS
Options []DialectMigrationOption
IdentityMode OrderedMigrationIdentityMode
SourceKey string
Order int
DependsOn []string
}
OrderedMigrationSource defines one named migration source in an explicit order.
func NewStableOrderedMigrationSource ¶ added in v0.15.0
func NewStableOrderedMigrationSource( name string, root fs.FS, sourceKey string, order int, opts ...OrderedMigrationSourceOption, ) OrderedMigrationSource
NewStableOrderedMigrationSource builds a source-stable ordered migration source.
type OrderedMigrationSourceOption ¶ added in v0.15.0
type OrderedMigrationSourceOption func(*OrderedMigrationSource)
OrderedMigrationSourceOption configures an ordered migration source.
func WithOrderedMigrationDependencies ¶ added in v0.15.0
func WithOrderedMigrationDependencies(sourceKeys ...string) OrderedMigrationSourceOption
WithOrderedMigrationDependencies declares dependencies by source key.
func WithOrderedMigrationDialectOptions ¶ added in v0.15.0
func WithOrderedMigrationDialectOptions(opts ...DialectMigrationOption) OrderedMigrationSourceOption
WithOrderedMigrationDialectOptions attaches dialect options to an ordered source.
type OrderedSourceDriftError ¶ added in v0.15.0
type OrderedSourceDriftError struct {
SourceKey string
Field string
Expected string
Observed string
}
func (*OrderedSourceDriftError) Error ¶ added in v0.15.0
func (e *OrderedSourceDriftError) Error() string
func (*OrderedSourceDriftError) Unwrap ¶ added in v0.15.0
func (e *OrderedSourceDriftError) Unwrap() error
type OrderedSourceGraphError ¶ added in v0.15.0
type OrderedSourceGraphError struct {
Kind error
SourceName string
SourceKey string
Dependency string
Message string
}
func (*OrderedSourceGraphError) Error ¶ added in v0.15.0
func (e *OrderedSourceGraphError) Error() string
func (*OrderedSourceGraphError) Unwrap ¶ added in v0.15.0
func (e *OrderedSourceGraphError) Unwrap() error
type OrderedSourceRepairError ¶ added in v0.15.0
type OrderedSourceRepairError struct {
Kind error
LegacyName string
SourceName string
SourceKey string
Expected string
Observed string
Remediation string
Message string
}
func (*OrderedSourceRepairError) Error ¶ added in v0.15.0
func (e *OrderedSourceRepairError) Error() string
func (*OrderedSourceRepairError) Is ¶ added in v0.15.0
func (e *OrderedSourceRepairError) Is(target error) bool
func (*OrderedSourceRepairError) Unwrap ¶ added in v0.15.0
func (e *OrderedSourceRepairError) Unwrap() error
type QueryHookErrorHandler ¶ added in v0.10.0
QueryHookErrorHandler handles invalid query hook registrations.
type QueryHookKeyer ¶ added in v0.10.0
type QueryHookKeyer interface {
QueryHookKey() string
}
QueryHookKeyer allows hooks to provide a stable identity for deduplication.