Documentation ¶
Index ¶
- func NewClient(db Db, url DbUrl) *redis.Client
- func NewConfig(path ConfigPath) *viper.Viper
- func NewContext() context.Context
- type Cache
- type CachedService
- func (srv CachedService) Create(entity interface{}) (interface{}, error)
- func (srv CachedService) Delete(id string) (interface{}, error)
- func (srv CachedService) Get(id string) (interface{}, error)
- func (srv CachedService) GetByIds(ids []string) (interface{}, error)
- func (srv CachedService) GetByString(path, query string) (interface{}, error)
- func (srv CachedService) Update(id string, entity interface{}) (interface{}, error)
- type ConfigHolder
- type ConfigPath
- type Converter
- func (cnv Converter) FromBinaryJson(str []byte) (interface{}, error)
- func (cnv Converter) FromBinaryJsonSlice(theSlice []interface{}) ([]interface{}, error)
- func (cnv Converter) FromMap(theMap map[string]interface{}) (interface{}, error)
- func (cnv Converter) FromMapSlice(theSlice []map[string]interface{}) ([]interface{}, error)
- type Dao
- func (dao Dao) Create(entity interface{}) (interface{}, error)
- func (dao Dao) Delete(id string) (interface{}, error)
- func (dao Dao) Get(id string) (map[string]interface{}, error)
- func (dao Dao) GetByIds(ids []string) ([]map[string]interface{}, error)
- func (dao Dao) GetByString(path, query string) *firestore.DocumentIterator
- func (dao Dao) Update(id string, entity interface{}) (interface{}, error)
- type Db
- type DbUrl
- type FStore
- type Firestore
- type GenericCache
- type GenericConverter
- type GenericDao
- type GenericService
- type Service
- func (srv Service) Create(entity interface{}) (interface{}, error)
- func (srv Service) Delete(id string) (interface{}, error)
- func (srv Service) Get(id string) (interface{}, error)
- func (srv Service) GetByIds(ids []string) (interface{}, error)
- func (srv Service) GetByString(path, query string) (interface{}, error)
- func (srv Service) Update(id string, entity interface{}) (interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConfig ¶
func NewConfig(path ConfigPath) *viper.Viper
func NewContext ¶
Types ¶
type CachedService ¶
type CachedService struct {
// contains filtered or unexported fields
}
func NewCachedService ¶
func NewCachedService(dao *GenericDao, cache *GenericCache, cnv *GenericConverter, idProvider func(interface{}) string) CachedService
func (CachedService) Create ¶
func (srv CachedService) Create(entity interface{}) (interface{}, error)
func (CachedService) Delete ¶
func (srv CachedService) Delete(id string) (interface{}, error)
func (CachedService) Get ¶
func (srv CachedService) Get(id string) (interface{}, error)
func (CachedService) GetByIds ¶
func (srv CachedService) GetByIds(ids []string) (interface{}, error)
func (CachedService) GetByString ¶
func (srv CachedService) GetByString(path, query string) (interface{}, error)
func (CachedService) Update ¶
func (srv CachedService) Update(id string, entity interface{}) (interface{}, error)
type ConfigHolder ¶
type ConfigHolder struct {
// contains filtered or unexported fields
}
type ConfigPath ¶
type ConfigPath string
type Converter ¶
type Converter struct {
// contains filtered or unexported fields
}
func NewConverter ¶
func NewConverter(entityProvider func() interface{}) *Converter
func (Converter) FromBinaryJson ¶
func (Converter) FromBinaryJsonSlice ¶
func (Converter) FromMapSlice ¶
type Dao ¶
type Dao struct {
// contains filtered or unexported fields
}
func (Dao) GetByString ¶
func (dao Dao) GetByString(path, query string) *firestore.DocumentIterator
type GenericCache ¶
type GenericConverter ¶
type GenericDao ¶
type GenericDao interface { Get(id string) (map[string]interface{}, error) Update(id string, entity interface{}) (interface{}, error) Create(entity interface{}) (interface{}, error) Delete(id string) (interface{}, error) GetByIds(ids []string) ([]map[string]interface{}, error) GetByString(path, query string) *firestore.DocumentIterator }
type GenericService ¶
type GenericService interface { Get(id string) (interface{}, error) Update(id string, entity interface{}) (interface{}, error) Create(entity interface{}) (interface{}, error) Delete(id string) (interface{}, error) GetByIds(ids []string) (interface{}, error) GetByString(path, query string) (interface{}, error) }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(dao *GenericDao, cnv *GenericConverter, idProvider func(interface{}) string) *Service
func (Service) GetByString ¶
Click to show internal directories.
Click to hide internal directories.