mongodb

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 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 {
	mgm.Model
	Make()
}

Jump to

Keyboard shortcuts

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