Documentation ¶
Index ¶
- Constants
- type Datastore
- type RedisDatastore
- func (r *RedisDatastore) Close()
- func (r *RedisDatastore) CreateContactRequest(contactRequest *models.ContactRequest) error
- func (r *RedisDatastore) CreateGopherTeam(team []*models.Gopher) error
- func (r *RedisDatastore) CreateProduct(product *models.Product) error
- func (r *RedisDatastore) CreateProductRegistry(products []string) error
- func (r *RedisDatastore) GenerateProductsMap(products []*models.Product) map[string]*models.Product
- func (r *RedisDatastore) GetGopherTeam() []*models.Gopher
- func (r *RedisDatastore) GetProductDetail(productTitle string) *models.Product
- func (r *RedisDatastore) GetProducts() []*models.Product
- func (r *RedisDatastore) GetProductsInShoppingCart(cart *models.ShoppingCart) []*models.Product
Constants ¶
View Source
const (
REDIS = iota
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Datastore ¶
type Datastore interface { CreateGopherTeam(team []*models.Gopher) error GetGopherTeam() []*models.Gopher CreateProduct(product *models.Product) error CreateProductRegistry(products []string) error GetProducts() []*models.Product GetProductDetail(productTitle string) *models.Product GetProductsInShoppingCart(cart *models.ShoppingCart) []*models.Product CreateContactRequest(contactRrequest *models.ContactRequest) error Close() }
type RedisDatastore ¶
func NewRedisDatastore ¶
func NewRedisDatastore(address string) (*RedisDatastore, error)
func (*RedisDatastore) Close ¶
func (r *RedisDatastore) Close()
func (*RedisDatastore) CreateContactRequest ¶
func (r *RedisDatastore) CreateContactRequest(contactRequest *models.ContactRequest) error
func (*RedisDatastore) CreateGopherTeam ¶
func (r *RedisDatastore) CreateGopherTeam(team []*models.Gopher) error
func (*RedisDatastore) CreateProduct ¶
func (r *RedisDatastore) CreateProduct(product *models.Product) error
func (*RedisDatastore) CreateProductRegistry ¶
func (r *RedisDatastore) CreateProductRegistry(products []string) error
func (*RedisDatastore) GenerateProductsMap ¶
func (*RedisDatastore) GetGopherTeam ¶
func (r *RedisDatastore) GetGopherTeam() []*models.Gopher
func (*RedisDatastore) GetProductDetail ¶
func (r *RedisDatastore) GetProductDetail(productTitle string) *models.Product
func (*RedisDatastore) GetProducts ¶
func (r *RedisDatastore) GetProducts() []*models.Product
func (*RedisDatastore) GetProductsInShoppingCart ¶
func (r *RedisDatastore) GetProductsInShoppingCart(cart *models.ShoppingCart) []*models.Product
Click to show internal directories.
Click to hide internal directories.