mongodb

package
v0.0.0-...-537599a Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Client   *mongo.Client
	Database *mongo.Database
)

Functions

func Init

func Init(ctx context.Context)

func SetDatabase

func SetDatabase(name string) *mongo.Database

Types

type Dao

type Dao interface {
	// contains filtered or unexported methods
}

type Option

type Option struct {
	Key   interface{} `json:"key"`
	Label string      `json:"label"`
}

func ConvertToOptions

func ConvertToOptions(key, label string, coll []Dao) (options []Option, err error)

ConvertToOptions Convert dao list to options

Jump to

Keyboard shortcuts

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