loaders

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMiddleware

func NewMiddleware(repositories Repositories, waitTime time.Duration) func(next http.Handler) http.Handler

NewMiddleware wires up the dataloaders into the http pipeline

Types

type ComponentLoader

type ComponentLoader struct {
	// contains filtered or unexported fields
}

ComponentLoader is the dataloader for component relationships

func NewComponentLoader

func NewComponentLoader(ctx context.Context, repository ComponentRepository, waitTime time.Duration) *ComponentLoader

NewComponentLoader creates a new component dataloader

func (*ComponentLoader) DependsOn added in v0.12.0

func (c *ComponentLoader) DependsOn(componentID int) ([]*model.Component, error)

DependsOn returns the components this component depends on

func (*ComponentLoader) ProcessorsByComponent

func (c *ComponentLoader) ProcessorsByComponent(componentID int) ([]*model.Processor, error)

ProcessorsByComponent returns the processors for the component

func (*ComponentLoader) ServiceByComponent

func (c *ComponentLoader) ServiceByComponent(componentID int) (*model.Service, error)

ServiceByComponent returns the component's service

func (*ComponentLoader) SinksByComponent

func (c *ComponentLoader) SinksByComponent(componentID int) ([]*model.Sink, error)

SinksByComponent returns the sinks for the component

func (*ComponentLoader) SourcesByComponent

func (c *ComponentLoader) SourcesByComponent(componentID int) ([]*model.Source, error)

SourcesByComponent returns the sources for the component

func (*ComponentLoader) ViewSinksByComponent

func (c *ComponentLoader) ViewSinksByComponent(componentID int) ([]*model.ViewSink, error)

ViewSinksByComponent returns the view sinks for the component

func (*ComponentLoader) ViewSourcesByComponent

func (c *ComponentLoader) ViewSourcesByComponent(componentID int) ([]*model.ViewSource, error)

ViewSourcesByComponent returns the view sources for the component

func (*ComponentLoader) ViewsByComponent

func (c *ComponentLoader) ViewsByComponent(componentID int) ([]*model.View, error)

ViewsByComponent returns the views for the components

type ComponentRepository

type ComponentRepository interface {
	ServicesByComponents(ctx context.Context, components []int) ([]*model.Service, error)
	ProcessorsByComponents(ctx context.Context, components []int) ([][]*model.Processor, error)
	SinksByComponents(ctx context.Context, components []int) ([][]*model.Sink, error)
	SourcesByComponents(ctx context.Context, components []int) ([][]*model.Source, error)
	ViewSinksByComponents(ctx context.Context, components []int) ([][]*model.ViewSink, error)
	ViewSourcesByComponents(ctx context.Context, components []int) ([][]*model.ViewSource, error)
	ViewsByComponents(ctx context.Context, components []int) ([][]*model.View, error)
	DependsOn(context.Context, []int) ([][]*model.Component, error)
}

ComponentRepository is the datastore repository for components

type LoaderFactory

type LoaderFactory struct{}

LoaderFactory gets the data loaders from the context

func (*LoaderFactory) ComponentLoader

func (f *LoaderFactory) ComponentLoader(ctx context.Context) resolvers.ComponentLoader

ComponentLoader returns the component data loader

func (*LoaderFactory) PodLoader

func (f *LoaderFactory) PodLoader(ctx context.Context) resolvers.PodLoader

PodLoader returns the pod data loader

func (*LoaderFactory) ProcessorInputLoader

func (f *LoaderFactory) ProcessorInputLoader(ctx context.Context) resolvers.ProcessorInputLoader

ProcessorInputLoader returns the processor input data loader

func (*LoaderFactory) ProcessorJoinLoader

func (f *LoaderFactory) ProcessorJoinLoader(ctx context.Context) resolvers.ProcessorJoinLoader

ProcessorJoinLoader returns the processor join data loader

func (*LoaderFactory) ProcessorLoader

func (f *LoaderFactory) ProcessorLoader(ctx context.Context) resolvers.ProcessorLoader

ProcessorLoader returns the processor data loader

func (*LoaderFactory) ProcessorLookupLoader

func (f *LoaderFactory) ProcessorLookupLoader(ctx context.Context) resolvers.ProcessorLookupLoader

