Documentation
¶
Overview ¶
Package postgres implements the store.Store interface using PostgreSQL with sqlc-generated query code and pgx as the driver.
Index ¶
- type Store
- func (s *Store) BeginTx(ctx context.Context) (pgx.Tx, *sqlc.Queries, error)
- func (s *Store) CreateNamespace(ctx context.Context, ns *store.Namespace) error
- func (s *Store) CreateSchema(ctx context.Context, schema *store.Schema) error
- func (s *Store) DiscardStaging(ctx context.Context, namespaceID string) error
- func (s *Store) GetBlob(ctx context.Context, namespaceID, sha256hex string) (*store.ProtoBlob, error)
- func (s *Store) GetNamespace(ctx context.Context, id string) (*store.Namespace, error)
- func (s *Store) GetSchema(ctx context.Context, namespaceID, schemaID string) (*store.Schema, error)
- func (s *Store) GetVersion(ctx context.Context, namespaceID, schemaID string, version uint64) (*store.SchemaVersion, error)
- func (s *Store) GetVersionFiles(ctx context.Context, namespaceID, schemaID string, version uint64) ([]store.VersionFile, error)
- func (s *Store) ListNamespaces(ctx context.Context) ([]*store.Namespace, error)
- func (s *Store) ListNamespacesPage(ctx context.Context, after string, limit int) ([]*store.Namespace, error)
- func (s *Store) ListSchemas(ctx context.Context, namespaceID string) ([]*store.Schema, error)
- func (s *Store) ListSchemasPage(ctx context.Context, namespaceID, after string, limit int) ([]*store.Schema, error)
- func (s *Store) ListVersions(ctx context.Context, namespaceID, schemaID string) ([]uint64, error)
- func (s *Store) LoadAllCurrent(ctx context.Context) ([]*store.CurrentSchema, error)
- func (s *Store) LoadNamespaceCurrent(ctx context.Context, namespaceID string) ([]*store.CurrentSchema, error)
- func (s *Store) LoadNamespaceProposed(ctx context.Context, namespaceID string) ([]*store.CurrentSchema, error)
- func (s *Store) Promote(ctx context.Context, namespaceID string) ([]store.PromotedSchema, error)
- func (s *Store) PutBlob(ctx context.Context, blob *store.ProtoBlob) error
- func (s *Store) PutVersion(ctx context.Context, ver *store.SchemaVersion, files []store.VersionFile, ...) error
- func (s *Store) SetStaged(ctx context.Context, namespaceID, schemaID string, version uint64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store implements store.Store using PostgreSQL.
func (*Store) CreateNamespace ¶
func (*Store) CreateSchema ¶
func (*Store) DiscardStaging ¶
func (*Store) GetNamespace ¶
func (*Store) GetVersion ¶
func (*Store) GetVersionFiles ¶
func (*Store) ListNamespaces ¶
func (*Store) ListNamespacesPage ¶
func (*Store) ListSchemas ¶
func (*Store) ListSchemasPage ¶
func (*Store) ListVersions ¶
func (*Store) LoadAllCurrent ¶
func (*Store) LoadNamespaceCurrent ¶
func (*Store) LoadNamespaceProposed ¶
func (*Store) PutVersion ¶
func (s *Store) PutVersion(ctx context.Context, ver *store.SchemaVersion, files []store.VersionFile, deps []store.VersionDep) error
Click to show internal directories.
Click to hide internal directories.