package module
Version: v0.0.0-...-1aee6c4 Latest Latest

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

Go to latest
Published: Jun 13, 2021 License: Apache-2.0 Imports: 8 Imported by: 7




This section is empty.


This section is empty.


This section is empty.


type ClientFirestore

type ClientFirestore struct {
	C   *firestore.Client
	Ctx context.Context

type NoSqlDb

type NoSqlDb struct {
	ProjectId string
	Database  string
	Client    ClientFirestore

func NewNoSqlDb

func NewNoSqlDb(projId, db string) (*NoSqlDb, error)

func (*NoSqlDb) AppendArray

func (d *NoSqlDb) AppendArray(coll string, doc string, path string, val interface{}) error

func (*NoSqlDb) Connect

func (d *NoSqlDb) Connect() error

func (*NoSqlDb) SetField

func (d *NoSqlDb) SetField(coll string, doc string, val interface{}, merge bool) (err error)

func (*NoSqlDb) UpdateField

func (d *NoSqlDb) UpdateField(coll string, doc string, path string, val interface{}) error

type SqlDb

type SqlDb struct {
	Username string `yaml:"username" json:"username"`
	Password string `yaml:"password" json:"password"`
	Host     string `yaml:"host" json:"host"`
	Port     string `yaml:"port" json:"port"`
	Db       string `yaml:"db" json:"db"`
	Driver   string `yaml:"driver" json:"driver"`
	Client   *sql.DB

func NewSqlDb

func NewSqlDb(user, key, host, port, db, driver string) (*SqlDb, error)

func (*SqlDb) Close

func (sdb *SqlDb) Close() (err error)

func (*SqlDb) Connect

func (sdb *SqlDb) Connect() (err error)

Jump to

Keyboard shortcuts

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