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 ¶
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 ¶
NewRegistry creates a registry for PostgreSQL databases with a given base URI.