Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrDatabaseNotFound is returned when a database is not found ErrDatabaseNotFound = status.Error(codes.NotFound, "database is not initialised") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // Add adds a client connection for database db to the immudb server Add(db string) (immuclient.ImmuClient, error) // For returns the client for database db to the immudb server For(db string) (immuclient.ImmuClient, error) }
Client is a multi database connection manager for immudb server
func New ¶
func New(options *immuclient.Options) Client
New returns a new Client using the Options to connect to immudb. The returned client reads *and* writes directly to the server It understands how to work with with multiple databases.
func NewMockClient ¶
func NewMockClient(cli immuclient.ImmuClient, opts *immuclient.Options) Client
NewMockClient returns a mock Client for defaultdb to the immudb server
func NewMockClientWithDb ¶
func NewMockClientWithDb(cli immuclient.ImmuClient, opts *immuclient.Options, db string) Client
NewMockClientWithDb returns a mock Client for database db to the immudb server
Click to show internal directories.
Click to hide internal directories.