GitXplorerGitXplorer
t

go-mongodb-config

public
5 stars
2 forks
1 issues

Commits

List of commits on branch master.
Verified
5a5cc09294194d910bfc30033fed3a82cb798cf1

WiredTiger cache size can be a float (#11)

ttimvaillancourt committed 6 years ago
Unverified
35160f1fd66597e2cc988e89c3679900bd60d788

move test config file to subdir #3

ttimvaillancourt committed 7 years ago
Unverified
8e0aaf85a9ffac1f8d41bb508593878bff3c8a57

move test config file to subdir #2

ttimvaillancourt committed 7 years ago
Unverified
b140583e60409759f75fbc0f0590f661908ba10c

move test config file to subdir

ttimvaillancourt committed 7 years ago
Verified
d6844fe2e54e08f44190ebab0ee873bff5c76cf3

Adding missing tests (#9)

ttimvaillancourt committed 7 years ago
Verified
f8e80b634ae81d669bc49dd7638cdddcb4cd7f51

add codecov badge (#8)

ttimvaillancourt committed 7 years ago

README

The README file for this repository.

go-mongodb-config

Build Status Go Report Card codecov

A package for reading/writing MongoDB yaml-based configurations

Docs

Usage

Create 'Config' struct from file (YAML-based only):

import (
	mongodb_config "github.com/timvaillancourt/go-mongodb-config/config"
)

func main() {
	config, err := mongodb_config.Load("/etc/mongod.conf")
	if err != nil {
		panic(err)
	}
	...
}

Create 'Config' struct from uri:

import (
        mongodb_config "github.com/timvaillancourt/go-mongodb-config/config"
)

func main() {
        config, err := mongodb_config.LoadUri("http://example.com/etc/mongod.conf")
        if err != nil {
                panic(err)
        }
        ...
}

Write 'Config' struct to file:

import (
	mongodb_config "github.com/timvaillancourt/go-mongodb-config/config"
)
 
func main() {
	config := mongodb_config.New()
	...
	err := config.Write("/etc/mongod.conf")
	if err != nil {
		panic(err)
	}
}