mongodb

package module
v0.0.0-...-61bb4dd Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

README

github.com/taouniverse/tao-mongodb

taogo自动创建的组件项目, 主要是封装一些重复性质的代码, 减少编码量

Documentation

Index

Constants

View Source
const ConfigKey = "mongodb"

ConfigKey for this repo

Variables

View Source
var Client *mongo.Client

Client of mongodb

M config of mongodb

Functions

This section is empty.

Types

type Config

type Config struct {
	Host      string   `json:"host"`
	Port      int      `json:"port"`
	User      string   `json:"user"`
	Password  string   `json:"password"`
	RunAfters []string `json:"run_after,omitempty"`
}

Config implements tao.Config declare the configuration you want & define some default values

func (*Config) Name

func (m *Config) Name() string

Name of Config

func (*Config) RunAfter

func (m *Config) RunAfter() []string

RunAfter defines pre task names

func (*Config) ToTask

func (m *Config) ToTask() tao.Task

ToTask transform itself to Task

func (*Config) ValidSelf

func (m *Config) ValidSelf()

ValidSelf with some default values

Jump to

Keyboard shortcuts

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