Skip to content

golang-common-packages/storage

Repository files navigation

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?

About

This package helps you work with all types of storage

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages