mongo

package
v1.1.0-beta.5 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager represents a vault manager for mongodb client.

func NewManager

func NewManager(conn *mongo.Conn) *Manager

NewManager returns a new vault manager with default options.

func NewManagerWithConfigPath

func NewManagerWithConfigPath(conn *mongo.Conn, path string) (*Manager, error)

NewManagerWithConfigPath returns a new vault manager with options from config path.

func NewManagerWithOptions

func NewManagerWithOptions(conn *mongo.Conn, options *vault.ManagerOptions) *Manager

NewManagerWithOptions returns a new vault manager with options.

func (*Manager) Close

func (m *Manager) Close(ctx context.Context) error

Close closes mongodb client.

func (*Manager) Configure

func (m *Manager) Configure(ctx context.Context, data map[string]interface{}) error

Configure configures mongodb client.

func (*Manager) Notify

func (m *Manager) Notify(conn *mongo.Conn)

func (*Manager) Options

func (m *Manager) Options() *vault.ManagerOptions

Options returns vault manager options.

func (*Manager) Register

func (m *Manager) Register(observer Observer)

func (*Manager) Unregister

func (m *Manager) Unregister(observer Observer)

type Notifier

type Notifier interface {
	Register(Observer)
	Unregister(Observer)
	Notify(*mongo.Conn)
}

type Observer

type Observer interface {
	OnNotify(*mongo.Conn)
}

Observer

Jump to

Keyboard shortcuts

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