Documentation ¶
Index ¶
- type BaseImporter
- type BaseRequestImporter
- type Collection
- func (collection *Collection) ActivateAll(conf *config.Configuration, log *zerolog.Logger) error
- func (collection *Collection) Entities() []entity.Entity
- func (collection *Collection) Exchangers() []exchangers.Exchanger
- func (collection *Collection) GetRequestImporters() []exchangers.RequestExchanger
- func (collection *Collection) StartAll() error
- func (collection *Collection) StopAll()
- type Importer
- type SiteRegistrationImporter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseImporter ¶
type BaseImporter struct { exchangers.BaseExchanger // contains filtered or unexported fields }
BaseImporter implements basic importer functionality common to all importers.
func (*BaseImporter) Process ¶
func (importer *BaseImporter) Process(connectors *connectors.Collection) (bool, error)
Process is called periodically to perform the actual import; if data has been imported, true is returned.
type BaseRequestImporter ¶
type BaseRequestImporter struct { BaseImporter exchangers.BaseRequestExchanger }
BaseRequestImporter implements basic importer functionality common to all request importers.
func (*BaseRequestImporter) HandleRequest ¶
func (importer *BaseRequestImporter) HandleRequest(resp http.ResponseWriter, req *http.Request, conf *config.Configuration, log *zerolog.Logger)
HandleRequest handles the actual HTTP request.
type Collection ¶
type Collection struct {
Importers []Importer
}
Collection represents a collection of importers.
func AvailableImporters ¶
func AvailableImporters(conf *config.Configuration) (*Collection, error)
AvailableImporters returns a collection of all importers that are enabled in the configuration.
func (*Collection) ActivateAll ¶
func (collection *Collection) ActivateAll(conf *config.Configuration, log *zerolog.Logger) error
ActivateAll activates all importers.
func (*Collection) Entities ¶
func (collection *Collection) Entities() []entity.Entity
Entities returns a vector of entities within the collection.
func (*Collection) Exchangers ¶
func (collection *Collection) Exchangers() []exchangers.Exchanger
Exchangers returns a vector of exchangers within the collection.
func (*Collection) GetRequestImporters ¶
func (collection *Collection) GetRequestImporters() []exchangers.RequestExchanger
GetRequestImporters returns all importers that implement the RequestExchanger interface.
func (*Collection) StartAll ¶
func (collection *Collection) StartAll() error
StartAll starts all importers.
type Importer ¶
type Importer interface { exchangers.Exchanger // Process is called periodically to perform the actual import; if data has been imported, true is returned. Process(*connectors.Collection) (bool, error) }
Importer is the interface that all importers must implement.
type SiteRegistrationImporter ¶ added in v1.7.0
type SiteRegistrationImporter struct {
BaseRequestImporter
}
SiteRegistrationImporter implements the external site registration importer.
func (*SiteRegistrationImporter) Activate ¶ added in v1.7.0
func (importer *SiteRegistrationImporter) Activate(conf *config.Configuration, log *zerolog.Logger) error
Activate activates the importer.
func (*SiteRegistrationImporter) GetID ¶ added in v1.7.0
func (importer *SiteRegistrationImporter) GetID() string
GetID returns the ID of the importer.
func (*SiteRegistrationImporter) GetName ¶ added in v1.7.0
func (importer *SiteRegistrationImporter) GetName() string
GetName returns the display name of the importer.