ProcessorLookupLoader returns the processor lookup data loader

func (*LoaderFactory) ProcessorOutputLoader

func (f *LoaderFactory) ProcessorOutputLoader(ctx context.Context) resolvers.ProcessorOutputLoader

ProcessorOutputLoader returns the processor output data loader

func (*LoaderFactory) QueryLoader

func (f *LoaderFactory) QueryLoader(ctx context.Context) resolvers.QueryLoader

QueryLoader returns the query data loader

func (*LoaderFactory) ServiceLoader

func (f *LoaderFactory) ServiceLoader(ctx context.Context) resolvers.ServiceLoader

ServiceLoader returns the service data loader

func (*LoaderFactory) SinkLoader

func (f *LoaderFactory) SinkLoader(ctx context.Context) resolvers.SinkLoader

SinkLoader returns the sink data loader

func (*LoaderFactory) SourceLoader

func (f *LoaderFactory) SourceLoader(ctx context.Context) resolvers.SourceLoader

SourceLoader returns the source data loader

func (*LoaderFactory) TopicLoader

func (f *LoaderFactory) TopicLoader(ctx context.Context) resolvers.TopicLoader

TopicLoader returns the topic data loader

func (*LoaderFactory) ViewLoader

func (f *LoaderFactory) ViewLoader(ctx context.Context) resolvers.ViewLoader

ViewLoader returns the view data loader

func (*LoaderFactory) ViewSinkLoader

func (f *LoaderFactory) ViewSinkLoader(ctx context.Context) resolvers.ViewSinkLoader

ViewSinkLoader returns the view sink data loader

func (*LoaderFactory) ViewSourceLoader

func (f *LoaderFactory) ViewSourceLoader(ctx context.Context) resolvers.ViewSourceLoader

ViewSourceLoader returns the view source data loader

type Loaders

type Loaders struct {
	ComponentLoader       *ComponentLoader
	ServiceLoader         *ServiceLoader
	ProcessorLoader       *ProcessorLoader
	ProcessorInputLoader  *ProcessorInputLoader
	ProcessorJoinLoader   *ProcessorJoinLoader
	ProcessorLookupLoader *ProcessorLookupLoader
	ProcessorOutputLoader *ProcessorOutputLoader
	SinkLoader            *SinkLoader
	SourceLoader          *SourceLoader
	ViewSinkLoader        *ViewSinkLoader
	ViewSourceLoader      *ViewSourceLoader
	ViewLoader            *ViewLoader
	PodLoader             *PodLoader
	TopicLoader           *TopicLoader
	QueryLoader           *QueryLoader
}

Loaders is a collection of model loaders

func NewLoaders

func NewLoaders(ctx context.Context, repositories Repositories, waitTime time.Duration) *Loaders

NewLoaders creates a new Loaders

type PodLoader

type PodLoader struct {
	// contains filtered or unexported fields
}

PodLoader contains data loaders for pod relationships

func NewPodLoader

func NewPodLoader(ctx context.Context, repository PodRepository, waitTime time.Duration) *PodLoader

NewPodLoader creates a new pod data loader

func (*PodLoader) ProcessorsByPod

func (l *PodLoader) ProcessorsByPod(podID int) ([]*model.Processor, error)

ProcessorsByPod returns the processors for the pod

func (*PodLoader) SinksByPod

func (l *PodLoader) SinksByPod(podID int) ([]*model.Sink, error)

SinksByPod returns the sinks for the pod

func (*PodLoader) SourcesByPod

func (l *PodLoader) SourcesByPod(podID int) ([]*model.Source, error)

SourcesByPod returns the sources for the pod

func (*PodLoader) ViewSinksByPod

func (l *PodLoader) ViewSinksByPod(podID int) ([]*model.ViewSink, error)

ViewSinksByPod returns the view sinks for the pod

func (*PodLoader) ViewSourcesByPod

func (l *PodLoader) ViewSourcesByPod(podID int) ([]*model.ViewSource, error)

ViewSourcesByPod returns the view sources for the pod

func (*PodLoader) ViewsByPod

func (l *PodLoader) ViewsByPod(podID int) ([]*model.View, error)

ViewsByPod returns the views for the pod

type PodRepository

