mongodb

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: MIT Imports: 7 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

Functions

func AppendTable

func AppendTable(t Tabler)

AppendTable append table

Types

type Database

type Database struct {
	URL     string        `yaml:"url" json:"url"`
	Name    string        `yaml:"name" json:"name"`
	Timeout time.Duration `yaml:"timeout" json:"timeout"`
}

func (*Database) C

func (e *Database) C(t Tabler) *mongo.Collection

C get table's Collection

func (*Database) Init

func (e *Database) Init()

type Tabler

type Tabler interface {
	TableName() string
	Make()
	C() *mongo.Collection
}

Jump to

Keyboard shortcuts

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