Documentation ¶
Index ¶
- type CounterCache
- func NewInt32Cache[K comparable](client *firestore.Client, docIdFunc func(key K) string, fieldName string) *CounterCache[K, int32]
- func NewInt64Cache[K comparable](client *firestore.Client, docIdFunc func(key K) string, fieldName string) *CounterCache[K, int64]
- func NewUInt32Cache[K comparable](client *firestore.Client, docIdFunc func(key K) string, fieldName string) *CounterCache[K, uint32]
- func NewUInt64Cache[K comparable](client *firestore.Client, docIdFunc func(key K) string, fieldName string) *CounterCache[K, uint64]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CounterCache ¶
type CounterCache[K comparable, V number] struct { // contains filtered or unexported fields }
func NewInt32Cache ¶
func NewInt32Cache[K comparable](client *firestore.Client, docIdFunc func(key K) string, fieldName string) *CounterCache[K, int32]
func NewInt64Cache ¶
func NewInt64Cache[K comparable](client *firestore.Client, docIdFunc func(key K) string, fieldName string) *CounterCache[K, int64]
func NewUInt32Cache ¶
func NewUInt32Cache[K comparable](client *firestore.Client, docIdFunc func(key K) string, fieldName string) *CounterCache[K, uint32]
func NewUInt64Cache ¶
func NewUInt64Cache[K comparable](client *firestore.Client, docIdFunc func(key K) string, fieldName string) *CounterCache[K, uint64]
func (*CounterCache[K, V]) Commit ¶
func (c *CounterCache[K, V]) Commit(ctx context.Context)
Commit changes to database Entries with zero delta will be moved to dirty map and deleted during next commit operation if they will stay zero
func (*CounterCache[K, V]) Update ¶
func (c *CounterCache[K, V]) Update(key K, delta V) (old V)
Update Updates value in cache or creates entry if not already created /**
Click to show internal directories.
Click to hide internal directories.