Documentation ¶
Index ¶
- func SetViperDefaults()
- type Config
- type DB
- type EAD
- type ElasticSearch
- func (e *ElasticSearch) AddOptions(cfg *Config) error
- func (e *ElasticSearch) CreateDefaultMappings(esClient *es.Client, orgs []domain.OrganizationConfig, ...) ([]string, error)
- func (e *ElasticSearch) IndexService(cfg *Config, ncfg *index.NatsConfig) (*index.Service, error)
- func (e *ElasticSearch) NewBulkIndexer(orgs *organization.Service) (*esutil.BulkIndexer, error)
- func (e *ElasticSearch) NewCustomClient(l *logger.CustomLogger) (*es.Client, error)
- type HTTP
- type Harvest
- type ImageProxy
- type Logging
- type NDE
- type NameSpace
- type Nats
- type OAIPMH
- type Option
- type Organization
- type PostHook
- type RDF
- type Sitemap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetViperDefaults ¶
func SetViperDefaults()
Types ¶
type Config ¶
type Config struct { ElasticSearch `json:"elasticSearch"` HTTP `json:"http"` Logging `json:"logging"` Nats `json:"nats"` EAD `json:"ead"` DB `json:"db"` ImageProxy `json:"imageProxy"` NameSpace `json:"nameSpace"` PostHooks []PostHook `json:"posthooks"` Organization `json:"organization"` Org map[string]domain.OrganizationConfig `json:"org"` Harvest `json:"harvest"` OAIPMH `json:"oaipmh"` NDE `json:"nde"` RDF `json:"rdf"` Sitemap `json:"sitemap"` // contains filtered or unexported fields }
type DB ¶
type DB struct { DSN string `json:"dsn"` MaxOpenConns int `json:"maxOpenConns"` MaxIdleConns int `json:"maxIdleConns"` MaxIdleTime string `json:"maxIdleTime"` AutoMigrate bool `json:"autoMigrate"` // contains filtered or unexported fields }
func (*DB) AddOptions ¶
type EAD ¶
type EAD struct { CacheDir string `json:"cacheDir"` Metrics bool `json:"metrics"` Workers int `json:"workers"` ProcessDigital bool `json:"processDigital"` ProcessDigitalIfMissing bool `json:"processDigitalIfMissing"` }
func (*EAD) AddOptions ¶
type ElasticSearch ¶
type ElasticSearch struct { // enable elasticsearch client Enabled bool // urls to connect to elasticsearch cluster Urls []string // enable elasticsearch caching proxy Proxy bool // number of elasticsearch workers. default: 1 Workers int // maxRetries number of client retries. default: 5 MaxRetries int // clientTimeOut seconds for the client to time out. default 10 ClientTimeOut int // gather elasticsearch metrics Metrics bool // base of the index aliases IndexName string // if non-empty digital objects will be indexed in a dedicated v2 index DigitalObjectSuffix string // number of shards. default 1 Shards int // number of replicas. default 0 Replicas int // UseRemoteIndexer is true when a separate process reads of the queue UseRemoteIndexer bool // IndexTypes options are v1, v2, fragment IndexTypes []string // use FastHTTP transport for communication with the ElasticSearch cluster FastHTTP bool `json:"fastHTTP"` // OrphanWait is the duration in seconds that the orphanDelete will wait for the cluster to be in sync OrphanWait int // UserName is the BasicAuth username UserName string `json:"userName"` // Password is the BasicAuth password Password string `json:"password"` // contains filtered or unexported fields }
func (*ElasticSearch) AddOptions ¶
func (e *ElasticSearch) AddOptions(cfg *Config) error
func (*ElasticSearch) CreateDefaultMappings ¶
func (e *ElasticSearch) CreateDefaultMappings(esClient *es.Client, orgs []domain.OrganizationConfig, withAlias, withReset bool) ([]string, error)
func (*ElasticSearch) IndexService ¶
func (e *ElasticSearch) IndexService(cfg *Config, ncfg *index.NatsConfig) (*index.Service, error)
func (*ElasticSearch) NewBulkIndexer ¶
func (e *ElasticSearch) NewBulkIndexer(orgs *organization.Service) (*esutil.BulkIndexer, error)
func (*ElasticSearch) NewCustomClient ¶ added in v0.3.0
func (e *ElasticSearch) NewCustomClient(l *logger.CustomLogger) (*es.Client, error)
type HTTP ¶
type HTTP struct { Port int `json:"port" mapstructure:"port"` MetricsPort int `json:"metricsPort"` CertFile string `json:"certFile"` KeyFile string `json:"keyFile"` }
func (*HTTP) AddOptions ¶
type Harvest ¶ added in v0.3.0
type Harvest struct { Enabled bool `json:"enabled"` AdminEmails []string `json:"adminEmails"` RepositoryName string `json:"repositoryName"` HarvestDelay int `json:"harvestDelay"` EadHarvestURL string `json:"eadHarvestUrl"` MetsHarvestURL string `json:"metsHarvestUrl"` HarvestPath string `json:"harvestPath"` // contains filtered or unexported fields }
func (*Harvest) AddOptions ¶ added in v0.3.0
type ImageProxy ¶
type ImageProxy struct { Enabled bool CacheDir string MaxSizeCacheDir int ProxyPrefix string Timeout int ProxyReferrer []string RefuseList []string AllowList []string AllowPorts []string AllowedMimeTypes []string LruCacheSize int EnableResize bool DefaultImagePath string }
func (*ImageProxy) AddOptions ¶
func (ip *ImageProxy) AddOptions(cfg *Config) error
type Logging ¶
type Logging struct { DevMode bool `json:"devmode"` Level string `json:"level"` WithCaller bool `json:"withCaller"` ConsoleLogger bool `json:"consoleLogger"` ErrorFieldName string `json:"errorFieldName"` SentryDSN string `json:"sentryDSN"` Exclude404Path []string `json:"exclude404Path"` }
func (*Logging) AddOptions ¶
type NDE ¶ added in v0.2.1
type NDE struct { Enabled bool `json:"enabled"` Description string `json:"description"` Name string `json:"name"` DefaultLanguages []string `json:"defaultLanguages"` DefaultLicense string `json:"defaultLicense"` Publisher struct { Name string `json:"name"` AltName string `json:"altName"` URL string `json:"url"` } `json:"publisher"` DatasetFmt string `json:"datasetFmt"` Distribution []nde.DistributionCfg `json:"distribution"` }
func (*NDE) AddOptions ¶ added in v0.2.1
type NameSpace ¶ added in v0.2.1
type NameSpace struct{}
func (NameSpace) AddOptions ¶ added in v0.2.1
type Nats ¶
type Nats struct { Enabled bool `json:"enabled"` ClusterID string `json:"clusterID"` ClientID string `json:"clientID"` DurableName string `json:"durableName"` DurableQueue string `json:"durableQueue"` URL string `json:"url"` // contains filtered or unexported fields }
Nats are configuration options to access NATS streaming server
func (*Nats) AddOptions ¶
type OAIPMH ¶ added in v0.2.0
type OAIPMH struct {
// contains filtered or unexported fields
}
func (*OAIPMH) AddOptions ¶ added in v0.2.0
type Organization ¶ added in v0.2.0
type Organization struct { // domain is a list of all valid domains (including subdomains) for an domain.Organization // the domain ID will be injected in each request by the organization middleware. Store string }
func (*Organization) AddOptions ¶ added in v0.2.0
func (o *Organization) AddOptions(cfg *Config) error
Click to show internal directories.
Click to hide internal directories.