Documentation ¶
Index ¶
- type AssetLoader
- func (l *AssetLoader) Clear(key id.AssetID)
- func (l *AssetLoader) Load(key id.AssetID) (*gqlmodel.Asset, error)
- func (l *AssetLoader) LoadAll(keys []id.AssetID) ([]*gqlmodel.Asset, []error)
- func (l *AssetLoader) LoadAllThunk(keys []id.AssetID) func() ([]*gqlmodel.Asset, []error)
- func (l *AssetLoader) LoadThunk(key id.AssetID) func() (*gqlmodel.Asset, error)
- func (l *AssetLoader) Prime(key id.AssetID, value *gqlmodel.Asset) bool
- type AssetLoaderConfig
- type DatasetLoader
- func (l *DatasetLoader) Clear(key id.DatasetID)
- func (l *DatasetLoader) Load(key id.DatasetID) (*gqlmodel.Dataset, error)
- func (l *DatasetLoader) LoadAll(keys []id.DatasetID) ([]*gqlmodel.Dataset, []error)
- func (l *DatasetLoader) LoadAllThunk(keys []id.DatasetID) func() ([]*gqlmodel.Dataset, []error)
- func (l *DatasetLoader) LoadThunk(key id.DatasetID) func() (*gqlmodel.Dataset, error)
- func (l *DatasetLoader) Prime(key id.DatasetID, value *gqlmodel.Dataset) bool
- type DatasetLoaderConfig
- type DatasetSchemaLoader
- func (l *DatasetSchemaLoader) Clear(key id.DatasetSchemaID)
- func (l *DatasetSchemaLoader) Load(key id.DatasetSchemaID) (*gqlmodel.DatasetSchema, error)
- func (l *DatasetSchemaLoader) LoadAll(keys []id.DatasetSchemaID) ([]*gqlmodel.DatasetSchema, []error)
- func (l *DatasetSchemaLoader) LoadAllThunk(keys []id.DatasetSchemaID) func() ([]*gqlmodel.DatasetSchema, []error)
- func (l *DatasetSchemaLoader) LoadThunk(key id.DatasetSchemaID) func() (*gqlmodel.DatasetSchema, error)
- func (l *DatasetSchemaLoader) Prime(key id.DatasetSchemaID, value *gqlmodel.DatasetSchema) bool
- type DatasetSchemaLoaderConfig
- type LayerGroupLoader
- func (l *LayerGroupLoader) Clear(key id.LayerID)
- func (l *LayerGroupLoader) Load(key id.LayerID) (*gqlmodel.LayerGroup, error)
- func (l *LayerGroupLoader) LoadAll(keys []id.LayerID) ([]*gqlmodel.LayerGroup, []error)
- func (l *LayerGroupLoader) LoadAllThunk(keys []id.LayerID) func() ([]*gqlmodel.LayerGroup, []error)
- func (l *LayerGroupLoader) LoadThunk(key id.LayerID) func() (*gqlmodel.LayerGroup, error)
- func (l *LayerGroupLoader) Prime(key id.LayerID, value *gqlmodel.LayerGroup) bool
- type LayerGroupLoaderConfig
- type LayerItemLoader
- func (l *LayerItemLoader) Clear(key id.LayerID)
- func (l *LayerItemLoader) Load(key id.LayerID) (*gqlmodel.LayerItem, error)
- func (l *LayerItemLoader) LoadAll(keys []id.LayerID) ([]*gqlmodel.LayerItem, []error)
- func (l *LayerItemLoader) LoadAllThunk(keys []id.LayerID) func() ([]*gqlmodel.LayerItem, []error)
- func (l *LayerItemLoader) LoadThunk(key id.LayerID) func() (*gqlmodel.LayerItem, error)
- func (l *LayerItemLoader) Prime(key id.LayerID, value *gqlmodel.LayerItem) bool
- type LayerItemLoaderConfig
- type LayerLoader
- func (l *LayerLoader) Clear(key id.LayerID)
- func (l *LayerLoader) Load(key id.LayerID) (*gqlmodel.Layer, error)
- func (l *LayerLoader) LoadAll(keys []id.LayerID) ([]*gqlmodel.Layer, []error)
- func (l *LayerLoader) LoadAllThunk(keys []id.LayerID) func() ([]*gqlmodel.Layer, []error)
- func (l *LayerLoader) LoadThunk(key id.LayerID) func() (*gqlmodel.Layer, error)
- func (l *LayerLoader) Prime(key id.LayerID, value *gqlmodel.Layer) bool
- type LayerLoaderConfig
- type PluginLoader
- func (l *PluginLoader) Clear(key id.PluginID)
- func (l *PluginLoader) Load(key id.PluginID) (*gqlmodel.Plugin, error)
- func (l *PluginLoader) LoadAll(keys []id.PluginID) ([]*gqlmodel.Plugin, []error)
- func (l *PluginLoader) LoadAllThunk(keys []id.PluginID) func() ([]*gqlmodel.Plugin, []error)
- func (l *PluginLoader) LoadThunk(key id.PluginID) func() (*gqlmodel.Plugin, error)
- func (l *PluginLoader) Prime(key id.PluginID, value *gqlmodel.Plugin) bool
- type PluginLoaderConfig
- type ProjectLoader
- func (l *ProjectLoader) Clear(key id.ProjectID)
- func (l *ProjectLoader) Load(key id.ProjectID) (*gqlmodel.Project, error)
- func (l *ProjectLoader) LoadAll(keys []id.ProjectID) ([]*gqlmodel.Project, []error)
- func (l *ProjectLoader) LoadAllThunk(keys []id.ProjectID) func() ([]*gqlmodel.Project, []error)
- func (l *ProjectLoader) LoadThunk(key id.ProjectID) func() (*gqlmodel.Project, error)
- func (l *ProjectLoader) Prime(key id.ProjectID, value *gqlmodel.Project) bool
- type ProjectLoaderConfig
- type PropertyLoader
- func (l *PropertyLoader) Clear(key id.PropertyID)
- func (l *PropertyLoader) Load(key id.PropertyID) (*gqlmodel.Property, error)
- func (l *PropertyLoader) LoadAll(keys []id.PropertyID) ([]*gqlmodel.Property, []error)
- func (l *PropertyLoader) LoadAllThunk(keys []id.PropertyID) func() ([]*gqlmodel.Property, []error)
- func (l *PropertyLoader) LoadThunk(key id.PropertyID) func() (*gqlmodel.Property, error)
- func (l *PropertyLoader) Prime(key id.PropertyID, value *gqlmodel.Property) bool
- type PropertyLoaderConfig
- type PropertySchemaLoader
- func (l *PropertySchemaLoader) Clear(key id.PropertySchemaID)
- func (l *PropertySchemaLoader) Load(key id.PropertySchemaID) (*gqlmodel.PropertySchema, error)
- func (l *PropertySchemaLoader) LoadAll(keys []id.PropertySchemaID) ([]*gqlmodel.PropertySchema, []error)
- func (l *PropertySchemaLoader) LoadAllThunk(keys []id.PropertySchemaID) func() ([]*gqlmodel.PropertySchema, []error)
- func (l *PropertySchemaLoader) LoadThunk(key id.PropertySchemaID) func() (*gqlmodel.PropertySchema, error)
- func (l *PropertySchemaLoader) Prime(key id.PropertySchemaID, value *gqlmodel.PropertySchema) bool
- type PropertySchemaLoaderConfig
- type SceneLoader
- func (l *SceneLoader) Clear(key id.SceneID)
- func (l *SceneLoader) Load(key id.SceneID) (*gqlmodel.Scene, error)
- func (l *SceneLoader) LoadAll(keys []id.SceneID) ([]*gqlmodel.Scene, []error)
- func (l *SceneLoader) LoadAllThunk(keys []id.SceneID) func() ([]*gqlmodel.Scene, []error)
- func (l *SceneLoader) LoadThunk(key id.SceneID) func() (*gqlmodel.Scene, error)
- func (l *SceneLoader) Prime(key id.SceneID, value *gqlmodel.Scene) bool
- type SceneLoaderConfig
- type TagGroupLoader
- func (l *TagGroupLoader) Clear(key id.TagID)
- func (l *TagGroupLoader) Load(key id.TagID) (*gqlmodel.TagGroup, error)
- func (l *TagGroupLoader) LoadAll(keys []id.TagID) ([]*gqlmodel.TagGroup, []error)
- func (l *TagGroupLoader) LoadAllThunk(keys []id.TagID) func() ([]*gqlmodel.TagGroup, []error)
- func (l *TagGroupLoader) LoadThunk(key id.TagID) func() (*gqlmodel.TagGroup, error)
- func (l *TagGroupLoader) Prime(key id.TagID, value *gqlmodel.TagGroup) bool
- type TagGroupLoaderConfig
- type TagItemLoader
- func (l *TagItemLoader) Clear(key id.TagID)
- func (l *TagItemLoader) Load(key id.TagID) (*gqlmodel.TagItem, error)
- func (l *TagItemLoader) LoadAll(keys []id.TagID) ([]*gqlmodel.TagItem, []error)
- func (l *TagItemLoader) LoadAllThunk(keys []id.TagID) func() ([]*gqlmodel.TagItem, []error)
- func (l *TagItemLoader) LoadThunk(key id.TagID) func() (*gqlmodel.TagItem, error)
- func (l *TagItemLoader) Prime(key id.TagID, value *gqlmodel.TagItem) bool
- type TagItemLoaderConfig
- type TagLoader
- func (l *TagLoader) Clear(key id.TagID)
- func (l *TagLoader) Load(key id.TagID) (*gqlmodel.Tag, error)
- func (l *TagLoader) LoadAll(keys []id.TagID) ([]*gqlmodel.Tag, []error)
- func (l *TagLoader) LoadAllThunk(keys []id.TagID) func() ([]*gqlmodel.Tag, []error)
- func (l *TagLoader) LoadThunk(key id.TagID) func() (*gqlmodel.Tag, error)
- func (l *TagLoader) Prime(key id.TagID, value *gqlmodel.Tag) bool
- type TagLoaderConfig
- type TeamLoader
- func (l *TeamLoader) Clear(key id.TeamID)
- func (l *TeamLoader) Load(key id.TeamID) (*gqlmodel.Team, error)
- func (l *TeamLoader) LoadAll(keys []id.TeamID) ([]*gqlmodel.Team, []error)
- func (l *TeamLoader) LoadAllThunk(keys []id.TeamID) func() ([]*gqlmodel.Team, []error)
- func (l *TeamLoader) LoadThunk(key id.TeamID) func() (*gqlmodel.Team, error)
- func (l *TeamLoader) Prime(key id.TeamID, value *gqlmodel.Team) bool
- type TeamLoaderConfig
- type UserLoader
- func (l *UserLoader) Clear(key id.UserID)
- func (l *UserLoader) Load(key id.UserID) (*gqlmodel.User, error)
- func (l *UserLoader) LoadAll(keys []id.UserID) ([]*gqlmodel.User, []error)
- func (l *UserLoader) LoadAllThunk(keys []id.UserID) func() ([]*gqlmodel.User, []error)
- func (l *UserLoader) LoadThunk(key id.UserID) func() (*gqlmodel.User, error)
- func (l *UserLoader) Prime(key id.UserID, value *gqlmodel.User) bool
- type UserLoaderConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssetLoader ¶
type AssetLoader struct {
// contains filtered or unexported fields
}
AssetLoader batches and caches requests
func NewAssetLoader ¶
func NewAssetLoader(config AssetLoaderConfig) *AssetLoader
NewAssetLoader creates a new AssetLoader given a fetch, wait, and maxBatch
func (*AssetLoader) Clear ¶
func (l *AssetLoader) Clear(key id.AssetID)
Clear the value at key from the cache, if it exists
func (*AssetLoader) LoadAll ¶
LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured
func (*AssetLoader) LoadAllThunk ¶
LoadAllThunk returns a function that when called will block waiting for a Assets. 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 (*AssetLoader) LoadThunk ¶
LoadThunk returns a function that when called will block waiting for a Asset. 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 AssetLoaderConfig ¶
type AssetLoaderConfig struct { // Fetch is a method that provides the data for the loader Fetch func(keys []id.AssetID) ([]*gqlmodel.Asset, []error) // Wait is how long wait before sending a batch Wait time.Duration // MaxBatch will limit the maximum number of keys to send in one batch, 0 = not limit MaxBatch int }
AssetLoaderConfig captures the config to create a new AssetLoader
type DatasetLoader ¶
type DatasetLoader struct {
// contains filtered or unexported fields
}
DatasetLoader batches and caches requests
func NewDatasetLoader ¶
func NewDatasetLoader(config DatasetLoaderConfig) *DatasetLoader
NewDatasetLoader creates a new DatasetLoader given a fetch, wait, and maxBatch
func (*DatasetLoader) Clear ¶
func (l *DatasetLoader) Clear(key id.DatasetID)
Clear the value at key from the cache, if it exists
func (*DatasetLoader) Load ¶
Load a Dataset by key, batching and caching will be applied automatically
func (*DatasetLoader) LoadAll ¶
LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured
func (*DatasetLoader) LoadAllThunk ¶
LoadAllThunk returns a function that when called will block waiting for a Datasets. 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 (*DatasetLoader) LoadThunk ¶
LoadThunk returns a function that when called will block waiting for a Dataset. 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 DatasetLoaderConfig ¶
type DatasetLoaderConfig struct { // Fetch is a method that provides the data for the loader Fetch func(keys []id.DatasetID) ([]*gqlmodel.Dataset, []error) // Wait is how long wait before sending a batch Wait time.Duration // MaxBatch will limit the maximum number of keys to send in one batch, 0 = not limit MaxBatch int }
DatasetLoaderConfig captures the config to create a new DatasetLoader
type DatasetSchemaLoader ¶
type DatasetSchemaLoader struct {
// contains filtered or unexported fields
}
DatasetSchemaLoader batches and caches requests
func NewDatasetSchemaLoader ¶
func NewDatasetSchemaLoader(config DatasetSchemaLoaderConfig) *DatasetSchemaLoader
NewDatasetSchemaLoader creates a new DatasetSchemaLoader given a fetch, wait, and maxBatch
func (*DatasetSchemaLoader) Clear ¶
func (l *DatasetSchemaLoader) Clear(key id.DatasetSchemaID)
Clear the value at key from the cache, if it exists
func (*DatasetSchemaLoader) Load ¶
func (l *DatasetSchemaLoader) Load(key id.DatasetSchemaID) (*gqlmodel.DatasetSchema, error)
Load a DatasetSchema by key, batching and caching will be applied automatically
func (*DatasetSchemaLoader) LoadAll ¶
func (l *DatasetSchemaLoader) LoadAll(keys []id.DatasetSchemaID) ([]*gqlmodel.DatasetSchema, []error)
LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured
func (*DatasetSchemaLoader) LoadAllThunk ¶
func (l *DatasetSchemaLoader) LoadAllThunk(keys []id.DatasetSchemaID) func() ([]*gqlmodel.DatasetSchema, []error)
LoadAllThunk returns a function that when called will block waiting for a DatasetSchemas. 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 (*DatasetSchemaLoader) LoadThunk ¶
func (l *DatasetSchemaLoader) LoadThunk(key id.DatasetSchemaID) func() (*gqlmodel.DatasetSchema, error)
LoadThunk returns a function that when called will block waiting for a DatasetSchema. 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 (*DatasetSchemaLoader) Prime ¶
func (l *DatasetSchemaLoader) Prime(key id.DatasetSchemaID, value *gqlmodel.DatasetSchema) 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 DatasetSchemaLoaderConfig ¶
type DatasetSchemaLoaderConfig struct { // Fetch is a method that provides the data for the loader Fetch func(keys []id.DatasetSchemaID) ([]*gqlmodel.DatasetSchema, []error) // Wait is how long wait before sending a batch Wait time.Duration // MaxBatch will limit the maximum number of keys to send in one batch, 0 = not limit MaxBatch int }
DatasetSchemaLoaderConfig captures the config to create a new DatasetSchemaLoader
type LayerGroupLoader ¶
type LayerGroupLoader struct {
// contains filtered or unexported fields
}
LayerGroupLoader batches and caches requests
func NewLayerGroupLoader ¶
func NewLayerGroupLoader(config LayerGroupLoaderConfig) *LayerGroupLoader
NewLayerGroupLoader creates a new LayerGroupLoader given a fetch, wait, and maxBatch
func (*LayerGroupLoader) Clear ¶
func (l *LayerGroupLoader) Clear(key id.LayerID)
Clear the value at key from the cache, if it exists
func (*LayerGroupLoader) Load ¶
func (l *LayerGroupLoader) Load(key id.LayerID) (*gqlmodel.LayerGroup, error)
Load a LayerGroup by key, batching and caching will be applied automatically
func (*LayerGroupLoader) LoadAll ¶
func (l *LayerGroupLoader) LoadAll(keys []id.LayerID) ([]*gqlmodel.LayerGroup, []error)
LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured
func (*LayerGroupLoader) LoadAllThunk ¶
func (l *LayerGroupLoader) LoadAllThunk(keys []id.LayerID) func() ([]*gqlmodel.LayerGroup, []error)
LoadAllThunk returns a function that when called will block waiting for a LayerGroups. 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 (*LayerGroupLoader) LoadThunk ¶
func (l *LayerGroupLoader) LoadThunk(key id.LayerID) func() (*gqlmodel.LayerGroup, error)
LoadThunk returns a function that when called will block waiting for a LayerGroup. 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 (*LayerGroupLoader) Prime ¶
func (l *LayerGroupLoader) Prime(key id.LayerID, value *gqlmodel.LayerGroup) 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 LayerGroupLoaderConfig ¶
type LayerGroupLoaderConfig struct { // Fetch is a method that provides the data for the loader Fetch func(keys []id.LayerID) ([]*gqlmodel.LayerGroup, []error) // Wait is how long wait before sending a batch Wait time.Duration // MaxBatch will limit the maximum number of keys to send in one batch, 0 = not limit MaxBatch int }
LayerGroupLoaderConfig captures the config to create a new LayerGroupLoader
type LayerItemLoader ¶
type LayerItemLoader struct {
// contains filtered or unexported fields
}
LayerItemLoader batches and caches requests
func NewLayerItemLoader ¶
func NewLayerItemLoader(config LayerItemLoaderConfig) *LayerItemLoader
NewLayerItemLoader creates a new LayerItemLoader given a fetch, wait, and maxBatch
func (*LayerItemLoader) Clear ¶
func (l *LayerItemLoader) Clear(key id.LayerID)
Clear the value at key from the cache, if it exists
func (*LayerItemLoader) Load ¶
Load a LayerItem by key, batching and caching will be applied automatically
func (*LayerItemLoader) LoadAll ¶
LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured
func (*LayerItemLoader) LoadAllThunk ¶
LoadAllThunk returns a function that when called will block waiting for a LayerItems. 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 (*LayerItemLoader) LoadThunk ¶
LoadThunk returns a function that when called will block waiting for a LayerItem. 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 LayerItemLoaderConfig ¶
type LayerItemLoaderConfig struct { // Fetch is a method that provides the data for the loader Fetch func(keys []id.LayerID) ([]*gqlmodel.LayerItem, []error) // Wait is how long wait before sending a batch Wait time.Duration // MaxBatch will limit the maximum number of keys to send in one batch, 0 = not limit MaxBatch int }
LayerItemLoaderConfig captures the config to create a new LayerItemLoader
type LayerLoader ¶
type LayerLoader struct {
// contains filtered or unexported fields
}
LayerLoader batches and caches requests
func NewLayerLoader ¶
func NewLayerLoader(config LayerLoaderConfig) *LayerLoader
NewLayerLoader creates a new LayerLoader given a fetch, wait, and maxBatch
func (*LayerLoader) Clear ¶
func (l *LayerLoader) Clear(key id.LayerID)
Clear the value at key from the cache, if it exists
func (*LayerLoader) LoadAll ¶
LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured
func (*LayerLoader) LoadAllThunk ¶
LoadAllThunk returns a function that when called will block waiting for a Layers. 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 (*LayerLoader) LoadThunk ¶
LoadThunk returns a function that when called will block waiting for a Layer. 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 LayerLoaderConfig ¶
type LayerLoaderConfig struct { // Fetch is a method that provides the data for the loader Fetch func(keys []id.LayerID) ([]*gqlmodel.Layer, []error) // Wait is how long wait before sending a batch Wait time.Duration // MaxBatch will limit the maximum number of keys to send in one batch, 0 = not limit MaxBatch int }
LayerLoaderConfig captures the config to create a new LayerLoader
type PluginLoader ¶
type PluginLoader struct {
// contains filtered or unexported fields
}
PluginLoader batches and caches requests
func NewPluginLoader ¶
func NewPluginLoader(config PluginLoaderConfig) *PluginLoader
NewPluginLoader creates a new PluginLoader given a fetch, wait, and maxBatch
func (*PluginLoader) Clear ¶
func (l *PluginLoader) Clear(key id.PluginID)
Clear the value at key from the cache, if it exists
func (*PluginLoader) Load ¶
Load a Plugin by key, batching and caching will be applied automatically
func (*PluginLoader) LoadAll ¶
LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured
func (*PluginLoader) LoadAllThunk ¶
LoadAllThunk returns a function that when called will block waiting for a Plugins. 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 (*PluginLoader) LoadThunk ¶
LoadThunk returns a function that when called will block waiting for a Plugin. 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 PluginLoaderConfig ¶
type PluginLoaderConfig struct { // Fetch is a method that provides the data for the loader Fetch func(keys []id.PluginID) ([]*gqlmodel.Plugin, []error) // Wait is how long wait before sending a batch Wait time.Duration // MaxBatch will limit the maximum number of keys to send in one batch, 0 = not limit MaxBatch int }
PluginLoaderConfig captures the config to create a new PluginLoader
type ProjectLoader ¶
type ProjectLoader struct {
// contains filtered or unexported fields
}
ProjectLoader batches and caches requests
func NewProjectLoader ¶
func NewProjectLoader(config ProjectLoaderConfig) *ProjectLoader
NewProjectLoader creates a new ProjectLoader given a fetch, wait, and maxBatch
func (*ProjectLoader) Clear ¶
func (l *ProjectLoader) Clear(key id.ProjectID)
Clear the value at key from the cache, if it exists
func (*ProjectLoader) Load ¶
Load a Project by key, batching and caching will be applied automatically
func (*ProjectLoader) LoadAll ¶
LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured
func (*ProjectLoader) LoadAllThunk ¶
LoadAllThunk returns a function that when called will block waiting for a Projects. 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 (*ProjectLoader) LoadThunk ¶
LoadThunk returns a function that when called will block waiting for a Project. 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 ProjectLoaderConfig ¶
type ProjectLoaderConfig struct { // Fetch is a method that provides the data for the loader Fetch func(keys []id.ProjectID) ([]*gqlmodel.Project, []error) // Wait is how long wait before sending a batch Wait time.Duration // MaxBatch will limit the maximum number of keys to send in one batch, 0 = not limit MaxBatch int }
ProjectLoaderConfig captures the config to create a new ProjectLoader
type PropertyLoader ¶
type PropertyLoader struct {
// contains filtered or unexported fields
}
PropertyLoader batches and caches requests
func NewPropertyLoader ¶
func NewPropertyLoader(config PropertyLoaderConfig) *PropertyLoader
NewPropertyLoader creates a new PropertyLoader given a fetch, wait, and maxBatch
func (*PropertyLoader) Clear ¶
func (l *PropertyLoader) Clear(key id.PropertyID)
Clear the value at key from the cache, if it exists
func (*PropertyLoader) Load ¶
func (l *PropertyLoader) Load(key id.PropertyID) (*gqlmodel.Property, error)
Load a Property by key, batching and caching will be applied automatically
func (*PropertyLoader) LoadAll ¶
func (l *PropertyLoader) LoadAll(keys []id.PropertyID) ([]*gqlmodel.Property, []error)
LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured
func (*PropertyLoader) LoadAllThunk ¶
func (l *PropertyLoader) LoadAllThunk(keys []id.PropertyID) func() ([]*gqlmodel.Property, []error)
LoadAllThunk returns a function that when called will block waiting for a Propertys. 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 (*PropertyLoader) LoadThunk ¶
func (l *PropertyLoader) LoadThunk(key id.PropertyID) func() (*gqlmodel.Property, error)
LoadThunk returns a function that when called will block waiting for a Property. 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 (*PropertyLoader) Prime ¶
func (l *PropertyLoader) Prime(key id.PropertyID, value *gqlmodel.Property) 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 PropertyLoaderConfig ¶
type PropertyLoaderConfig struct { // Fetch is a method that provides the data for the loader Fetch func(keys []id.PropertyID) ([]*gqlmodel.Property, []error) // Wait is how long wait before sending a batch Wait time.Duration // MaxBatch will limit the maximum number of keys to send in one batch, 0 = not limit MaxBatch int }
PropertyLoaderConfig captures the config to create a new PropertyLoader
type PropertySchemaLoader ¶
type PropertySchemaLoader struct {
// contains filtered or unexported fields
}
PropertySchemaLoader batches and caches requests
func NewPropertySchemaLoader ¶
func NewPropertySchemaLoader(config PropertySchemaLoaderConfig) *PropertySchemaLoader
NewPropertySchemaLoader creates a new PropertySchemaLoader given a fetch, wait, and maxBatch
func (*PropertySchemaLoader) Clear ¶
func (l *PropertySchemaLoader) Clear(key id.PropertySchemaID)
Clear the value at key from the cache, if it exists
func (*PropertySchemaLoader) Load ¶
func (l *PropertySchemaLoader) Load(key id.PropertySchemaID) (*gqlmodel.PropertySchema, error)
Load a PropertySchema by key, batching and caching will be applied automatically
func (*PropertySchemaLoader) LoadAll ¶
func (l *PropertySchemaLoader) LoadAll(keys []id.PropertySchemaID) ([]*gqlmodel.PropertySchema, []error)
LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured
func (*PropertySchemaLoader) LoadAllThunk ¶
func (l *PropertySchemaLoader) LoadAllThunk(keys []id.PropertySchemaID) func() ([]*gqlmodel.PropertySchema, []error)
LoadAllThunk returns a function that when called will block waiting for a PropertySchemas. 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 (*PropertySchemaLoader) LoadThunk ¶
func (l *PropertySchemaLoader) LoadThunk(key id.PropertySchemaID) func() (*gqlmodel.PropertySchema, error)
LoadThunk returns a function that when called will block waiting for a PropertySchema. 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 (*PropertySchemaLoader) Prime ¶
func (l *PropertySchemaLoader) Prime(key id.PropertySchemaID, value *gqlmodel.PropertySchema) 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 PropertySchemaLoaderConfig ¶
type PropertySchemaLoaderConfig struct { // Fetch is a method that provides the data for the loader Fetch func(keys []id.PropertySchemaID) ([]*gqlmodel.PropertySchema, []error) // Wait is how long wait before sending a batch Wait time.Duration // MaxBatch will limit the maximum number of keys to send in one batch, 0 = not limit MaxBatch int }
PropertySchemaLoaderConfig captures the config to create a new PropertySchemaLoader
type SceneLoader ¶
type SceneLoader struct {
// contains filtered or unexported fields
}
SceneLoader batches and caches requests
func NewSceneLoader ¶
func NewSceneLoader(config SceneLoaderConfig) *SceneLoader
NewSceneLoader creates a new SceneLoader given a fetch, wait, and maxBatch
func (*SceneLoader) Clear ¶
func (l *SceneLoader) Clear(key id.SceneID)
Clear the value at key from the cache, if it exists
func (*SceneLoader) LoadAll ¶
LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured
func (*SceneLoader) LoadAllThunk ¶
LoadAllThunk returns a function that when called will block waiting for a Scenes. 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 (*SceneLoader) LoadThunk ¶
LoadThunk returns a function that when called will block waiting for a Scene. 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 SceneLoaderConfig ¶
type SceneLoaderConfig struct { // Fetch is a method that provides the data for the loader Fetch func(keys []id.SceneID) ([]*gqlmodel.Scene, []error) // Wait is how long wait before sending a batch Wait time.Duration // MaxBatch will limit the maximum number of keys to send in one batch, 0 = not limit MaxBatch int }
SceneLoaderConfig captures the config to create a new SceneLoader
type TagGroupLoader ¶
type TagGroupLoader struct {
// contains filtered or unexported fields
}
TagGroupLoader batches and caches requests
func NewTagGroupLoader ¶
func NewTagGroupLoader(config TagGroupLoaderConfig) *TagGroupLoader
NewTagGroupLoader creates a new TagGroupLoader given a fetch, wait, and maxBatch
func (*TagGroupLoader) Clear ¶
func (l *TagGroupLoader) Clear(key id.TagID)
Clear the value at key from the cache, if it exists
func (*TagGroupLoader) Load ¶
Load a TagGroup by key, batching and caching will be applied automatically
func (*TagGroupLoader) LoadAll ¶
LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured
func (*TagGroupLoader) LoadAllThunk ¶
LoadAllThunk returns a function that when called will block waiting for a TagGroups. 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 (*TagGroupLoader) LoadThunk ¶
LoadThunk returns a function that when called will block waiting for a TagGroup. 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 TagGroupLoaderConfig ¶
type TagGroupLoaderConfig struct { // Fetch is a method that provides the data for the loader Fetch func(keys []id.TagID) ([]*gqlmodel.TagGroup, []error) // Wait is how long wait before sending a batch Wait time.Duration // MaxBatch will limit the maximum number of keys to send in one batch, 0 = not limit MaxBatch int }
TagGroupLoaderConfig captures the config to create a new TagGroupLoader
type TagItemLoader ¶
type TagItemLoader struct {
// contains filtered or unexported fields
}
TagItemLoader batches and caches requests
func NewTagItemLoader ¶
func NewTagItemLoader(config TagItemLoaderConfig) *TagItemLoader
NewTagItemLoader creates a new TagItemLoader given a fetch, wait, and maxBatch
func (*TagItemLoader) Clear ¶
func (l *TagItemLoader) Clear(key id.TagID)
Clear the value at key from the cache, if it exists
func (*TagItemLoader) Load ¶
Load a TagItem by key, batching and caching will be applied automatically
func (*TagItemLoader) LoadAll ¶
LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured
func (*TagItemLoader) LoadAllThunk ¶
LoadAllThunk returns a function that when called will block waiting for a TagItems. 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 (*TagItemLoader) LoadThunk ¶
LoadThunk returns a function that when called will block waiting for a TagItem. 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 TagItemLoaderConfig ¶
type TagItemLoaderConfig struct { // Fetch is a method that provides the data for the loader Fetch func(keys []id.TagID) ([]*gqlmodel.TagItem, []error) // Wait is how long wait before sending a batch Wait time.Duration // MaxBatch will limit the maximum number of keys to send in one batch, 0 = not limit MaxBatch int }
TagItemLoaderConfig captures the config to create a new TagItemLoader
type TagLoader ¶
type TagLoader struct {
// contains filtered or unexported fields
}
TagLoader batches and caches requests
func NewTagLoader ¶
func NewTagLoader(config TagLoaderConfig) *TagLoader
NewTagLoader creates a new TagLoader given a fetch, wait, and maxBatch
func (*TagLoader) LoadAll ¶
LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured
func (*TagLoader) LoadAllThunk ¶
LoadAllThunk returns a function that when called will block waiting for a Tags. 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 (*TagLoader) LoadThunk ¶
LoadThunk returns a function that when called will block waiting for a Tag. 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 TagLoaderConfig ¶
type TagLoaderConfig struct { // Fetch is a method that provides the data for the loader Fetch func(keys []id.TagID) ([]*gqlmodel.Tag, []error) // Wait is how long wait before sending a batch Wait time.Duration // MaxBatch will limit the maximum number of keys to send in one batch, 0 = not limit MaxBatch int }
TagLoaderConfig captures the config to create a new TagLoader
type TeamLoader ¶
type TeamLoader struct {
// contains filtered or unexported fields
}
TeamLoader batches and caches requests
func NewTeamLoader ¶
func NewTeamLoader(config TeamLoaderConfig) *TeamLoader
NewTeamLoader creates a new TeamLoader given a fetch, wait, and maxBatch
func (*TeamLoader) Clear ¶
func (l *TeamLoader) Clear(key id.TeamID)
Clear the value at key from the cache, if it exists
func (*TeamLoader) LoadAll ¶
LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured
func (*TeamLoader) LoadAllThunk ¶
LoadAllThunk returns a function that when called will block waiting for a Teams. 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 (*TeamLoader) LoadThunk ¶
LoadThunk returns a function that when called will block waiting for a Team. 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 TeamLoaderConfig ¶
type TeamLoaderConfig struct { // Fetch is a method that provides the data for the loader Fetch func(keys []id.TeamID) ([]*gqlmodel.Team, []error) // Wait is how long wait before sending a batch Wait time.Duration // MaxBatch will limit the maximum number of keys to send in one batch, 0 = not limit MaxBatch int }
TeamLoaderConfig captures the config to create a new TeamLoader
type UserLoader ¶
type UserLoader struct {
// contains filtered or unexported fields
}
UserLoader batches and caches requests
func NewUserLoader ¶
func NewUserLoader(config UserLoaderConfig) *UserLoader
NewUserLoader creates a new UserLoader given a fetch, wait, and maxBatch
func (*UserLoader) Clear ¶
func (l *UserLoader) Clear(key id.UserID)
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) LoadAllThunk ¶
LoadAllThunk returns a function that when called will block waiting for a Users. 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 (*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.
type UserLoaderConfig ¶
type UserLoaderConfig struct { // Fetch is a method that provides the data for the loader Fetch func(keys []id.UserID) ([]*gqlmodel.User, []error) // Wait is how long wait before sending a batch Wait time.Duration // MaxBatch will limit the maximum number of keys to send in one batch, 0 = not limit MaxBatch int }
UserLoaderConfig captures the config to create a new UserLoader
Source Files ¶
- assetloader_gen.go
- dataloader.go
- datasetloader_gen.go
- datasetschemaloader_gen.go
- layergrouploader_gen.go
- layeritemloader_gen.go
- layerloader_gen.go
- pluginloader_gen.go
- projectloader_gen.go
- propertyloader_gen.go
- propertyschemaloader_gen.go
- sceneloader_gen.go
- taggrouploader_gen.go
- tagitemloader_gen.go
- tagloader_gen.go
- teamloader_gen.go
- userloader_gen.go