Documentation
¶
Overview ¶
Package sqlite provides SQLite storage implementation for CVT.
Index ¶
- type SQLiteStore
- func (s *SQLiteStore) Close() error
- func (s *SQLiteStore) DeleteSchema(ctx context.Context, schemaID string) error
- func (s *SQLiteStore) DeleteSchemaVersion(ctx context.Context, schemaID, version string) error
- func (s *SQLiteStore) DeregisterConsumer(ctx context.Context, consumerID, schemaID, environment string) error
- func (s *SQLiteStore) GetComparison(ctx context.Context, schemaID, oldVersion, newVersion string) (*storage.ComparisonRecord, error)
- func (s *SQLiteStore) GetConsumer(ctx context.Context, consumerID, schemaID, environment string) (*storage.ConsumerRecord, error)
- func (s *SQLiteStore) GetPreviousVersion(ctx context.Context, schemaID, currentVersion string) (string, error)
- func (s *SQLiteStore) GetSchema(ctx context.Context, schemaID string) (*storage.SchemaRecord, error)
- func (s *SQLiteStore) GetSchemaVersion(ctx context.Context, schemaID, version string) (*storage.SchemaRecord, error)
- func (s *SQLiteStore) GetValidationAnalytics(ctx context.Context, filter storage.ListValidationsFilter) (*storage.ValidationAnalytics, error)
- func (s *SQLiteStore) ListConsumers(ctx context.Context, filter storage.ListConsumersFilter) ([]*storage.ConsumerRecord, error)
- func (s *SQLiteStore) ListSchemaIDs(ctx context.Context) ([]string, error)
- func (s *SQLiteStore) ListSchemas(ctx context.Context, filter storage.ListSchemasFilter) ([]*storage.SchemaRecord, string, int32, error)
- func (s *SQLiteStore) ListValidations(ctx context.Context, filter storage.ListValidationsFilter) ([]*storage.ValidationRecord, string, error)
- func (s *SQLiteStore) ListVersions(ctx context.Context, schemaID string) ([]string, error)
- func (s *SQLiteStore) Migrate(ctx context.Context) error
- func (s *SQLiteStore) Ping(ctx context.Context) error
- func (s *SQLiteStore) RecordComparison(ctx context.Context, record *storage.ComparisonRecord) error
- func (s *SQLiteStore) RecordValidation(ctx context.Context, record *storage.ValidationRecord) error
- func (s *SQLiteStore) RegisterConsumer(ctx context.Context, record *storage.ConsumerRecord) error
- func (s *SQLiteStore) SetSchema(ctx context.Context, record *storage.SchemaRecord) error
- func (s *SQLiteStore) UpdateConsumerValidation(ctx context.Context, consumerID, schemaID, environment string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SQLiteStore ¶
type SQLiteStore struct {
// contains filtered or unexported fields
}
SQLiteStore implements storage.Store using SQLite.
func (*SQLiteStore) Close ¶
func (s *SQLiteStore) Close() error
Close closes the database connection.
func (*SQLiteStore) DeleteSchema ¶
func (s *SQLiteStore) DeleteSchema(ctx context.Context, schemaID string) error
DeleteSchema removes all versions of a schema.
func (*SQLiteStore) DeleteSchemaVersion ¶
func (s *SQLiteStore) DeleteSchemaVersion(ctx context.Context, schemaID, version string) error
DeleteSchemaVersion removes a specific version of a schema.
func (*SQLiteStore) DeregisterConsumer ¶
func (s *SQLiteStore) DeregisterConsumer(ctx context.Context, consumerID, schemaID, environment string) error
DeregisterConsumer removes a consumer registration.
func (*SQLiteStore) GetComparison ¶
func (s *SQLiteStore) GetComparison(ctx context.Context, schemaID, oldVersion, newVersion string) (*storage.ComparisonRecord, error)
GetComparison retrieves a stored comparison.
func (*SQLiteStore) GetConsumer ¶
func (s *SQLiteStore) GetConsumer(ctx context.Context, consumerID, schemaID, environment string) (*storage.ConsumerRecord, error)
GetConsumer retrieves a consumer registration.
func (*SQLiteStore) GetPreviousVersion ¶
func (s *SQLiteStore) GetPreviousVersion(ctx context.Context, schemaID, currentVersion string) (string, error)
GetPreviousVersion returns the version before the current one.
func (*SQLiteStore) GetSchema ¶
func (s *SQLiteStore) GetSchema(ctx context.Context, schemaID string) (*storage.SchemaRecord, error)
GetSchema retrieves the latest version of a schema.
func (*SQLiteStore) GetSchemaVersion ¶
func (s *SQLiteStore) GetSchemaVersion(ctx context.Context, schemaID, version string) (*storage.SchemaRecord, error)
GetSchemaVersion retrieves a specific version of a schema.
func (*SQLiteStore) GetValidationAnalytics ¶
func (s *SQLiteStore) GetValidationAnalytics(ctx context.Context, filter storage.ListValidationsFilter) (*storage.ValidationAnalytics, error)
GetValidationAnalytics returns aggregated validation statistics.
func (*SQLiteStore) ListConsumers ¶
func (s *SQLiteStore) ListConsumers(ctx context.Context, filter storage.ListConsumersFilter) ([]*storage.ConsumerRecord, error)
ListConsumers returns consumers matching the filter.
func (*SQLiteStore) ListSchemaIDs ¶
func (s *SQLiteStore) ListSchemaIDs(ctx context.Context) ([]string, error)
ListSchemaIDs returns all unique schema IDs.
func (*SQLiteStore) ListSchemas ¶
func (s *SQLiteStore) ListSchemas(ctx context.Context, filter storage.ListSchemasFilter) ([]*storage.SchemaRecord, string, int32, error)
ListSchemas returns schemas matching the filter.
func (*SQLiteStore) ListValidations ¶
func (s *SQLiteStore) ListValidations(ctx context.Context, filter storage.ListValidationsFilter) ([]*storage.ValidationRecord, string, error)
ListValidations returns validation runs matching the filter.
func (*SQLiteStore) ListVersions ¶
ListVersions returns all versions of a schema.
func (*SQLiteStore) Migrate ¶
func (s *SQLiteStore) Migrate(ctx context.Context) error
Migrate runs database migrations.
func (*SQLiteStore) Ping ¶
func (s *SQLiteStore) Ping(ctx context.Context) error
Ping verifies database connectivity.
func (*SQLiteStore) RecordComparison ¶
func (s *SQLiteStore) RecordComparison(ctx context.Context, record *storage.ComparisonRecord) error
RecordComparison stores a schema comparison.
func (*SQLiteStore) RecordValidation ¶
func (s *SQLiteStore) RecordValidation(ctx context.Context, record *storage.ValidationRecord) error
RecordValidation stores a validation run.
func (*SQLiteStore) RegisterConsumer ¶
func (s *SQLiteStore) RegisterConsumer(ctx context.Context, record *storage.ConsumerRecord) error
RegisterConsumer stores or updates a consumer registration.
func (*SQLiteStore) SetSchema ¶
func (s *SQLiteStore) SetSchema(ctx context.Context, record *storage.SchemaRecord) error
SetSchema stores or updates a schema record.
func (*SQLiteStore) UpdateConsumerValidation ¶
func (s *SQLiteStore) UpdateConsumerValidation(ctx context.Context, consumerID, schemaID, environment string, validatedAt time.Time) error
UpdateConsumerValidation updates the last validated timestamp for a consumer.