metadata

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package metadata provides access to databases and collections information.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collection

type Collection struct {
	Name      string
	TableName string
}

Collection represents collection metadata.

func (*Collection) Marshal

func (c *Collection) Marshal() *types.Document

Marshal returns *types.Document for that collection.

func (*Collection) Unmarshal

func (c *Collection) Unmarshal(doc *types.Document) error

Unmarshal sets collection metadata from *types.Document.

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

Registry provides access to PostgreSQL databases and collections information.

Exported methods are safe for concurrent use. Unexported methods are not.

All methods should call [getPool] to check authentication. There is no authorization yet – if username/password combination is correct, all databases and collections are visible as far as Registry is concerned.

func NewRegistry

func NewRegistry(u string, l *zap.Logger, sp *state.Provider) (*Registry, error)

NewRegistry creates a registry for PostgreSQL databases with a given base URI.

func (*Registry) Close

func (r *Registry) Close()

Close closes the registry.

func (*Registry) DatabaseList

func (r *Registry) DatabaseList(ctx context.Context) ([]string, error)

DatabaseList returns a sorted list of existing databases.

Directories

Path Synopsis
Package pool provides access to PostgreSQL connections.
Package pool provides access to PostgreSQL connections.

Jump to

Keyboard shortcuts

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