nosql

package
v0.0.0-...-cdc5add Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IDatabaseRepository

type IDatabaseRepository interface {
	GetInfo(ctx context.Context, filters interface{}) (Info, error)
}

type Info

type Info struct {
	ID        primitive.ObjectID `bson:"_id"`
	Name      Name_t             `bson:"name"`
	Birthdate int                `bson:"birthdate"`
	Career    string             `bson:"career"`
}

type MongoDbRepository

type MongoDbRepository struct {
	NoSqlDb *NoSqlDatabase
}

func (*MongoDbRepository) GetInfo

func (r *MongoDbRepository) GetInfo(ctx context.Context, filters interface{}) (Info, error)

type Name_t

type Name_t struct {
	Firstname  string `bson:"firstname,omitempty"`
	MiddleName string `bson:"middlename,omitempty"`
	LastName   string `bson:"lastname,omitempty"`
	NickName   string `bson:"nickname,omitempty"`
}

type NoSqlDatabase

type NoSqlDatabase struct {
	Db      *mongo.Database
	Session *mongo.Client
}

func NewNoSqlDatabase

func NewNoSqlDatabase() *NoSqlDatabase

Jump to

Keyboard shortcuts

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