Documentation ¶
Index ¶
- type AnonymousAliasLoader
- func (l *AnonymousAliasLoader) Clear(key globalid.ID)
- func (l *AnonymousAliasLoader) Load(key globalid.ID) (*model.AnonymousAlias, error)
- func (l *AnonymousAliasLoader) LoadAll(keys []globalid.ID) ([]*model.AnonymousAlias, []error)
- func (l *AnonymousAliasLoader) LoadThunk(key globalid.ID) func() (*model.AnonymousAlias, error)
- func (l *AnonymousAliasLoader) Prime(key globalid.ID, value *model.AnonymousAlias) bool
- type CardLoader
- func (l *CardLoader) Clear(key globalid.ID)
- func (l *CardLoader) Load(key globalid.ID) (*model.Card, error)
- func (l *CardLoader) LoadAll(keys []globalid.ID) ([]*model.Card, []error)
- func (l *CardLoader) LoadThunk(key globalid.ID) func() (*model.Card, error)
- func (l *CardLoader) Prime(key globalid.ID, value *model.Card) bool
- type DBTimeLoader
- func (l *DBTimeLoader) Clear(key globalid.ID)
- func (l *DBTimeLoader) Load(key globalid.ID) (*model.DBTime, error)
- func (l *DBTimeLoader) LoadAll(keys []globalid.ID) ([]*model.DBTime, []error)
- func (l *DBTimeLoader) LoadThunk(key globalid.ID) func() (*model.DBTime, error)
- func (l *DBTimeLoader) Prime(key globalid.ID, value *model.DBTime) bool
- type FeedEntriesByIDLoader
- func (l *FeedEntriesByIDLoader) Clear(key globalid.ID)
- func (l *FeedEntriesByIDLoader) Load(key globalid.ID) (*model.FeedEntriesByID, error)
- func (l *FeedEntriesByIDLoader) LoadAll(keys []globalid.ID) ([]*model.FeedEntriesByID, []error)
- func (l *FeedEntriesByIDLoader) LoadThunk(key globalid.ID) func() (*model.FeedEntriesByID, error)
- func (l *FeedEntriesByIDLoader) Prime(key globalid.ID, value *model.FeedEntriesByID) bool
- type IDTimeRangeKey
- type InviteLoader
- func (l *InviteLoader) Clear(key globalid.ID)
- func (l *InviteLoader) Load(key globalid.ID) (*model.Invite, error)
- func (l *InviteLoader) LoadAll(keys []globalid.ID) ([]*model.Invite, []error)
- func (l *InviteLoader) LoadThunk(key globalid.ID) func() (*model.Invite, error)
- func (l *InviteLoader) Prime(key globalid.ID, value *model.Invite) bool
- type Loaders
- type ReactionSliceLoader
- func (l *ReactionSliceLoader) Clear(key globalid.ID)
- func (l *ReactionSliceLoader) Load(key globalid.ID) ([]model.Reaction, error)
- func (l *ReactionSliceLoader) LoadAll(keys []globalid.ID) ([][]model.Reaction, []error)
- func (l *ReactionSliceLoader) LoadThunk(key globalid.ID) func() ([]model.Reaction, error)
- func (l *ReactionSliceLoader) Prime(key globalid.ID, value []model.Reaction) bool
- type UserEngagementLoader
- func (l *UserEngagementLoader) Clear(key IDTimeRangeKey)
- func (l *UserEngagementLoader) Load(key IDTimeRangeKey) (*model.UserEngagement, error)
- func (l *UserEngagementLoader) LoadAll(keys []IDTimeRangeKey) ([]*model.UserEngagement, []error)
- func (l *UserEngagementLoader) LoadThunk(key IDTimeRangeKey) func() (*model.UserEngagement, error)
- func (l *UserEngagementLoader) Prime(key IDTimeRangeKey, value *model.UserEngagement) bool
- type UserLoader
- func (l *UserLoader) Clear(key globalid.ID)
- func (l *UserLoader) Load(key globalid.ID) (*model.User, error)
- func (l *UserLoader) LoadAll(keys []globalid.ID) ([]*model.User, []error)
- func (l *UserLoader) LoadThunk(key globalid.ID) func() (*model.User, error)
- func (l *UserLoader) Prime(key globalid.ID, value *model.User) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnonymousAliasLoader ¶
type AnonymousAliasLoader struct {
// contains filtered or unexported fields
}
AnonymousAliasLoader batches and caches requests
func (*AnonymousAliasLoader) Clear ¶
func (l *AnonymousAliasLoader) Clear(key globalid.ID)
Clear the value at key from the cache, if it exists
func (*AnonymousAliasLoader) Load ¶
func (l *AnonymousAliasLoader) Load(key globalid.ID) (*model.AnonymousAlias, error)
Load a anonymousAlias by key, batching and caching will be applied automatically
func (*AnonymousAliasLoader) LoadAll ¶
func (l *AnonymousAliasLoader) LoadAll(keys []globalid.ID) ([]*model.AnonymousAlias, []error)
LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured
func (*AnonymousAliasLoader) LoadThunk ¶
func (l *AnonymousAliasLoader) LoadThunk(key globalid.ID) func() (*model.AnonymousAlias, error)
LoadThunk returns a function that when called will block waiting for a anonymousAlias. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.
func (*AnonymousAliasLoader) Prime ¶
func (l *AnonymousAliasLoader) Prime(key globalid.ID, value *model.AnonymousAlias) bool
Prime the cache with the provided key and value. If the key already exists, no change is made and false is returned. (To forcefully prime the cache, clear the key first with loader.clear(key).prime(key, value).)
type CardLoader ¶
type CardLoader struct {
// contains filtered or unexported fields
}
CardLoader batches and caches requests
func (*CardLoader) Clear ¶
func (l *CardLoader) Clear(key globalid.ID)
Clear the value at key from the cache, if it exists
func (*CardLoader) LoadAll ¶
LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured
func (*CardLoader) LoadThunk ¶
LoadThunk returns a function that when called will block waiting for a card. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.
type DBTimeLoader ¶
type DBTimeLoader struct {
// contains filtered or unexported fields
}
DBTimeLoader batches and caches requests
func (*DBTimeLoader) Clear ¶
func (l *DBTimeLoader) Clear(key globalid.ID)
Clear the value at key from the cache, if it exists
func (*DBTimeLoader) Load ¶
Load a dBTime by key, batching and caching will be applied automatically
func (*DBTimeLoader) LoadAll ¶
LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured
func (*DBTimeLoader) LoadThunk ¶
LoadThunk returns a function that when called will block waiting for a dBTime. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.
type FeedEntriesByIDLoader ¶
type FeedEntriesByIDLoader struct {
// contains filtered or unexported fields
}
FeedEntriesByIDLoader batches and caches requests
func (*FeedEntriesByIDLoader) Clear ¶
func (l *FeedEntriesByIDLoader) Clear(key globalid.ID)
Clear the value at key from the cache, if it exists
func (*FeedEntriesByIDLoader) Load ¶
func (l *FeedEntriesByIDLoader) Load(key globalid.ID) (*model.FeedEntriesByID, error)
Load a feedEntriesByID by key, batching and caching will be applied automatically
func (*FeedEntriesByIDLoader) LoadAll ¶
func (l *FeedEntriesByIDLoader) LoadAll(keys []globalid.ID) ([]*model.FeedEntriesByID, []error)
LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured
func (*FeedEntriesByIDLoader) LoadThunk ¶
func (l *FeedEntriesByIDLoader) LoadThunk(key globalid.ID) func() (*model.FeedEntriesByID, error)
LoadThunk returns a function that when called will block waiting for a feedEntriesByID. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.
func (*FeedEntriesByIDLoader) Prime ¶
func (l *FeedEntriesByIDLoader) Prime(key globalid.ID, value *model.FeedEntriesByID) bool
Prime the cache with the provided key and value. If the key already exists, no change is made and false is returned. (To forcefully prime the cache, clear the key first with loader.clear(key).prime(key, value).)
type IDTimeRangeKey ¶
type IDTimeRangeKey struct {
// contains filtered or unexported fields
}
func NewIDTimeRangeKey ¶
func NewIDTimeRangeKey(id globalid.ID, from, to time.Time) IDTimeRangeKey
type InviteLoader ¶
type InviteLoader struct {
// contains filtered or unexported fields
}
InviteLoader batches and caches requests
func (*InviteLoader) Clear ¶
func (l *InviteLoader) Clear(key globalid.ID)
Clear the value at key from the cache, if it exists
func (*InviteLoader) Load ¶
Load a invite by key, batching and caching will be applied automatically
func (*InviteLoader) LoadAll ¶
LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured
func (*InviteLoader) LoadThunk ¶
LoadThunk returns a function that when called will block waiting for a invite. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.
type Loaders ¶
type Loaders struct { UserByID *UserLoader AliasByID *AnonymousAliasLoader CardByID *CardLoader InvitesByID *InviteLoader UserEngagementLoader *UserEngagementLoader LastActiveAtByID *DBTimeLoader }
type ReactionSliceLoader ¶
type ReactionSliceLoader struct {
// contains filtered or unexported fields
}
ReactionSliceLoader batches and caches requests
func (*ReactionSliceLoader) Clear ¶
func (l *ReactionSliceLoader) Clear(key globalid.ID)
Clear the value at key from the cache, if it exists
func (*ReactionSliceLoader) Load ¶
Load a reaction by key, batching and caching will be applied automatically
func (*ReactionSliceLoader) LoadAll ¶
LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured
func (*ReactionSliceLoader) LoadThunk ¶
LoadThunk returns a function that when called will block waiting for a reaction. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.
type UserEngagementLoader ¶
type UserEngagementLoader struct {
// contains filtered or unexported fields
}
UserEngagementLoader batches and caches requests
func (*UserEngagementLoader) Clear ¶
func (l *UserEngagementLoader) Clear(key IDTimeRangeKey)
Clear the value at key from the cache, if it exists
func (*UserEngagementLoader) Load ¶
func (l *UserEngagementLoader) Load(key IDTimeRangeKey) (*model.UserEngagement, error)
Load a userEngagement by key, batching and caching will be applied automatically
func (*UserEngagementLoader) LoadAll ¶
func (l *UserEngagementLoader) LoadAll(keys []IDTimeRangeKey) ([]*model.UserEngagement, []error)
LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured
func (*UserEngagementLoader) LoadThunk ¶
func (l *UserEngagementLoader) LoadThunk(key IDTimeRangeKey) func() (*model.UserEngagement, error)
LoadThunk returns a function that when called will block waiting for a userEngagement. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.
func (*UserEngagementLoader) Prime ¶
func (l *UserEngagementLoader) Prime(key IDTimeRangeKey, value *model.UserEngagement) bool
Prime the cache with the provided key and value. If the key already exists, no change is made and false is returned. (To forcefully prime the cache, clear the key first with loader.clear(key).prime(key, value).)
type UserLoader ¶
type UserLoader struct {
// contains filtered or unexported fields
}
UserLoader batches and caches requests
func (*UserLoader) Clear ¶
func (l *UserLoader) Clear(key globalid.ID)
Clear the value at key from the cache, if it exists
func (*UserLoader) LoadAll ¶
LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured
func (*UserLoader) LoadThunk ¶
LoadThunk returns a function that when called will block waiting for a user. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.