type PodRepository interface {
	ProcessorsByPods(context.Context, []int) ([][]*model.Processor, error)
	SinksByPods(context.Context, []int) ([][]*model.Sink, error)
	SourcesByPods(ctx context.Context, pods []int) ([][]*model.Source, error)
	ViewSinksByPods(ctx context.Context, pods []int) ([][]*model.ViewSink, error)
	ViewSourcesByPods(ctx context.Context, pods []int) ([][]*model.ViewSource, error)
	ViewsByPods(ctx context.Context, pods []int) ([][]*model.View, error)
}

PodRepository is the datastore repository for pods

type ProcessorInputLoader

type ProcessorInputLoader struct {
	// contains filtered or unexported fields
}

ProcessorInputLoader contains data loaders for processor input relationships

func NewProcessorInputLoader

func NewProcessorInputLoader(ctx context.Context, repository ProcessorInputRepository, waitTime time.Duration) *ProcessorInputLoader

NewProcessorInputLoader creates a new processor inputs loader

func (*ProcessorInputLoader) ProcessorByInput

func (l *ProcessorInputLoader) ProcessorByInput(inputID int) (*model.Processor, error)

ProcessorByInput returns the processor for the input

func (*ProcessorInputLoader) TopicByInput

func (l *ProcessorInputLoader) TopicByInput(inputID int) (*model.Topic, error)

TopicByInput returns the topic for the input

type ProcessorInputRepository

type ProcessorInputRepository interface {
	ProcessorByInputs(context.Context, []int) ([]*model.Processor, error)
	TopicByInputs(context.Context, []int) ([]*model.Topic, error)
}

ProcessorInputRepository is the datastore repository for processor inputs

type ProcessorJoinLoader

type ProcessorJoinLoader struct {
	// contains filtered or unexported fields
}

ProcessorJoinLoader contains data loaders for processor join relationships

func NewProcessorJoinLoader

func NewProcessorJoinLoader(ctx context.Context, repository ProcessorJoinRepository, waitTime time.Duration) *ProcessorJoinLoader

NewProcessorJoinLoader creates a new ProcessorJoinLoader

func (*ProcessorJoinLoader) ProcessorByJoin

func (l *ProcessorJoinLoader) ProcessorByJoin(joinID int) (*model.Processor, error)

ProcessorByJoin returns the processor for the join

func (*ProcessorJoinLoader) TopicByJoin

func (l *ProcessorJoinLoader) TopicByJoin(joinID int) (*model.Topic, error)

TopicByJoin returns the topic for the join

type ProcessorJoinRepository

type ProcessorJoinRepository interface {
	ProcessorByJoins(ctx context.Context, joins []int) ([]*model.Processor, error)
	TopicByJoins(ctx context.Context, joins []int) ([]*model.Topic, error)
}

ProcessorJoinRepository is the datastore respository for processor joins

type ProcessorLoader

type ProcessorLoader struct {
	// contains filtered or unexported fields
}

ProcessorLoader contains data loaders for processor relationships

func NewProcessorLoader

func NewProcessorLoader(ctx context.Context, repository ProcessorRepository, waitTime time.Duration) *ProcessorLoader

NewProcessorLoader creates a new ProcessorLoader

func (*ProcessorLoader) ComponentByProcessor

func (l *ProcessorLoader) ComponentByProcessor(processorID int) (*model.Component, error)

ComponentByProcessor returns the component for a processor

func (*ProcessorLoader) InputsByProcessor

func (l *ProcessorLoader) InputsByProcessor(processorID int) ([]*model.ProcessorInput, error)

InputsByProcessor returns the inputs for a processor

func (*ProcessorLoader) JoinsByProcessor

func (l *ProcessorLoader) JoinsByProcessor(processorID int) ([]*model.ProcessorJoin, error)

JoinsByProcessor returns the joins for a processor

func (*ProcessorLoader) LookupsByProcessor

func (l *ProcessorLoader) LookupsByProcessor(processorID int) ([]*model.ProcessorLookup, error)

LookupsByProcessor returns the lookups for a processor

func (*ProcessorLoader) OutputsByProcessor

func (l *ProcessorLoader) OutputsByProcessor(processorID int) ([]*model.ProcessorOutput, error)

OutputsByProcessor returns the outputs for a processor

