mwgo

package module
v0.0.0-...-3ba81f6 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

README

Mongodb Wrapper Go

Github Actions GoDoc

O package mongodb wrapper Go é um wrapper do mongo-go-driver que define as coleções e as APIs CRUD nelas.

    package your_pagkage

    import (
        mwgo "github.com/rrgaya/mongodb-wrapper-go"
    )
    
    // MWGo NewColletion já faz trata o parse da url e também gerencianmento de context
    collection, err := mwgo.NewCollection("your_url_connection", "your_database", "your_collections") 
    if err != nil{
        log.Println("error on connections with mongodb.")
    }
    collection.InsertOne({})

Documentation

Index

Constants

View Source
const OperationTimeOut = 5

Variables

This section is empty.

Functions

func NewCollection

func NewCollection(uriConnection, dbName, collectionName string) (*mongo.Collection, error)

NewCollection retorna uma collection

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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