Categorygithub.com/golang-common-packages/storage
repositorypackage
0.0.0-20210606093055-7a069e21822f
Repository: https://github.com/golang-common-packages/storage.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

Storage

Go Report Card

import "github.com/golang-common-packages/storage"

Working with MongoDB:

dbConn = storage.New(storage.NOSQLDOCUMENT)(storage.MONGODB, &storage.Config{MongoDB: storage.MongoDB{
		User:     "USERNAME",
		Password: "PASSWORD",
		Hosts:    "STRING_URI_SLICE",
		Options:  "STRING_OPTION_SLICE",
		DB:       "DATABASE_NAME",
	}}).(storage.INoSQLDocument)

Working with Google Drive:

driveConn := storage.New(storage.FILE)(storage.DRIVE, &storage.Config{GoogleDrive: storage.GoogleDrive{
		PoolSize:     4,
		ByHTTPClient: false,
		Credential:   "credentials.json",
		Token:        "token.json",
	}}).(storage.IFILE)

Note

How to use this package?