func (*ProcessorLoader) PersistenceByProcessor

func (l *ProcessorLoader) PersistenceByProcessor(processorID int) (*model.Topic, error)

PersistenceByProcessor returns the perisistence topic for a processor

func (*ProcessorLoader) PodsByProcessor

func (l *ProcessorLoader) PodsByProcessor(processorID int) ([]*model.Pod, error)

PodsByProcessor returns the pods for a processor

type ProcessorLookupLoader

type ProcessorLookupLoader struct {
	// contains filtered or unexported fields
}

ProcessorLookupLoader contains data loaders for processor lookup relationships

func NewProcessorLookupLoader

func NewProcessorLookupLoader(ctx context.Context, repository ProcessorLookupRepository, waitTime time.Duration) *ProcessorLookupLoader

NewProcessorLookupLoader creates a new ProcessorLookupLoader

func (*ProcessorLookupLoader) ProcessorByLookup

func (l *ProcessorLookupLoader) ProcessorByLookup(lookupID int) (*model.Processor, error)

ProcessorByLookup returns the processor for the lookup

func (*ProcessorLookupLoader) TopicByLookup

func (l *ProcessorLookupLoader) TopicByLookup(lookupID int) (*model.Topic, error)

TopicByLookup returns the topic for the lookup

type ProcessorLookupRepository

type ProcessorLookupRepository interface {
	ProcessorByLookups(ctx context.Context, lookups []int) ([]*model.Processor, error)
	TopicByLookups(ctx context.Context, lookups []int) ([]*model.Topic, error)
}

ProcessorLookupRepository is the datastore repository for processor lookups

type ProcessorOutputLoader

type ProcessorOutputLoader struct {
	// contains filtered or unexported fields
}

ProcessorOutputLoader contains data loaders for processor output relationships

func NewProcessorOutputLoader

func NewProcessorOutputLoader(ctx context.Context, repository ProcessorOutputRepository, waitTime time.Duration) *ProcessorOutputLoader

NewProcessorOutputLoader creates a new ProcessorOutputLoader

func (*ProcessorOutputLoader) ProcessorByOutput

func (l *ProcessorOutputLoader) ProcessorByOutput(outputID int) (*model.Processor, error)

ProcessorByOutput returns the processor for an output

func (*ProcessorOutputLoader) TopicByOutput

func (l *ProcessorOutputLoader) TopicByOutput(outputID int) (*model.Topic, error)

TopicByOutput returns the topic for an output

type ProcessorOutputRepository

type ProcessorOutputRepository interface {
	ProcessorByOutputs(ctx context.Context, outputs []int) ([]*model.Processor, error)
	TopicByOutputs(ctx context.Context, outputs []int) ([]*model.Topic, error)
}

ProcessorOutputRepository is the datastore repository for processor outputs

type ProcessorRepository

type ProcessorRepository interface {
	ComponentByProcessors(ctx context.Context, processors []int) ([]*model.Component, error)
	InputsByProcessors(ctx context.Context, processors []int) ([][]*model.ProcessorInput, error)
	JoinsByProcessors(ctx context.Context, processors []int) ([][]*model.ProcessorJoin, error)
	LookupsByProcessors(ctx context.Context, processors []int) ([][]*model.ProcessorLookup, error)
	OutputsByProcessors(ctx context.Context, processors []int) ([][]*model.ProcessorOutput, error)
	PodsByProcessors(ctx context.Context, processors []int) ([][]*model.Pod, error)
	PersistenceByProcessors(ctx context.Context, processors []int) ([]*model.Topic, error)
	ByID(context.Context, int) (*model.Processor, error)
}

ProcessorRepository is the datastore repository for processors

type QueryLoader

type QueryLoader struct {
	// contains filtered or unexported fields
}

QueryLoader is the dataloader for root queries

func NewQueryLoader

func NewQueryLoader(ctx context.Context, repository QueryRepository) *QueryLoader

NewQueryLoader creates a new QueryLoader

func (*QueryLoader) ComponentByID added in v0.13.0

func (l *QueryLoader) ComponentByID(id int) (*model.Component, error)

ComponentByID returns a component by id

func (*QueryLoader) GetAllPods

