Documentation ¶
Index ¶
- func SetViperDefaults()
- type Config
- type DB
- type EAD
- type ElasticSearch
- func (e *ElasticSearch) AddOptions(cfg *Config) error
- func (e *ElasticSearch) CreateDefaultMappings(es *elasticsearch.Client, withAlias, withReset bool) ([]string, error)
- func (e *ElasticSearch) IndexService(cfg *Config, ncfg *index.NatsConfig) (*index.Service, error)
- func (e *ElasticSearch) NewBulkIndexer(es *elasticsearch.Client) (esutil.BulkIndexer, error)
- func (e *ElasticSearch) NewClient(l *logger.CustomLogger) (*elasticsearch.Client, error)
- func (e *ElasticSearch) ResetAll(w http.ResponseWriter, r *http.Request)
- type HTTP
- type ImageProxy
- type Logging
- type NDE
- type NameSpace
- type Nats
- type OAIPMH
- type Option
- type Organization
- type PostHook
- type RDF
- type TimeRevisionStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetViperDefaults ¶
func SetViperDefaults()
Types ¶
type Config ¶
type Config struct { // default orgID when none is given OrgID string `json:"orgID"` DataNodeURL string `json:"dataNodeURL"` ElasticSearch `json:"elasticSearch"` HTTP `json:"http"` TimeRevisionStore `json:"timeRevisionStore"` 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"` OAIPMH `json:"oaipmh"` NDE `json:"nde"` RDF `json:"rdf"` // contains filtered or unexported fields }
func (*Config) GetRevisionService ¶ added in v0.2.0
func (*Config) IsDataNode ¶ added in v0.1.10
type DB ¶
type DB struct { // supported types are "sqlite3" "postgres" Type string // go sql compatible connection string, e.g. "/tmp/test.db" for sqlit3 or // "host=myhost port=myport user=hub3 dbname=hub3 password=mypassword" Connect string // 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(es *elasticsearch.Client, 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(es *elasticsearch.Client) (esutil.BulkIndexer, error)
func (*ElasticSearch) NewClient ¶
func (e *ElasticSearch) NewClient(l *logger.CustomLogger) (*elasticsearch.Client, error)
func (*ElasticSearch) ResetAll ¶
func (e *ElasticSearch) ResetAll(w http.ResponseWriter, r *http.Request)
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 ImageProxy ¶
type ImageProxy struct { Enabled bool CacheDir string MaxSizeCacheDir int ProxyPrefix string Timeout int ProxyReferrer []string RefuseList []string AllowList []string AllowedMimeTypes []string LruCacheSize int EnableResize bool }
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"` }
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 { 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 (*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
type TimeRevisionStore ¶
func (*TimeRevisionStore) AddOptions ¶
func (trs *TimeRevisionStore) AddOptions(cfg *Config) error
Click to show internal directories.
Click to hide internal directories.