repository

package
v0.0.0-...-99c491d Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ElasticStoresIndex = config.ElasticStoresIndex

Functions

func CreateClient

func CreateClient(config *config.MongoConfiguration) (*mongo.Client, error)

Types

type ElasticRepository

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

func NewElasticRepository

func NewElasticRepository(config *config.ElasticConfiguration) (*ElasticRepository, error)

func (*ElasticRepository) GetStores

func (r *ElasticRepository) GetStores(ctx context.Context, storeIDs []int64) (*[]model.Store, error)

func (*ElasticRepository) UpdateStore

func (r *ElasticRepository) UpdateStore(ctx context.Context, storeID string, enabled bool) error

type MongoRepository

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

func NewMongoRepository

func NewMongoRepository(config *config.MongoConfiguration) (*MongoRepository, error)

func (*MongoRepository) GetStores

func (r *MongoRepository) GetStores(ctx context.Context, storeIDs []int64) (*[]model.Store, error)

func (*MongoRepository) UpdateStore

func (r *MongoRepository) UpdateStore(ctx context.Context, storeID string, enabled bool) error

type StoreRepository

type StoreRepository interface {
	UpdateStore(context.Context, string, bool) error
	GetStores(context.Context, []int64) (*[]model.Store, error)
}

Jump to

Keyboard shortcuts

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