func (l *QueryLoader) GetAllPods() ([]*model.Pod, error)

GetAllPods returns all pods

func (*QueryLoader) GetAllServices

func (l *QueryLoader) GetAllServices() ([]*model.Service, error)

GetAllServices returns all services

func (*QueryLoader) GetAllTopics

func (l *QueryLoader) GetAllTopics() ([]*model.Topic, error)

GetAllTopics returns all topics

func (*QueryLoader) ServiceByID added in v0.11.0

func (l *QueryLoader) ServiceByID(id int) (*model.Service, error)

ServiceByID returns a service by id

type QueryRepository

type QueryRepository interface {
	GetAllServices(context.Context) ([]*model.Service, error)
	GetAllPods(context.Context) ([]*model.Pod, error)
	GetAllTopics(context.Context) ([]*model.Topic, error)
	ServiceByID(context.Context, int) (*model.Service, error)
	ComponentByID(context.Context, int) (*model.Component, error)
}

QueryRepository is the datastore repository for root queries

type Repositories

type Repositories interface {
	Component() ComponentRepository
	Service() ServiceRepository
	Processor() ProcessorRepository
	ProcessorInput() ProcessorInputRepository
	ProcessorJoin() ProcessorJoinRepository
	ProcessorLookup() ProcessorLookupRepository
	ProcessorOutput() ProcessorOutputRepository
	Sink() SinkRepository
	Source() SourceRepository
	ViewSink() ViewSinkRepository
	ViewSource() ViewSourceRepository
	View() ViewRepository
	Pod() PodRepository
	Topic() TopicRepository
	Query() QueryRepository
}

Repositories is a collection of all data repositories

type ServiceLoader

type ServiceLoader struct {
	// contains filtered or unexported fields
}

ServiceLoader contains data loaders for service relationships

func NewServiceLoader

func NewServiceLoader(ctx context.Context, repository ServiceRepository, waitTime time.Duration) *ServiceLoader

NewServiceLoader creates a new ServiceLoader

func (*ServiceLoader) ComponentsByService

func (l *ServiceLoader) ComponentsByService(serviceID int) ([]*model.Component, error)

ComponentsByService returns components for the service

func (*ServiceLoader) DependsOn added in v0.11.0

func (l *ServiceLoader) DependsOn(serviceID int) ([]*model.Service, error)

DependsOn returns services this service depends on

type ServiceRepository

type ServiceRepository interface {
	ComponentsByServices(ctx context.Context, services []int) ([][]*model.Component, error)
	DependsOn(context.Context, []int) ([][]*model.Service, error)
}

ServiceRepository is the datastore repository for services

type SinkLoader

type SinkLoader struct {
	// contains filtered or unexported fields
}

SinkLoader contains data loaders for sink relationships

func NewSinkLoader

func NewSinkLoader(ctx context.Context, repository SinkRepository, waitTime time.Duration) *SinkLoader

NewSinkLoader creates a new SinkLoader

func (*SinkLoader) ComponentBySink

func (l *SinkLoader) ComponentBySink(sinkID int) (*model.Component, error)

ComponentBySink returns the component for the sink

func (*SinkLoader) PodsBySink

func (l *SinkLoader) PodsBySink(sinkID int) ([]*model.Pod, error)

PodsBySink returns the pods for the sink

func (*SinkLoader) TopicBySink

func (l *SinkLoader) TopicBySink(sinkID int) (*model.Topic, error)

TopicBySink returns the topic for the sink

type SinkRepository

type SinkRepository interface {
	ComponentBySinks(ctx context.Context, sinks []int) ([]*model.Component, error)
	PodsBySinks(ctx context.Context, sinks []int) ([][]*model.Pod, error)
	TopicBySinks(ctx context.Context, sinks []int) ([]*model.Topic, error)
}

SinkRepository is the datastore repository for sinks

type SourceLoader

type SourceLoader struct {
	// contains filtered or unexported fields
}

SourceLoader contains data loaders for source relationships

func NewSourceLoader

func NewSourceLoader(ctx context.Context, repository SourceRepository, waitTime time.Duration) *SourceLoader

NewSourceLoader creates a new SourceLoader

func (*SourceLoader) ComponentBySource

func (l *SourceLoader) ComponentBySource(sourceID int) (*model.Component, error)

