Documentation
¶
Index ¶
- func Cacheable(cache cache.CacheServer, name string, options ...CacheOptions) endpoint.Middleware
- func Database(dbfactory db.ConnectionFactory, key constants.DatabaseContextValue) endpoint.Middleware
- func DatabaseWithTx(dbfactory db.ConnectionFactory, key constants.DatabaseContextValue) endpoint.Middleware
- type CacheOptions
- type EntryCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cacheable ¶
func Cacheable(cache cache.CacheServer, name string, options ...CacheOptions) endpoint.Middleware
Cacheable The simplest way to enable caching behavior for a method is to demarcate it with Cacheable and parameterize it with the name of the cache where the results would be stored
func Database ¶
func Database(dbfactory db.ConnectionFactory, key constants.DatabaseContextValue) endpoint.Middleware
func DatabaseWithTx ¶
func DatabaseWithTx(dbfactory db.ConnectionFactory, key constants.DatabaseContextValue) endpoint.Middleware
Types ¶
type CacheOptions ¶
type EntryCache ¶ added in v1.12.1
type EntryCache struct {
Status int `json:"status"`
Value interface{} `json:"value"`
}
Click to show internal directories.
Click to hide internal directories.