client

package
v0.1.84 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

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

func New

func New(conn connection.Base, client *mongo.Client) *Base

func (*Base) Databases

func (c *Base) Databases() database.Map

func (*Base) Env

func (c *Base) Env() string

func (*Base) GetColl

func (c *Base) GetColl(ctx context.Context, env, db_name, coll_name string, indexes ...rIndex.Inter) (*collection.Base, error)

func (*Base) GetDatabase added in v0.1.47

func (c *Base) GetDatabase(db_name string) (*database.Base, error)

func (*Base) ListDatabaseNames added in v0.1.47

func (c *Base) ListDatabaseNames(ctx context.Context, filter interface{}) ([]string, error)

func (*Base) NumberSessionsInProgress added in v0.1.47

func (c *Base) NumberSessionsInProgress() int

func (*Base) Timeout added in v0.1.47

func (c *Base) Timeout() *time.Duration

type Inter added in v0.1.47

type Inter interface {
	Databases() database.Map
	Env() string
	GetColl(ctx context.Context, env, db_name, coll_name string, indexes ...rIndex.Inter) (*collection.Base, error)
}

type InterAdmin added in v0.1.47

type InterAdmin interface {
	GetDatabase(db_name string) (*database.Base, error)

	Timeout() *time.Duration
	NumberSessionsInProgress() int
	ListDatabaseNames(ctx context.Context, filter interface{}) ([]string, error)
}

type Map

type Map map[string]*Base

func (Map) Get

func (cs Map) Get(conn_name string) *Base

func (Map) Set

func (m Map) Set(conn_name string, base *Base)

Jump to

Keyboard shortcuts

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