ComponentBySource returns the component for the source

func (*SourceLoader) PodsBySource

func (l *SourceLoader) PodsBySource(sourceID int) ([]*model.Pod, error)

PodsBySource returns the pods for the source

func (*SourceLoader) TopicBySource

func (l *SourceLoader) TopicBySource(sourceID int) (*model.Topic, error)

TopicBySource returns the topic for the source

type SourceRepository

type SourceRepository interface {
	ComponentBySources(ctx context.Context, sources []int) ([]*model.Component, error)
	PodsBySources(ctx context.Context, sources []int) ([][]*model.Pod, error)
	TopicBySources(ctx context.Context, sources []int) ([]*model.Topic, error)
}

SourceRepository is the datastore repository for sources

type TopicLoader

type TopicLoader struct {
	// contains filtered or unexported fields
}

TopicLoader contains data loaders for topic relationships

func NewTopicLoader

func NewTopicLoader(ctx context.Context, repository TopicRepository, waitTime time.Duration) *TopicLoader

NewTopicLoader creates a new TopicLoader

func (*TopicLoader) ProcessorInputsByTopic

func (l *TopicLoader) ProcessorInputsByTopic(topicID int) ([]*model.ProcessorInput, error)

ProcessorInputsByTopic returns the processor inputs for the topic

func (*TopicLoader) ProcessorJoinsByTopic

func (l *TopicLoader) ProcessorJoinsByTopic(topicID int) ([]*model.ProcessorJoin, error)

ProcessorJoinsByTopic returns the processor joins for the topic

func (*TopicLoader) ProcessorLookupsByTopic

func (l *TopicLoader) ProcessorLookupsByTopic(topicID int) ([]*model.ProcessorLookup, error)

ProcessorLookupsByTopic returns the processor lookups for the topic

func (*TopicLoader) ProcessorOutputsByTopic

func (l *TopicLoader) ProcessorOutputsByTopic(topicID int) ([]*model.ProcessorOutput, error)

ProcessorOutputsByTopic returns the processor outputs for the topic

func (*TopicLoader) ProcessorPersistencesByTopic

func (l *TopicLoader) ProcessorPersistencesByTopic(topicID int) ([]*model.Processor, error)

ProcessorPersistencesByTopic returns the processor persistence for the topic

func (*TopicLoader) SinksByTopic

func (l *TopicLoader) SinksByTopic(topicID int) ([]*model.Sink, error)

SinksByTopic returns the sinks for the topic

func (*TopicLoader) SourcesByTopic

func (l *TopicLoader) SourcesByTopic(topicID int) ([]*model.Source, error)

SourcesByTopic returns the sources for the topic

func (*TopicLoader) ViewSinksByTopic

func (l *TopicLoader) ViewSinksByTopic(topicID int) ([]*model.ViewSink, error)

ViewSinksByTopic returns the view sinks for the topic

func (*TopicLoader) ViewSourcesByTopic

func (l *TopicLoader) ViewSourcesByTopic(topicID int) ([]*model.ViewSource, error)

ViewSourcesByTopic returns the view sources for the topic

func (*TopicLoader) ViewsByTopic

func (l *TopicLoader) ViewsByTopic(topicID int) ([]*model.View, error)

ViewsByTopic returns the views for the topic

type TopicRepository

type TopicRepository interface {
	ProcessorInputsByTopics(ctx context.Context, topics []int) ([][]*model.ProcessorInput, error)
	ProcessorJoinsByTopics(ctx context.Context, topics []int) ([][]*model.ProcessorJoin, error)
	ProcessorLookupsByTopics(ctx context.Context, topics []int) ([][]*model.ProcessorLookup, error)
	ProcessorOutputsByTopics(ctx context.Context, topics []int) ([][]*model.ProcessorOutput, error)
	ProcessorPersistencesByTopics(ctx context.Context, topics []int) ([][]*model.Processor, error)
	SinksByTopics(ctx context.Context, topics []int) ([][]*model.Sink, error)
	SourcesByTopics(ctx context.Context, topics []int) ([][]*model.Source, error)
	ViewSinksByTopics(ctx context.Context, topics []int) ([][]*model.ViewSink, error)
	ViewSourcesByTopics(ctx context.Context, topics []int) ([][]*model.ViewSource, error)
	ViewsByTopics(ctx context.Context, topics []int) ([][]*model.View, error)
}

