mongo

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	GetMongoURI(id string) (source string, err error)
}

Config config provide mongo connection

type Service

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

Service mongo connect service

func NewService

func NewService(config Config) *Service

NewService create a new mongo connect service

func (*Service) Close

func (s *Service) Close() error

Close close all connections

func (*Service) Engine

func (s *Service) Engine(id string) (*mongo.Client, error)

Engine get redis client by id

Jump to

Keyboard shortcuts

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