repository

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewJsonDataSource

func NewJsonDataSource(cfg model.FileConfig) datasource.JsonDataSource

func NewJsonDataSourceFromPath

func NewJsonDataSourceFromPath(path string) datasource.JsonDataSource

func NewMongoDataSource

func NewMongoDataSource(cfg model.DatabaseConfig, useApiVersion bool) datasource.MongoDataSource

Types

type JsonRepo

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

func (*JsonRepo) DataSourceName

func (j *JsonRepo) DataSourceName() scene.ImplName

func (*JsonRepo) Dispose

func (j *JsonRepo) Dispose() error

func (*JsonRepo) Load

func (j *JsonRepo) Load() ([]byte, error)

func (*JsonRepo) Save

func (j *JsonRepo) Save(data []byte) error

func (*JsonRepo) Setup

func (j *JsonRepo) Setup() error

func (*JsonRepo) Status

func (j *JsonRepo) Status() error

type MongoRepo

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

func (*MongoRepo) Collection

func (m *MongoRepo) Collection(coll string) *mongo.Collection

func (*MongoRepo) DataSourceName

func (j *MongoRepo) DataSourceName() scene.ImplName

func (*MongoRepo) Database

func (m *MongoRepo) Database() *mongo.Database

func (*MongoRepo) Dispose

func (m *MongoRepo) Dispose() error

func (*MongoRepo) Setup

func (m *MongoRepo) Setup() error

func (*MongoRepo) Status

func (m *MongoRepo) Status() error

type MysqlRepo

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

func (*MysqlRepo) Connection

func (m *MysqlRepo) Connection() *sql.DB

func (*MysqlRepo) DataSourceName

func (m *MysqlRepo) DataSourceName() scene.ImplName

func (*MysqlRepo) Dispose

func (m *MysqlRepo) Dispose() error

func (*MysqlRepo) Setup

func (m *MysqlRepo) Setup() error

func (*MysqlRepo) Status

func (m *MysqlRepo) Status() error

type RedisDataRepo

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

func (*RedisDataRepo) DataSourceName

func (r *RedisDataRepo) DataSourceName() scene.ImplName

func (*RedisDataRepo) Delete

func (r *RedisDataRepo) Delete(ctx context.Context, key string) error

func (*RedisDataRepo) Dispose

func (r *RedisDataRepo) Dispose() error

func (*RedisDataRepo) Get

func (r *RedisDataRepo) Get(ctx context.Context, key string) (string, error)

func (*RedisDataRepo) GetValue added in v0.2.5

func (r *RedisDataRepo) GetValue(ctx context.Context, key string, value interface{}) error

func (*RedisDataRepo) Set

func (r *RedisDataRepo) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) error

func (*RedisDataRepo) Setup

func (r *RedisDataRepo) Setup() error

func (*RedisDataRepo) Status

func (r *RedisDataRepo) Status() error

Jump to

Keyboard shortcuts

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