stores

package
v0.0.0-...-694eafd Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoDB

type MongoDB struct {
	DB     *mongo.Database
	Client *mongo.Client
}

func NewMongoStore

func NewMongoStore(user string, pass string, host string, db_name string) (*MongoDB, error)

type Mordor

type Mordor struct {
	// contains filtered or unexported fields
}

func NewMordor

func NewMordor(col *mongo.Collection, ctx context.Context) *Mordor

func (*Mordor) Delete

func (m *Mordor) Delete(key string) error

func (*Mordor) Get

func (m *Mordor) Get(field string, value interface{}, decoder interface{}) error

func (*Mordor) GetAll

func (m *Mordor) GetAll(limit int64, offset int64, sort interface{}, decoder interface{}) (int64, error)

func (*Mordor) GetMany

func (m *Mordor) GetMany(field string, value interface{}, limit int64, offset int64, sort interface{}, decoder interface{}) (int64, error)

func (*Mordor) Update

func (m *Mordor) Update(key string, newData interface{}) error

func (*Mordor) Write

func (m *Mordor) Write(data interface{}) (string, error)

type Redis

type Redis struct {
	// contains filtered or unexported fields
}

func NewRedisStore

func NewRedisStore(redis_host string, redis_port string, redis_user string, redis_pass string, redis_db int) (*Redis, error)

type Rivia

type Rivia struct {
	// contains filtered or unexported fields
}

func NewRivia

func NewRivia(redis *Redis, db int) *Rivia

func (*Rivia) Get

func (r *Rivia) Get(id string) string

func (*Rivia) Remove

func (r *Rivia) Remove(id string) error

func (*Rivia) Set

func (r *Rivia) Set(id string, expires time.Duration, data interface{}) error

Jump to

Keyboard shortcuts

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