mongodb

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 28, 2023 License: MIT Imports: 11 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Enforcer casbin.IEnforcer

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"`
	CasbinModel string        `yaml:"casbinModel" json:"casbinModel"`
}

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