TopicRepository is the datastore repository for topics

type ViewLoader

type ViewLoader struct {
	// contains filtered or unexported fields
}

ViewLoader contains data loaders for view relationships

func NewViewLoader

func NewViewLoader(ctx context.Context, repository ViewRepository, waitTime time.Duration) *ViewLoader

NewViewLoader creates a new ViewLoader

func (*ViewLoader) ComponentByView

func (l *ViewLoader) ComponentByView(viewID int) (*model.Component, error)

ComponentByView returns the component for the view

func (*ViewLoader) PodsByView

func (l *ViewLoader) PodsByView(viewID int) ([]*model.Pod, error)

PodsByView returns the pods for the view

func (*ViewLoader) TopicByView

func (l *ViewLoader) TopicByView(viewID int) (*model.Topic, error)

TopicByView returns the topic for the view

type ViewRepository

type ViewRepository interface {
	ComponentByViews(ctx context.Context, views []int) ([]*model.Component, error)
	PodsByViews(ctx context.Context, views []int) ([][]*model.Pod, error)
	TopicByViews(ctx context.Context, views []int) ([]*model.Topic, error)
}

ViewRepository is the datastore repository for views

type ViewSinkLoader

type ViewSinkLoader struct {
	// contains filtered or unexported fields
}

ViewSinkLoader contains data loaders for view sink relationships

func NewViewSinkLoader

func NewViewSinkLoader(ctx context.Context, repository ViewSinkRepository, waitTime time.Duration) *ViewSinkLoader

NewViewSinkLoader creates a new ViewSinkLoader

func (*ViewSinkLoader) ComponentByViewSink

func (l *ViewSinkLoader) ComponentByViewSink(viewSinkID int) (*model.Component, error)

ComponentByViewSink returns the component for the view sink

func (*ViewSinkLoader) PodsByViewSink

func (l *ViewSinkLoader) PodsByViewSink(viewSinkID int) ([]*model.Pod, error)

PodsByViewSink returns the pods for the view sink

func (*ViewSinkLoader) TopicByViewSink

func (l *ViewSinkLoader) TopicByViewSink(viewSinkID int) (*model.Topic, error)

TopicByViewSink returns the topic for the view sink

type ViewSinkRepository

type ViewSinkRepository interface {
	ComponentByViewSinks(ctx context.Context, viewSinks []int) ([]*model.Component, error)
	PodsByViewSinks(ctx context.Context, viewSinks []int) ([][]*model.Pod, error)
	TopicByViewSinks(ctx context.Context, viewSinks []int) ([]*model.Topic, error)
}

ViewSinkRepository is the datastore repository for view sinks

type ViewSourceLoader

type ViewSourceLoader struct {
	// contains filtered or unexported fields
}

ViewSourceLoader contains data loaders for view source relationships

func NewViewSourceLoader

func NewViewSourceLoader(ctx context.Context, repository ViewSourceRepository, waitTime time.Duration) *ViewSourceLoader

NewViewSourceLoader creates a new ViewSourceLoader

func (*ViewSourceLoader) ComponentByViewSource

func (l *ViewSourceLoader) ComponentByViewSource(viewSourceID int) (*model.Component, error)

ComponentByViewSource returns the component for the view source

func (*ViewSourceLoader) PodsByViewSource

func (l *ViewSourceLoader) PodsByViewSource(viewSourceID int) ([]*model.Pod, error)

PodsByViewSource returns the pods for the view source

func (*ViewSourceLoader) TopicByViewSource

func (l *ViewSourceLoader) TopicByViewSource(viewSourceID int) (*model.Topic, error)

TopicByViewSource returns the topic for the view source

type ViewSourceRepository

type ViewSourceRepository interface {
	ComponentByViewSources(ctx context.Context, viewSources []int) ([]*model.Component, error)
	PodsByViewSources(ctx context.Context, viewSources []int) ([][]*model.Pod, error)
	TopicByViewSources(ctx context.Context, viewSources []int) ([]*model.Topic, error)
}

ViewSourceRepository is the datastore repository for view sources

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL