Documentation
¶
Overview ¶
Copyright 2020 Center for Digital Matter HGK FHNW, Basel. Copyright 2020 info-age GmbH, Basel.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Center for Digital Matter HGK FHNW, Basel. Copyright 2020 info-age GmbH, Basel.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Center for Digital Matter HGK FHNW, Basel. Copyright 2020 info-age GmbH, Basel.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Center for Digital Matter HGK FHNW, Basel. Copyright 2020 info-age GmbH, Basel.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Center for Digital Matter HGK FHNW, Basel. Copyright 2020 info-age GmbH, Basel.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Center for Digital Matter HGK FHNW, Basel. Copyright 2020 info-age GmbH, Basel.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Center for Digital Matter HGK FHNW, Basel. Copyright 2020 info-age GmbH, Basel.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Center for Digital Matter HGK FHNW, Basel. Copyright 2020 info-age GmbH, Basel.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Center for Digital Matter HGK FHNW, Basel. Copyright 2020 info-age GmbH, Basel.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Center for Digital Matter HGK FHNW, Basel. Copyright 2020 info-age GmbH, Basel.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Center for Digital Matter HGK FHNW, Basel. Copyright 2020 info-age GmbH, Basel.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Center for Digital Matter HGK FHNW, Basel. Copyright 2020 info-age GmbH, Basel.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Center for Digital Matter HGK FHNW, Basel. Copyright 2020 info-age GmbH, Basel.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Center for Digital Matter HGK FHNW, Basel. Copyright 2020 info-age GmbH, Basel.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Center for Digital Matter HGK FHNW, Basel. Copyright 2020 info-age GmbH, Basel.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func AppendIfMissing(slice []string, s string) []string
- func CheckJWT(tokenstring string, secret string, alg []string, subject string) error
- func CheckJWTValid(tokenstring string, secret string, alg []string) (map[string]interface{}, error)
- func CheckRequestJWT(req *http.Request, secret string, alg []string, subject string) error
- func Compress(data []byte) []byte
- func CreateLogger(module string, logfile string, loglevel string) (log *logging.Logger, lf *os.File)
- func Decompress(data []byte) ([]byte, error)
- func DefaultCertificate() (*tls.Certificate, error)
- func EscapeSolrString(str string) string
- func FileExists(filename string) bool
- func GUnzip(data string) (string, error)
- func GetClaim(claim map[string]interface{}, name string) (string, error)
- func Hash(data interface{}) ([16]byte, error)
- func InList(slice []string, s string) bool
- func KeyPair(domain string, expiration time.Time) ([]byte, []byte, error)
- func NewJWT(secret string, subject string, alg string, valid int64, domain string, ...) (tokenString string, err error)
- func PemCert(privKey *rsa.PrivateKey, domain string, expiration time.Time) ([]byte, error)
- func SingleJoiningSlash(a, b string) string
- func UrlAmp(u string, ampCache string, t string) (string, error)
- type BaseStatus
- func (bs BaseStatus) LinkCollections() string
- func (bs BaseStatus) LinkSearch(query string, facets ...string) template.URL
- func (bs BaseStatus) LinkSignature(signature string) string
- func (bs BaseStatus) LinkSignatureCache(signature string) string
- func (bs BaseStatus) LinkSubject(area, sub, subject string, params ...string) string
- type ClusterResultStatus
- type ClusterStatus
- type CollectionsStatus
- type DetailStatus
- type Document
- type ErrorHTTPStatus
- type FacetCountField
- type FacetCountResult
- type FacetManager
- type GoogleResultItem
- type GoogleResultStatus
- type ImageSearchStatus
- type Item
- func (item *Item) GetACL() map[string][]string
- func (item *Item) GetAbstract() string
- func (item *Item) GetCatalogs() []string
- func (item *Item) GetCategories() []string
- func (item *Item) GetChildrenLocal() (*[]Item, error)
- func (item *Item) GetCollectionTitle() string
- func (item *Item) GetContentMime() string
- func (item *Item) GetContentString() string
- func (item *Item) GetContentType() string
- func (item *Item) GetDate() string
- func (item *Item) GetDateAdded() time.Time
- func (item *Item) GetExtra() *Metalist
- func (item *Item) GetMedia(ms mediaserver.Mediaserver) map[string]MediaList
- func (item *Item) GetMeta() *Metalist
- func (item *Item) GetNotes() []Note
- func (item *Item) GetPersons() []Person
- func (item *Item) GetPlace() string
- func (item *Item) GetPoster(ms mediaserver.Mediaserver) *Media
- func (item *Item) GetQueries() []Query
- func (item *Item) GetReferences() []Reference
- func (item *Item) GetSeries() string
- func (item *Item) GetSignature() string
- func (item *Item) GetSolrDoc() *solr.Document
- func (item *Item) GetTags() []string
- func (item *Item) GetTitle() string
- func (item *Item) GetUrl() string
- func (item *Item) GetVars() *Varlist
- func (item *Item) Name() string
- type ItemDataBase
- type ItemDataPerson
- type ItemGeneric
- type ItemMedia
- type ItemMediaMeta
- type ItemTag
- type JSONData
- type JSONDomainMap
- func (jdm *JSONDomainMap) SetBlockParentQuery(allParentsQuery string) *JSONDomainMap
- func (jdm *JSONDomainMap) WithFilter(filter string) *JSONDomainMap
- func (jdm *JSONDomainMap) WithQuery(query string) *JSONDomainMap
- func (jdm *JSONDomainMap) WithTagsToExclude(excludeTagsValue string) *JSONDomainMap
- type JSONFacetMap
- type JSONHeatmapFacetMap
- func (jfm *JSONHeatmapFacetMap) SetDistErr(distErr float64) *JSONHeatmapFacetMap
- func (jfm *JSONHeatmapFacetMap) SetDistErrPct(distErrPct float64) *JSONHeatmapFacetMap
- func (jfm *JSONHeatmapFacetMap) SetGridLevel(individualCellSize int64) *JSONHeatmapFacetMap
- func (jfm *JSONHeatmapFacetMap) SetHeatmapFormat(format string) *JSONHeatmapFacetMap
- func (jfm *JSONHeatmapFacetMap) SetRegionQuery(queryString string) *JSONHeatmapFacetMap
- type JSONQueryFacetMap
- type JSONRangeFacetMap
- type JSONTermsFacetMap
- func (jfm *JSONTermsFacetMap) IncludeAllBucketsUnionBucket(shouldInclude bool) *JSONTermsFacetMap
- func (jfm *JSONTermsFacetMap) IncludeMissingBucket(missingBucket bool) *JSONTermsFacetMap
- func (jfm *JSONTermsFacetMap) IncludeTotalNumBuckets(numBuckets bool) *JSONTermsFacetMap
- func (jfm *JSONTermsFacetMap) JSONFacetMap() *JSONFacetMap
- func (jfm *JSONTermsFacetMap) SetMinCount(minCount int64) *JSONTermsFacetMap
- func (jfm *JSONTermsFacetMap) SetOverRefine(numExtraBuckets int64) *JSONTermsFacetMap
- func (jfm *JSONTermsFacetMap) SetOverRequest(numExtraBuckets int64) *JSONTermsFacetMap
- func (jfm *JSONTermsFacetMap) SetPreliminarySort(preliminarySort string) *JSONTermsFacetMap
- func (jfm *JSONTermsFacetMap) SetTermPrefix(termPrefix string) *JSONTermsFacetMap
- func (jfm *JSONTermsFacetMap) UseDistributedFacetRefining(useRefining bool) *JSONTermsFacetMap
- type KV
- type MTElasticSearch
- func (mte *MTElasticSearch) Delete(cfg *ScrollConfig) (int64, error)
- func (mte *MTElasticSearch) LastUpdate(cfg *ScrollConfig) (time.Time, error)
- func (mte *MTElasticSearch) LoadDocs(ids []string, ctx context.Context) (map[string]*SourceData, error)
- func (mte *MTElasticSearch) Scroll(cfg *ScrollConfig, callback func(data *SourceData) error) error
- func (mte *MTElasticSearch) Search(cfg *SearchConfig) ([]map[string][]string, []*SourceData, int64, FacetCountResult, error)
- func (mte *MTElasticSearch) StatsByACL(catalog []string) (int64, FacetCountResult, error)
- func (mte *MTElasticSearch) Update(source Source, ms mediaserver.Mediaserver) error
- func (mte *MTElasticSearch) UpdateTimestamp(source Source, ms mediaserver.Mediaserver, timestamp time.Time) error
- type MTSOLRSearch
- func (mte *MTSOLRSearch) LoadDocs(ids []string, ctx context.Context) (map[string]*SourceData, error)
- func (mte *MTSOLRSearch) Search(cfg *SearchConfig) ([]map[string][]string, []*SourceData, int64, FacetCountResult, error)
- func (mte *MTSOLRSearch) Update(source Source, ms mediaserver.Mediaserver) error
- type MTSolr
- func (mts *MTSolr) GetContent(entry *cacheEntry) (Source, error)
- func (mts *MTSolr) LoadEntities(ids []string) (map[string]*Document, error)
- func (mts *MTSolr) LoadEntity(id string) (*Document, error)
- func (mts *MTSolr) Search(text string, filters []string, facets map[string]TermFacet, groups []string, ...) ([]*Document, int64, FacetCountResult, error)
- type Media
- type MediaList
- type Metalist
- type NetGroups
- type Note
- type Notification
- type OGData
- type Parent
- type Person
- type Query
- type Reference
- type RelationList
- type Resource
- type ResourceParam
- type ScrollConfig
- type Search
- func (s *Search) LoadEntities(ids []string) (map[string]*SourceData, error)
- func (s *Search) LoadEntity(id string) (*SourceData, error)
- func (s *Search) Search(cfg *SearchConfig) ([]map[string][]string, []*SourceData, int64, FacetCountResult, error)
- func (s *Search) StatsByACL(catalog []string) (int64, FacetCountResult, error)
- type SearchConfig
- type SearchEngine
- type SearchResult
- type SearchResultItem
- type SearchStatus
- type Server
- func (s *Server) DoPanic(writer http.ResponseWriter, status int, message string) error
- func (s *Server) DoPanicJSON(writer http.ResponseWriter, status int, message string) (err error)
- func (s *Server) DoPanicf(user *User, req *http.Request, writer http.ResponseWriter, status int, ...) (err error)
- func (s *Server) GetClaimUser(claims map[string]interface{}) (*User, error)
- func (s *Server) InitTemplates() (err error)
- func (s *Server) ListenAndServe(cert, key string) error
- func (s *Server) Shutdown(ctx context.Context) error
- type SolrFacet
- type SolrFacetList
- type SolrResultJSONFacetBucket
- type SolrResultJSONFacetElement
- type SolrResultJSONFacets
- type Source
- type SourceCDK
- func (cdk *SourceCDK) GetACL() map[string][]string
- func (cdk *SourceCDK) GetAbstract() string
- func (cdk *SourceCDK) GetCatalogs() []string
- func (cdk *SourceCDK) GetCategories() []string
- func (cdk *SourceCDK) GetCollectionTitle() string
- func (cdk *SourceCDK) GetContentMime() string
- func (cdk *SourceCDK) GetContentString() string
- func (cdk *SourceCDK) GetContentType() string
- func (cdk *SourceCDK) GetDate() string
- func (cdk *SourceCDK) GetDateAdded() time.Time
- func (cdk *SourceCDK) GetExtra() *Metalist
- func (cdk *SourceCDK) GetMedia(ms mediaserver.Mediaserver) map[string]MediaList
- func (cdk *SourceCDK) GetMeta() *Metalist
- func (cdk *SourceCDK) GetNotes() []Note
- func (cdk *SourceCDK) GetPersons() []Person
- func (cdk *SourceCDK) GetPlace() string
- func (cdk *SourceCDK) GetPoster(ms mediaserver.Mediaserver) *Media
- func (cdk *SourceCDK) GetQueries() []Query
- func (cdk *SourceCDK) GetReferences() []Reference
- func (cdk *SourceCDK) GetSeries() string
- func (cdk *SourceCDK) GetSignature() string
- func (cdk *SourceCDK) GetSolrDoc() *solr.Document
- func (cdk *SourceCDK) GetTags() []string
- func (cdk *SourceCDK) GetTitle() string
- func (cdk *SourceCDK) GetUrl() string
- func (cdk *SourceCDK) GetVars() *Varlist
- func (cdk *SourceCDK) Init(entry *cacheEntry) error
- func (cdk *SourceCDK) Name() string
- type SourceCDKData
- type SourceData
- type SourceDiplomHGK
- func (dhgk *SourceDiplomHGK) GetACL() map[string][]string
- func (dhgk *SourceDiplomHGK) GetAbstract() string
- func (dhgk *SourceDiplomHGK) GetCatalogs() []string
- func (dhgk *SourceDiplomHGK) GetCategories() []string
- func (dhgk *SourceDiplomHGK) GetCollectionTitle() string
- func (dhgk *SourceDiplomHGK) GetContentMime() string
- func (dhgk *SourceDiplomHGK) GetContentString() string
- func (dhgk *SourceDiplomHGK) GetContentType() string
- func (dhgk *SourceDiplomHGK) GetDate() string
- func (dhgk *SourceDiplomHGK) GetDateAdded() time.Time
- func (dhgk *SourceDiplomHGK) GetExtra() *Metalist
- func (dhgk *SourceDiplomHGK) GetMedia(ms mediaserver.Mediaserver) map[string]MediaList
- func (dhgk *SourceDiplomHGK) GetMeta() *Metalist
- func (dhgk *SourceDiplomHGK) GetNotes() []Note
- func (dhgk *SourceDiplomHGK) GetPersons() []Person
- func (dhgk *SourceDiplomHGK) GetPlace() string
- func (dhgk *SourceDiplomHGK) GetPoster(ms mediaserver.Mediaserver) *Media
- func (dhgk *SourceDiplomHGK) GetQueries() []Query
- func (dhgk *SourceDiplomHGK) GetReferences() []Reference
- func (dhgk *SourceDiplomHGK) GetSeries() string
- func (dhgk *SourceDiplomHGK) GetSignature() string
- func (dhgk *SourceDiplomHGK) GetSolrDoc() *solr.Document
- func (dhgk *SourceDiplomHGK) GetTags() []string
- func (dhgk *SourceDiplomHGK) GetTitle() string
- func (dhgk *SourceDiplomHGK) GetUrl() string
- func (dhgk *SourceDiplomHGK) GetVars() *Varlist
- func (dhgk *SourceDiplomHGK) Init(entry *cacheEntry) error
- func (dhgk *SourceDiplomHGK) Name() string
- type SourceDiplomHGKData
- type SourceDiplomHGKFile
- type SourceDiplomHGKFileMeta
- type SourceError
- func (serr *SourceError) GetAbstract() string
- func (serr *SourceError) GetCollectionTitle() string
- func (serr *SourceError) GetDate() string
- func (serr *SourceError) GetMedia() map[string]MediaList
- func (serr *SourceError) GetMeta() map[string]string
- func (serr *SourceError) GetNames() []Person
- func (serr *SourceError) GetNotes() []Note
- func (serr *SourceError) GetPlace() string
- func (serr *SourceError) GetQueries() []Query
- func (serr *SourceError) GetReferences() []Reference
- func (serr *SourceError) GetSolrDoc() *solr.Document
- func (serr *SourceError) GetTags() []string
- func (serr *SourceError) GetTitle() string
- func (serr *SourceError) GetType() string
- func (serr *SourceError) Name() string
- type SourceZoteroDeprecated
- func (zot *SourceZoteroDeprecated) GetACL() map[string][]string
- func (zot *SourceZoteroDeprecated) GetAbstract() string
- func (zot *SourceZoteroDeprecated) GetCatalogs() []string
- func (zot *SourceZoteroDeprecated) GetCategories() []string
- func (zot *SourceZoteroDeprecated) GetChildren(itemType, linkMode string) []ZoteroData
- func (zot *SourceZoteroDeprecated) GetCollectionTitle() string
- func (zot *SourceZoteroDeprecated) GetContentMime() string
- func (zot *SourceZoteroDeprecated) GetContentString() string
- func (zot *SourceZoteroDeprecated) GetContentType() string
- func (zot *SourceZoteroDeprecated) GetDate() string
- func (zot *SourceZoteroDeprecated) GetDateAdded() time.Time
- func (zot *SourceZoteroDeprecated) GetExtra() *Metalist
- func (zot *SourceZoteroDeprecated) GetMedia(ms mediaserver.Mediaserver) map[string]MediaList
- func (zot *SourceZoteroDeprecated) GetMeta() *Metalist
- func (zot *SourceZoteroDeprecated) GetNotes() []Note
- func (zot *SourceZoteroDeprecated) GetPersons() []Person
- func (zot *SourceZoteroDeprecated) GetPlace() string
- func (zot *SourceZoteroDeprecated) GetPoster(ms mediaserver.Mediaserver) *Media
- func (zot *SourceZoteroDeprecated) GetQueries() []Query
- func (zot *SourceZoteroDeprecated) GetReferences() []Reference
- func (zot *SourceZoteroDeprecated) GetSeries() string
- func (zot *SourceZoteroDeprecated) GetSignature() string
- func (zot *SourceZoteroDeprecated) GetSolrDoc() *solr.Document
- func (zot *SourceZoteroDeprecated) GetTags() []string
- func (zot *SourceZoteroDeprecated) GetTitle() string
- func (zot *SourceZoteroDeprecated) GetUrl() string
- func (zot *SourceZoteroDeprecated) GetVars() *Varlist
- func (zot *SourceZoteroDeprecated) Init(entry *cacheEntry) error
- func (zot *SourceZoteroDeprecated) Name() string
- type SubFilter
- type TermFacet
- type User
- type UserCache
- type Varlist
- type ZoteroCollection
- type ZoteroCollectionData
- type ZoteroCollectionMeta
- type ZoteroData
- type ZoteroGroup
- type ZoteroGroupData
- type ZoteroGroupMeta
- type ZoteroLibrary
- type ZoteroStringList
Constants ¶
const DefaultDomain = "TRAEFIK DEFAULT CERT"
DefaultDomain Traefik domain for the default certificate.
Variables ¶
This section is empty.
Functions ¶
func AppendIfMissing ¶
func CheckJWTValid ¶
func CheckRequestJWT ¶
func CreateLogger ¶
func Decompress ¶
func DefaultCertificate ¶
func DefaultCertificate() (*tls.Certificate, error)
DefaultCertificate generates random TLS certificates.
func EscapeSolrString ¶
func FileExists ¶
func SingleJoiningSlash ¶
Types ¶
type BaseStatus ¶
type BaseStatus struct {
OGPNamespace string
OGPMeta string
JsonLD string
Type string
Notifications []Notification
User *User
Self string
RawQuery string
Canonical string
Token string
BaseUrl string
Prefixes map[string]string
SelfPath string
RelPath string
AmpBase string
LoginUrl string
Title string
InstanceName string
// contains filtered or unexported fields
}
func (BaseStatus) LinkCollections ¶
func (bs BaseStatus) LinkCollections() string
func (BaseStatus) LinkSearch ¶
func (bs BaseStatus) LinkSearch(query string, facets ...string) template.URL
func (BaseStatus) LinkSignature ¶
func (bs BaseStatus) LinkSignature(signature string) string
func (BaseStatus) LinkSignatureCache ¶
func (bs BaseStatus) LinkSignatureCache(signature string) string
func (BaseStatus) LinkSubject ¶
func (bs BaseStatus) LinkSubject(area, sub, subject string, params ...string) string
type ClusterResultStatus ¶
type ClusterStatus ¶
type CollectionsStatus ¶
type DetailStatus ¶
type DetailStatus struct {
BaseStatus
Doc *SourceData
MetaPublic bool
ContentPublic bool
MetaOK bool
ContentOK bool
IsAmp bool
MetaDescription string
Result *SearchResult
SearchResultRows int
SearchResultTotal int
}
type ErrorHTTPStatus ¶
type ErrorHTTPStatus struct {
// contains filtered or unexported fields
}
func (*ErrorHTTPStatus) Error ¶
func (err *ErrorHTTPStatus) Error() string
type FacetCountField ¶
type FacetCountResult ¶
type FacetManager ¶
type FacetManager struct {
DefaultFacets SolrFacetList
Facets SolrFacetList
// contains filtered or unexported fields
}
func NewFacetManager ¶
func NewFacetManager(defaults SolrFacetList) *FacetManager
type GoogleResultItem ¶
type GoogleResultStatus ¶
type GoogleResultStatus struct {
BaseStatus
SearchName string
CX string
Searches []string
SearchString string
}
type ImageSearchStatus ¶
type ImageSearchStatus struct {
Type string
Notifications []Notification
User *User
Self string
Token string
BaseUrl string
SelfPath string
AmpBase string
LoginUrl string
Title string
SearchResult template.JS
Result *SearchResult
QueryApi template.URL
SearchResultStart int
SearchResultRows int
SearchResultTotal int
SearchString string
MetaDescription string
}
type Item ¶
func (*Item) GetAbstract ¶
func (*Item) GetCatalogs ¶
func (*Item) GetCategories ¶
func (*Item) GetChildrenLocal ¶
func (*Item) GetCollectionTitle ¶
func (*Item) GetContentMime ¶
func (*Item) GetContentString ¶
func (*Item) GetContentType ¶
func (*Item) GetDateAdded ¶
func (*Item) GetMedia ¶
func (item *Item) GetMedia(ms mediaserver.Mediaserver) map[string]MediaList
func (*Item) GetPersons ¶
func (*Item) GetPoster ¶
func (item *Item) GetPoster(ms mediaserver.Mediaserver) *Media
func (*Item) GetQueries ¶
func (*Item) GetReferences ¶
func (*Item) GetSignature ¶
func (*Item) GetSolrDoc ¶
type ItemDataBase ¶
type ItemDataBase struct {
Key string `json:"Key,omitempty"`
Version int64 `json:"version"`
ItemType string `json:"itemType"`
Tags []ItemTag `json:"tags"`
Relations RelationList `json:"relations"`
ParentItem Parent `json:"parentItem,omitempty"`
Collections []string `json:"collections"`
DateAdded string `json:"dateAdded,omitempty"`
DateModified string `json:"dateModified,omitempty"`
Creators []ItemDataPerson `json:"creators"`
Media ItemMedia `json:"media,omitempty"`
}
type ItemDataPerson ¶
type ItemGeneric ¶
type ItemGeneric struct {
ItemDataBase
NumPages string `json:"numPages,omitempty"` // # of Pages
NumberOfVolumes string `json:"numberOfVolumes,omitempty"` // # of Volumes
AbstractNote string `json:"abstractNote,omitempty"` // Abstract
AccessDate string `json:"accessDate,omitempty"` // Accessed
ApplicationNumber string `json:"applicationNumber,omitempty"` // Application Number
Archive string `json:"archive,omitempty"` // Archive
ArtworkSize string `json:"artworkSize,omitempty"` // Artwork Size
Assignee string `json:"assignee,omitempty"` // Assignee
BillNumber string `json:"billNumber,omitempty"` // Bill Number
BlogTitle string `json:"blogTitle,omitempty"` // Blog Title
BookTitle string `json:"bookTitle,omitempty"` // Book Title
CallNumber string `json:"callNumber,omitempty"` // Call Number
CaseName string `json:"caseName,omitempty"` // Case Name
Code string `json:"code,omitempty"` // Code
CodeNumber string `json:"codeNumber,omitempty"` // Code Number
CodePages string `json:"codePages,omitempty"` // Code Pages
CodeVolume string `json:"codeVolume,omitempty"` // Code Volume
Committee string `json:"committee,omitempty"` // Committee
Company string `json:"company,omitempty"` // Company
ConferenceName string `json:"conferenceName,omitempty"` // Conference Name
Country string `json:"country,omitempty"` // Country
Court string `json:"court,omitempty"` // Court
DOI string `json:"DOI,omitempty"` // DOI
Date string `json:"date,omitempty"` // Date
DateDecided string `json:"dateDecided,omitempty"` // Date Decided
DateEnacted string `json:"dateEnacted,omitempty"` // Date Enacted
DictionaryTitle string `json:"dictionaryTitle,omitempty"` // Dictionary Title
Distributor string `json:"distributor,omitempty"` // Distributor
DocketNumber string `json:"docketNumber,omitempty"` // Docket Number
DocumentNumber string `json:"documentNumber,omitempty"` // Document Number
Edition string `json:"edition,omitempty"` // Edition
EncyclopediaTitle string `json:"encyclopediaTitle,omitempty"` // Encyclopedia Title
EpisodeNumber string `json:"episodeNumber,omitempty"` // Episode Number
Extra string `json:"extra,omitempty"` // Extra
AudioFileType string `json:"audioFileType,omitempty"` // File Type
FilingDate string `json:"filingDate,omitempty"` // Filing Date
FirstPage string `json:"firstPage,omitempty"` // First Page
AudioRecordingFormat string `json:"audioRecordingFormat,omitempty"` // Format
VideoRecordingFormat string `json:"videoRecordingFormat,omitempty"` // Format
ForumTitle string `json:"forumTitle,omitempty"` // Forum/Listserv Title
Genre string `json:"genre,omitempty"` // Genre
History string `json:"history,omitempty"` // History
ISBN string `json:"ISBN,omitempty"` // ISBN
ISSN string `json:"ISSN,omitempty"` // ISSN
Institution string `json:"institution,omitempty"` // Institution
Issue string `json:"issue,omitempty"` // Issue
IssueDate string `json:"issueDate,omitempty"` // Issue Date
IssuingAuthority string `json:"issuingAuthority,omitempty"` // Issuing Authority
JournalAbbreviation string `json:"journalAbbreviation,omitempty"` // Journal Abbr
Label string `json:"label,omitempty"` // Label
Language string `json:"language,omitempty"` // Language
ProgrammingLanguage string `json:"programmingLanguage,omitempty"` // Language
LegalStatus string `json:"legalStatus,omitempty"` // Legal Status
LegislativeBody string `json:"legislativeBody,omitempty"` // Legislative Body
LibraryCatalog string `json:"libraryCatalog,omitempty"` // ZoteroLibrary Catalog
ArchiveLocation string `json:"archiveLocation,omitempty"` // Loc. in Archive
InterviewMedium string `json:"interviewMedium,omitempty"` // Medium
ArtworkMedium string `json:"artworkMedium,omitempty"` // Medium
MeetingName string `json:"meetingName,omitempty"` // Meeting Name
NameOfAct string `json:"nameOfAct,omitempty"` // Name of Act
Network string `json:"network,omitempty"` // Network
Pages float64 `json:"pages,omitempty"` // Pages
PatentNumber string `json:"patentNumber,omitempty"` // Patent Number
Place string `json:"place,omitempty"` // Place
PostType string `json:"postType,omitempty"` // Post Type
PriorityNumbers string `json:"priorityNumbers,omitempty"` // Priority Numbers
ProceedingsTitle string `json:"proceedingsTitle,omitempty"` // Proceedings Title
ProgramTitle string `json:"programTitle,omitempty"` // Program Title
PublicLawNumber string `json:"publicLawNumber,omitempty"` // Public Law Number
PublicationTitle string `json:"publicationTitle,omitempty"` // Publication
Publisher string `json:"publisher,omitempty"` // Publisher
References string `json:"references,omitempty"` // References
ReportNumber string `json:"reportNumber,omitempty"` // Report Number
ReportType string `json:"reportType,omitempty"` // Report Type
Reporter string `json:"reporter,omitempty"` // Reporter
ReporterVolume string `json:"reporterVolume,omitempty"` // Reporter Volume
Rights string `json:"rights,omitempty"` // Rights
RunningTime string `json:"runningTime,omitempty"` // Running Time
Scale string `json:"scale,omitempty"` // Scale
Section string `json:"section,omitempty"` // Section
Series string `json:"series,omitempty"` // Series
SeriesNumber string `json:"seriesNumber,omitempty"` // Series Number
SeriesText string `json:"seriesText,omitempty"` // Series Text
SeriesTitle string `json:"seriesTitle,omitempty"` // Series Title
Session string `json:"session,omitempty"` // Session
ShortTitle string `json:"shortTitle,omitempty"` // Short Title
Studio string `json:"studio,omitempty"` // Studio
Subject string `json:"subject,omitempty"` // Subject
System string `json:"system,omitempty"` // System
Title string `json:"title,omitempty"` // Title
ThesisType string `json:"thesisType,omitempty"` // Type
PresentationType string `json:"presentationType,omitempty"` // Type
MapType string `json:"mapType,omitempty"` // Type
ManuscriptType string `json:"manuscriptType,omitempty"` // Type
LetterType string `json:"letterType,omitempty"` // Type
Url string `json:"url,omitempty"` // URL
University string `json:"university,omitempty"` // University
VersionNumber string `json:"versionNumber,omitempty"` // Version
Volume string `json:"volume,omitempty"` // Volume
WebsiteTitle string `json:"websiteTitle,omitempty"` // Website Title
WebsiteType string `json:"websiteType,omitempty"` // Website Type
// Attachment
LinkMode string `json:"linkMode,omitempty"`
Note string `json:"note,omitempty"`
ContentType string `json:"contentType,omitempty"`
Charset string `json:"charset,omitempty"`
Filename string `json:"filename,omitempty"`
MD5 string `json:"md5,omitempty"`
MTime int64 `json:"mtime,omitempty"`
}
type ItemMedia ¶
type ItemMedia struct {
Metadata ItemMediaMeta `json:"metadata,omitempty"`
}
type ItemMediaMeta ¶
type ItemMediaMeta struct {
Mimetype string `json:"mimetype"`
Type string `json:"type"`
Ext string `json:"ext,omitempty"`
Sha256 string `json:"sha256,omitempty"`
Duration float64 `json:"duration,omitempty"`
Width float64 `json:"width,omitempty"`
Height float64 `json:"height,omitempty"`
Video interface{} `json:"video,omitempty"`
Audio interface{} `json:audio,omitempty`
Image interface{} `json:image,omitempty`
}
func (*ItemMediaMeta) UnmarshalJSON ¶
func (imm *ItemMediaMeta) UnmarshalJSON(data []byte) error
type JSONDomainMap ¶
type JSONDomainMap map[string]interface{}
func CreateJSONDomainMap ¶
func CreateJSONDomainMap() *JSONDomainMap
func (*JSONDomainMap) SetBlockParentQuery ¶
func (jdm *JSONDomainMap) SetBlockParentQuery(allParentsQuery string) *JSONDomainMap
*
- Indicates that the resulting domain will contain all parent documents of the children in the existing domain *
- @param allParentsQuery a query used to identify all parent documents in the collection
func (*JSONDomainMap) WithFilter ¶
func (jdm *JSONDomainMap) WithFilter(filter string) *JSONDomainMap
*
- Indicates that the domain should be narrowed by the specified filter *
- May be called multiple times. Each added filter is retained and used to narrow the domain.
func (*JSONDomainMap) WithQuery ¶
func (jdm *JSONDomainMap) WithQuery(query string) *JSONDomainMap
*
- Indicates that the domain should be the following query *
- May be called multiple times. Each specified query is retained and included in the domain.
func (*JSONDomainMap) WithTagsToExclude ¶
func (jdm *JSONDomainMap) WithTagsToExclude(excludeTagsValue string) *JSONDomainMap
*
- Provide a tag or tags that correspond to filters or queries to exclude from the domain *
- May be called multiple times. Each exclude-string is retained and used for removing queries/filters from the
- domain specification. *
- @param excludeTagsValue a comma-delimited String containing filter/query tags to exclude
type JSONFacetMap ¶
type JSONFacetMap map[string]interface{}
func CreateJSONFacetMap ¶
func CreateJSONFacetMap(t string) *JSONFacetMap
type JSONHeatmapFacetMap ¶
type JSONHeatmapFacetMap JSONFacetMap
func CreateJSONHeatmapFacetMap ¶
func CreateJSONHeatmapFacetMap(fieldname string) *JSONHeatmapFacetMap
func (*JSONHeatmapFacetMap) SetDistErr ¶
func (jfm *JSONHeatmapFacetMap) SetDistErr(distErr float64) *JSONHeatmapFacetMap
*
- Indicates the maximum acceptable cell error distance. *
- Used to compute the size of each cell in the heatmap grid rather than specifying {@link #setGridLevel(int)} *
- @param distErr a positive value representing the maximum acceptable cell error. *
- @see #setGridLevel(int)
- @see #setDistErrPct(double)
func (*JSONHeatmapFacetMap) SetDistErrPct ¶
func (jfm *JSONHeatmapFacetMap) SetDistErrPct(distErrPct float64) *JSONHeatmapFacetMap
*
- A fraction of the heatmap region that is used to compute the cell size. *
- Defaults to 0.15 if not specified. *
- @see #setGridLevel(int)
- @see #setDistErr(double)
func (*JSONHeatmapFacetMap) SetGridLevel ¶
func (jfm *JSONHeatmapFacetMap) SetGridLevel(individualCellSize int64) *JSONHeatmapFacetMap
*
- Indicates the size of each cell in the computed heatmap grid *
- If not set, defaults to being computed by {@code distErrPct} or {@code distErr} *
- @param individualCellSize the forced size of each cell in the heatmap grid *
- @see #setDistErr(double)
- @see #setDistErrPct(double)
func (*JSONHeatmapFacetMap) SetHeatmapFormat ¶
func (jfm *JSONHeatmapFacetMap) SetHeatmapFormat(format string) *JSONHeatmapFacetMap
*
- Sets the format that the computed heatmap should be returned in. *
- Defaults to 'ints2D' if not specified.
func (*JSONHeatmapFacetMap) SetRegionQuery ¶
func (jfm *JSONHeatmapFacetMap) SetRegionQuery(queryString string) *JSONHeatmapFacetMap
*
- Indicate the region to compute the heatmap facet on. *
- Defaults to the "world" ("[-180,-90 TO 180,90]")
type JSONQueryFacetMap ¶
type JSONQueryFacetMap JSONFacetMap
func CreateJSONQueryFacetMap ¶
func CreateJSONQueryFacetMap() *JSONQueryFacetMap
type JSONRangeFacetMap ¶
type JSONRangeFacetMap JSONFacetMap
func CreateJSONRangeFacetMap ¶
func CreateJSONRangeFacetMap(field string, start, end, gap interface{}) (*JSONRangeFacetMap, error)
func (*JSONRangeFacetMap) SetMinCount ¶
func (jfm *JSONRangeFacetMap) SetMinCount(minOccurrences int64) *JSONRangeFacetMap
*
- Indicates that buckets should be returned only if they have a count of at least {@code minOccurrences} *
- Defaults to '0' if not specified.
func (*JSONRangeFacetMap) SetOtherBuckets ¶
func (jfm *JSONRangeFacetMap) SetOtherBuckets(bucketSpecifier string) *JSONRangeFacetMap
*
- Indicates that an additional range bucket(s) should be computed and added to those computed for {@code SearchResultStart} and {@code end} *
- See {@link OtherBuckets} for possible options.
type JSONTermsFacetMap ¶
type JSONTermsFacetMap JSONFacetMap // https://github.com/apache/lucene-solr/blob/master/solr/solrj/src/java/org/apache/solr/client/solrj/request/json/TermsFacetMap.java
func CreateJSONTermsFacetMap ¶
func CreateJSONTermsFacetMap(field string) *JSONTermsFacetMap
func (*JSONTermsFacetMap) IncludeAllBucketsUnionBucket ¶
func (jfm *JSONTermsFacetMap) IncludeAllBucketsUnionBucket(shouldInclude bool) *JSONTermsFacetMap
*
- Creates a bucket representing the union of all other buckets. *
- For multi-valued Fields this is different than a bucket for the entire domain, since documents can belong to
- multiple buckets. Defaults to false if not specified. *
- @param shouldInclude true if the union bucket "allBuckets" should be computed; false otherwise
func (*JSONTermsFacetMap) IncludeMissingBucket ¶
func (jfm *JSONTermsFacetMap) IncludeMissingBucket(missingBucket bool) *JSONTermsFacetMap
*
- Indicates that Solr should create a bucket corresponding to documents missing the field used by this facet. *
- Defaults to false if not specified. *
- @param missingBucket true if the special "missing" bucket should be created; false otherwise
func (*JSONTermsFacetMap) IncludeTotalNumBuckets ¶
func (jfm *JSONTermsFacetMap) IncludeTotalNumBuckets(numBuckets bool) *JSONTermsFacetMap
*
- Indicates that Solr should include the total number of buckets for this facet. *
- Note that this is different than the number of buckets returned. Defaults to false if not specified *
- @param numBuckets true if the "numBuckets" field should be computed; false otherwise
func (*JSONTermsFacetMap) JSONFacetMap ¶
func (jfm *JSONTermsFacetMap) JSONFacetMap() *JSONFacetMap
func (*JSONTermsFacetMap) SetMinCount ¶
func (jfm *JSONTermsFacetMap) SetMinCount(minCount int64) *JSONTermsFacetMap
*
- Indicates that the facet results should not include any buckets with a count less than {@code minCount}. *
- Defaults to 1 if not specified.
func (*JSONTermsFacetMap) SetOverRefine ¶
func (jfm *JSONTermsFacetMap) SetOverRefine(numExtraBuckets int64) *JSONTermsFacetMap
*
- Indicates how many extra buckets to request during distributed-facet-refining beyond those required by {@link #setLimit(int)} *
- Defaults to -1 if not specified, which triggers some heuristic guessing based on other settings.
func (*JSONTermsFacetMap) SetOverRequest ¶
func (jfm *JSONTermsFacetMap) SetOverRequest(numExtraBuckets int64) *JSONTermsFacetMap
*
- Indicates the number of additional buckets to request internally beyond those required by {@link #setLimit(int)}. *
- Defaults to -1 if not specified, which triggers some heuristic guessing based on other settings.
func (*JSONTermsFacetMap) SetPreliminarySort ¶
func (jfm *JSONTermsFacetMap) SetPreliminarySort(preliminarySort string) *JSONTermsFacetMap
*
- Indicates an approximate sort calculation to be performed during initial bucket generation and collection. *
- Values can be based on 'count' (the number of results in each bucket), 'index' (the natural order of bucket values),
- or on any stat facet that occurs in the bucket. Defaults to "count desc" if not specified. *
- When no {@code prelim_sort} is provided, {@code sort} is calculated on all buckets generated by all shards. If
- {@code sort} is expensive, {@code prelim_sort} can be used to provide a cheaper approximation calculation that is
- run instead on initial bucket collection. {@code sort} is still used when assembling the final list of buckets. *
- @see TermsFacetMap#setSort(String)
func (*JSONTermsFacetMap) SetTermPrefix ¶
func (jfm *JSONTermsFacetMap) SetTermPrefix(termPrefix string) *JSONTermsFacetMap
*
- Indicates that the facet should only produce buckets for terms that SearchResultStart with the specified Prefix.
func (*JSONTermsFacetMap) UseDistributedFacetRefining ¶
func (jfm *JSONTermsFacetMap) UseDistributedFacetRefining(useRefining bool) *JSONTermsFacetMap
*
- Indicates whether this facet should use distributed facet refining. *
- "Distributed facet refining" is a second, optional stage in the facet process that ensures that counts for the
- returned buckets are exact. Enabling it is a tradeoff between precision and speed/performance. Defaults to false
- if not specified.
- @param useRefining true if distributed facet refining should be used; false otherwise
type MTElasticSearch ¶
type MTElasticSearch struct {
// contains filtered or unexported fields
}
func NewMTElasticSearch ¶
func (*MTElasticSearch) Delete ¶
func (mte *MTElasticSearch) Delete(cfg *ScrollConfig) (int64, error)
func (*MTElasticSearch) LastUpdate ¶
func (mte *MTElasticSearch) LastUpdate(cfg *ScrollConfig) (time.Time, error)
func (*MTElasticSearch) LoadDocs ¶
func (mte *MTElasticSearch) LoadDocs(ids []string, ctx context.Context) (map[string]*SourceData, error)
func (*MTElasticSearch) Scroll ¶
func (mte *MTElasticSearch) Scroll(cfg *ScrollConfig, callback func(data *SourceData) error) error
func (*MTElasticSearch) Search ¶
func (mte *MTElasticSearch) Search(cfg *SearchConfig) ([]map[string][]string, []*SourceData, int64, FacetCountResult, error)
func (*MTElasticSearch) StatsByACL ¶
func (mte *MTElasticSearch) StatsByACL(catalog []string) (int64, FacetCountResult, error)
func (*MTElasticSearch) Update ¶
func (mte *MTElasticSearch) Update(source Source, ms mediaserver.Mediaserver) error
func (*MTElasticSearch) UpdateTimestamp ¶
func (mte *MTElasticSearch) UpdateTimestamp(source Source, ms mediaserver.Mediaserver, timestamp time.Time) error
type MTSOLRSearch ¶
type MTSOLRSearch struct {
// contains filtered or unexported fields
}
func NewMTSOLRSearch ¶
func (*MTSOLRSearch) LoadDocs ¶
func (mte *MTSOLRSearch) LoadDocs(ids []string, ctx context.Context) (map[string]*SourceData, error)
func (*MTSOLRSearch) Search ¶
func (mte *MTSOLRSearch) Search(cfg *SearchConfig) ([]map[string][]string, []*SourceData, int64, FacetCountResult, error)
func (*MTSOLRSearch) Update ¶
func (mte *MTSOLRSearch) Update(source Source, ms mediaserver.Mediaserver) error
type Notification ¶
type Parent ¶
type Parent string
zotero treats empty strings as false in ParentCollection
func (*Parent) UnmarshalJSON ¶
type RelationList ¶
Relations are empty array or string map
func (*RelationList) UnmarshalJSON ¶
func (rl *RelationList) UnmarshalJSON(data []byte) error
type Resource ¶
type Resource struct {
Src string `json:"src"`
Name string `json:"Name"`
Param ResourceParam `json:"param"`
}
type ResourceParam ¶
type ScrollConfig ¶
type Search ¶
func (*Search) LoadEntities ¶
func (s *Search) LoadEntities(ids []string) (map[string]*SourceData, error)
func (*Search) LoadEntity ¶
func (s *Search) LoadEntity(id string) (*SourceData, error)
func (*Search) Search ¶
func (s *Search) Search(cfg *SearchConfig) ([]map[string][]string, []*SourceData, int64, FacetCountResult, error)
func (*Search) StatsByACL ¶
func (s *Search) StatsByACL(catalog []string) (int64, FacetCountResult, error)
type SearchConfig ¶
type SearchEngine ¶
type SearchEngine interface {
Update(source Source, ms mediaserver.Mediaserver) error
LoadDocs(ids []string, ctx context.Context) (map[string]*SourceData, error)
Search(cfg *SearchConfig) ([]map[string][]string, []*SourceData, int64, FacetCountResult, error)
StatsByACL(catalog []string) (int64, FacetCountResult, error)
}
type SearchResult ¶
type SearchResult struct {
Items []SearchResultItem `json:"items"`
Total int64 `json:"total"`
Start int64 `json:"SearchResultStart"`
Rows int64 `json:"Rows"`
Query string `json:"query"`
Search string `json:"search"`
Next string `json:"next"`
FacetFieldCount map[string]facetField `json:"facetfieldcount"`
}
type SearchResultItem ¶
type SearchResultItem struct {
Id string `json:"Id"`
Type string `json:"type"`
Title string `json:"title"`
Text string `json:"text"`
Collection string `json:"collection"`
Authors []string `json:"authors"`
AuthorText string `json:"authortext"`
Link string `json:"link"`
FirstItem bool `json:"firstitem"`
Total int64 `json:"total,omitempty"`
Date string `json:"date"`
Icon string `json:"icon"`
Media map[string]int `json:"media"`
MetaPublic bool `json:"metapublic"`
ContentPublic bool `json:"contentpublic"`
MetaOK bool `json:"metaok"`
ContentOK bool `json:"contentok"`
Poster *Media `json:"poster"`
Highlight map[string][]string `json:"highlight"`
}
type SearchStatus ¶
type SearchStatus struct {
BaseStatus
SearchResult template.JS
Result *SearchResult
QueryApi template.URL
SearchResultStart int
SearchResultRows int
SearchResultTotal int
SearchString string
Filter map[string][]string
SearchResultVisible bool
Facet map[string]map[string]FacetCountField
CoreFacets []string
MetaDescription string
EmptySearch bool
Stats FacetCountResult
}
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(mts *Search, uc *UserCache, google *customsearch.Service, templateFiles map[string][]string, templateDev bool, InstanceName, addr, addrExt, mediaserver, mediaserverkey string, mediatokenexp time.Duration, log *logging.Logger, accesslog io.Writer, prefixes map[string]string, staticDir, staticCacheControl, jwtKey string, jwtAlg []string, linkTokenExp, sessionTimeout time.Duration, loginUrl, loginIssuer, guestGroup, adminGroup, AmpCache, ampApiKeyFile string, searchFields map[string]string, facets SolrFacetList, locations NetGroups, icons map[string]string, baseCatalog []string, subFilter []SubFilter, collectionsCatalog, clusterCatalog string, googleCSEKey map[string]KV) (*Server, error)
func (*Server) DoPanicJSON ¶
func (*Server) GetClaimUser ¶
func (*Server) InitTemplates ¶
func (*Server) ListenAndServe ¶
type SolrFacet ¶
type SolrFacetList ¶
type SolrResultJSONFacetBucket ¶
func NewSolrResultJSONFacetBucket ¶
func NewSolrResultJSONFacetBucket() (*SolrResultJSONFacetBucket, error)
func (*SolrResultJSONFacetBucket) Init ¶
func (fb *SolrResultJSONFacetBucket) Init(data interface{}) error
type SolrResultJSONFacetElement ¶
type SolrResultJSONFacetElement struct {
//Name string `json:"Name"`
Buckets []*SolrResultJSONFacetBucket `json:"buckets"`
}
func NewSolrResultJSONFacetElement ¶
func NewSolrResultJSONFacetElement() (*SolrResultJSONFacetElement, error)
func (*SolrResultJSONFacetElement) Init ¶
func (fe *SolrResultJSONFacetElement) Init(data interface{}) error
type SolrResultJSONFacets ¶
type SolrResultJSONFacets struct {
Count int64 `json:"count"`
Elements map[string]*SolrResultJSONFacetElement `json:"elements"`
}
func NewSolrResultJSONFacets ¶
func NewSolrResultJSONFacets() (*SolrResultJSONFacets, error)
func (*SolrResultJSONFacets) Init ¶
func (fa *SolrResultJSONFacets) Init(data interface{}) error
type Source ¶
type Source interface {
GetSignature() string
Name() string
GetTitle() string
GetSeries() string
GetPlace() string
GetDate() string
GetCollectionTitle() string
GetPersons() []Person
GetACL() map[string][]string
GetCatalogs() []string
GetCategories() []string
GetTags() []string
GetMedia(ms mediaserver.Mediaserver) map[string]MediaList
GetPoster(ms mediaserver.Mediaserver) *Media
GetNotes() []Note
GetUrl() string
GetAbstract() string
GetReferences() []Reference
GetMeta() *Metalist
GetExtra() *Metalist
GetVars() *Varlist
GetContentType() string
GetQueries() []Query
GetSolrDoc() *solr.Document
GetContentString() string
GetContentMime() string
GetDateAdded() time.Time
}
type SourceCDK ¶
type SourceCDK struct {
CDKData SourceCDKData `json:"CDKData"`
// contains filtered or unexported fields
}
func NewSourceCDK ¶
func (*SourceCDK) GetAbstract ¶
func (*SourceCDK) GetCatalogs ¶
func (*SourceCDK) GetCategories ¶
func (*SourceCDK) GetCollectionTitle ¶
func (*SourceCDK) GetContentMime ¶
func (*SourceCDK) GetContentString ¶
func (*SourceCDK) GetContentType ¶
func (*SourceCDK) GetDateAdded ¶
func (*SourceCDK) GetMedia ¶
func (cdk *SourceCDK) GetMedia(ms mediaserver.Mediaserver) map[string]MediaList
func (*SourceCDK) GetPersons ¶
func (*SourceCDK) GetPoster ¶
func (cdk *SourceCDK) GetPoster(ms mediaserver.Mediaserver) *Media
func (*SourceCDK) GetQueries ¶
func (*SourceCDK) GetReferences ¶
func (*SourceCDK) GetSignature ¶
func (*SourceCDK) GetSolrDoc ¶
type SourceCDKData ¶
type SourceCDKData struct {
}
type SourceData ¶
type SourceData struct {
Signature string `json:"signature"`
Source string `json:"source"`
Title string `json:"title"`
Series string `json:"series"`
Place string `json:"place"`
Date string `json:"date"`
CollectionTitle string `json:"collectiontitle"`
Persons []Person `json:"persons"`
ACL map[string][]string `json:"acl"`
Catalog []string `json:"catalog"`
Category []string `json:"category"`
Tags []string `json:"tags"`
Media map[string]MediaList `json:"media"`
Poster *Media `json:"poster"`
Notes []Note `json:"notes"`
Url string `json:"url"`
Abstract string `json:"abstract"`
References []Reference `json:"references"`
Meta *Metalist `json:"meta"`
Extra *Metalist `json:"extra"`
Vars *Varlist `json:"vars"`
Type string `json:"type"`
Queries []Query `json:"queries"`
ContentStr string `json:"-"`
ContentMime string `json:"-"`
HasMedia bool `json:"hasmedia"`
Mediatype []string `json:"mediatype"`
DateAdded time.Time `json:"dateadded"`
Timestamp time.Time `json:"timestamp"`
}
func InitSourceData ¶
func InitSourceData(source Source, ms mediaserver.Mediaserver) *SourceData
func (*SourceData) GetOpenGraph ¶
type SourceDiplomHGK ¶
type SourceDiplomHGK struct {
DData SourceDiplomHGKData `json:"DData"`
// contains filtered or unexported fields
}
func NewSourceDiplomHGK ¶
func NewSourceDiplomHGK(entry *cacheEntry, mts *MTSolr) (*SourceDiplomHGK, error)
func (*SourceDiplomHGK) GetACL ¶
func (dhgk *SourceDiplomHGK) GetACL() map[string][]string
func (*SourceDiplomHGK) GetAbstract ¶
func (dhgk *SourceDiplomHGK) GetAbstract() string
func (*SourceDiplomHGK) GetCatalogs ¶
func (dhgk *SourceDiplomHGK) GetCatalogs() []string
func (*SourceDiplomHGK) GetCategories ¶
func (dhgk *SourceDiplomHGK) GetCategories() []string
func (*SourceDiplomHGK) GetCollectionTitle ¶
func (dhgk *SourceDiplomHGK) GetCollectionTitle() string
func (*SourceDiplomHGK) GetContentMime ¶
func (dhgk *SourceDiplomHGK) GetContentMime() string
func (*SourceDiplomHGK) GetContentString ¶
func (dhgk *SourceDiplomHGK) GetContentString() string
func (*SourceDiplomHGK) GetContentType ¶
func (dhgk *SourceDiplomHGK) GetContentType() string
func (*SourceDiplomHGK) GetDate ¶
func (dhgk *SourceDiplomHGK) GetDate() string
func (*SourceDiplomHGK) GetDateAdded ¶
func (dhgk *SourceDiplomHGK) GetDateAdded() time.Time
func (*SourceDiplomHGK) GetExtra ¶
func (dhgk *SourceDiplomHGK) GetExtra() *Metalist
func (*SourceDiplomHGK) GetMedia ¶
func (dhgk *SourceDiplomHGK) GetMedia(ms mediaserver.Mediaserver) map[string]MediaList
func (*SourceDiplomHGK) GetMeta ¶
func (dhgk *SourceDiplomHGK) GetMeta() *Metalist
func (*SourceDiplomHGK) GetNotes ¶
func (dhgk *SourceDiplomHGK) GetNotes() []Note
func (*SourceDiplomHGK) GetPersons ¶
func (dhgk *SourceDiplomHGK) GetPersons() []Person
func (*SourceDiplomHGK) GetPlace ¶
func (dhgk *SourceDiplomHGK) GetPlace() string
func (*SourceDiplomHGK) GetPoster ¶
func (dhgk *SourceDiplomHGK) GetPoster(ms mediaserver.Mediaserver) *Media
func (*SourceDiplomHGK) GetQueries ¶
func (dhgk *SourceDiplomHGK) GetQueries() []Query
func (*SourceDiplomHGK) GetReferences ¶
func (dhgk *SourceDiplomHGK) GetReferences() []Reference
func (*SourceDiplomHGK) GetSeries ¶
func (dhgk *SourceDiplomHGK) GetSeries() string
func (*SourceDiplomHGK) GetSignature ¶
func (dhgk *SourceDiplomHGK) GetSignature() string
func (*SourceDiplomHGK) GetSolrDoc ¶
func (dhgk *SourceDiplomHGK) GetSolrDoc() *solr.Document
func (*SourceDiplomHGK) GetTags ¶
func (dhgk *SourceDiplomHGK) GetTags() []string
func (*SourceDiplomHGK) GetTitle ¶
func (dhgk *SourceDiplomHGK) GetTitle() string
func (*SourceDiplomHGK) GetUrl ¶
func (dhgk *SourceDiplomHGK) GetUrl() string
func (*SourceDiplomHGK) GetVars ¶
func (dhgk *SourceDiplomHGK) GetVars() *Varlist
func (*SourceDiplomHGK) Init ¶
func (dhgk *SourceDiplomHGK) Init(entry *cacheEntry) error
func (*SourceDiplomHGK) Name ¶
func (dhgk *SourceDiplomHGK) Name() string
type SourceDiplomHGKData ¶
type SourceDiplomHGKData struct {
Year string `json:"year"`
Anlassnummer string `json:"anlassnummer"`
Anlassbezeichnung string `json:"anlassbezeichnung"`
IDPerson string `json:"idperson"`
Anrede string `json:"anrede"`
Vornamen string `json:"vornamen"`
Nachname string `json:"nachname"`
Email2 string `json"e-mail 2"`
Done string `json:"done"`
Meta map[string]string `json:"meta"`
References []string `json:"references"`
Videos []string `json:"videos"`
Beschreibung string `json:"beschreibung"`
Betreuer1 string `json:"betreuer1"`
Betreuer2 string `json:"betreuer2"`
Email string `json:"email"`
Title string `json:"title"`
Untertitel string `json:"untertitel"`
Web1 string `json:"web1"`
Web2 string `json:"web2"`
Webmedia string `json:"webmedia"`
Abschluss string `json:"abschluss"`
Institut string `json:"institut"`
Categories []string `json:"categories"`
Tags []string `json:"tags"`
Slug string `json:"slug"`
Series []string `json:"series"`
Resources []Resource `json:"resources"`
Files []SourceDiplomHGKFile `json:"files"`
Images []string `json:"images"`
Pdfs []string `json:"pdfs"`
Rights string `json:"rights"`
}
type SourceDiplomHGKFile ¶
type SourceDiplomHGKFile struct {
Year string `json:"year"`
IDPerson string `json:"idperson"`
FileID string `json:"fileid"`
Name string `json:"Name"`
Filename string `json:"filename"`
Thumbname string `json:"thumbname"`
Webname string `json:"webname"`
Mimetype string `json:"mimetype"`
Size string `json:"size"`
Tech string `json:"tech"`
Uploadtime string `json:"uploadtime"`
Metadata SourceDiplomHGKFileMeta `json:"metadata"`
Url string `json:"url"`
}
type SourceDiplomHGKFileMeta ¶
type SourceError ¶
type SourceError struct {
// contains filtered or unexported fields
}
func NewSourceError ¶
func NewSourceError(err error, mts *MTSolr) (*SourceError, error)
func (*SourceError) GetAbstract ¶
func (serr *SourceError) GetAbstract() string
func (*SourceError) GetCollectionTitle ¶
func (serr *SourceError) GetCollectionTitle() string
func (*SourceError) GetDate ¶
func (serr *SourceError) GetDate() string
func (*SourceError) GetMedia ¶
func (serr *SourceError) GetMedia() map[string]MediaList
func (*SourceError) GetMeta ¶
func (serr *SourceError) GetMeta() map[string]string
func (*SourceError) GetNames ¶
func (serr *SourceError) GetNames() []Person
func (*SourceError) GetNotes ¶
func (serr *SourceError) GetNotes() []Note
func (*SourceError) GetPlace ¶
func (serr *SourceError) GetPlace() string
func (*SourceError) GetQueries ¶
func (serr *SourceError) GetQueries() []Query
func (*SourceError) GetReferences ¶
func (serr *SourceError) GetReferences() []Reference
func (*SourceError) GetSolrDoc ¶
func (serr *SourceError) GetSolrDoc() *solr.Document
func (*SourceError) GetTags ¶
func (serr *SourceError) GetTags() []string
func (*SourceError) GetTitle ¶
func (serr *SourceError) GetTitle() string
func (*SourceError) GetType ¶
func (serr *SourceError) GetType() string
func (*SourceError) Name ¶
func (serr *SourceError) Name() string
type SourceZoteroDeprecated ¶
type SourceZoteroDeprecated struct {
ZData ZoteroData `json:"ZData"`
CollMeta map[string]string `json:"collmeta"`
// contains filtered or unexported fields
}
func NewSourceZoteroDeprecated ¶
func NewSourceZoteroDeprecated(entry *cacheEntry, mts *MTSolr) (*SourceZoteroDeprecated, error)
func (*SourceZoteroDeprecated) GetACL ¶
func (zot *SourceZoteroDeprecated) GetACL() map[string][]string
func (*SourceZoteroDeprecated) GetAbstract ¶
func (zot *SourceZoteroDeprecated) GetAbstract() string
func (*SourceZoteroDeprecated) GetCatalogs ¶
func (zot *SourceZoteroDeprecated) GetCatalogs() []string
func (*SourceZoteroDeprecated) GetCategories ¶
func (zot *SourceZoteroDeprecated) GetCategories() []string
func (*SourceZoteroDeprecated) GetChildren ¶
func (zot *SourceZoteroDeprecated) GetChildren(itemType, linkMode string) []ZoteroData
func (*SourceZoteroDeprecated) GetCollectionTitle ¶
func (zot *SourceZoteroDeprecated) GetCollectionTitle() string
func (*SourceZoteroDeprecated) GetContentMime ¶
func (zot *SourceZoteroDeprecated) GetContentMime() string
func (*SourceZoteroDeprecated) GetContentString ¶
func (zot *SourceZoteroDeprecated) GetContentString() string
func (*SourceZoteroDeprecated) GetContentType ¶
func (zot *SourceZoteroDeprecated) GetContentType() string
func (*SourceZoteroDeprecated) GetDate ¶
func (zot *SourceZoteroDeprecated) GetDate() string
func (*SourceZoteroDeprecated) GetDateAdded ¶
func (zot *SourceZoteroDeprecated) GetDateAdded() time.Time
func (*SourceZoteroDeprecated) GetExtra ¶
func (zot *SourceZoteroDeprecated) GetExtra() *Metalist
func (*SourceZoteroDeprecated) GetMedia ¶
func (zot *SourceZoteroDeprecated) GetMedia(ms mediaserver.Mediaserver) map[string]MediaList
func (*SourceZoteroDeprecated) GetMeta ¶
func (zot *SourceZoteroDeprecated) GetMeta() *Metalist
func (*SourceZoteroDeprecated) GetNotes ¶
func (zot *SourceZoteroDeprecated) GetNotes() []Note
func (*SourceZoteroDeprecated) GetPersons ¶
func (zot *SourceZoteroDeprecated) GetPersons() []Person
func (*SourceZoteroDeprecated) GetPlace ¶
func (zot *SourceZoteroDeprecated) GetPlace() string
func (*SourceZoteroDeprecated) GetPoster ¶
func (zot *SourceZoteroDeprecated) GetPoster(ms mediaserver.Mediaserver) *Media
func (*SourceZoteroDeprecated) GetQueries ¶
func (zot *SourceZoteroDeprecated) GetQueries() []Query
func (*SourceZoteroDeprecated) GetReferences ¶
func (zot *SourceZoteroDeprecated) GetReferences() []Reference
func (*SourceZoteroDeprecated) GetSeries ¶
func (zot *SourceZoteroDeprecated) GetSeries() string
func (*SourceZoteroDeprecated) GetSignature ¶
func (zot *SourceZoteroDeprecated) GetSignature() string
func (*SourceZoteroDeprecated) GetSolrDoc ¶
func (zot *SourceZoteroDeprecated) GetSolrDoc() *solr.Document
func (*SourceZoteroDeprecated) GetTags ¶
func (zot *SourceZoteroDeprecated) GetTags() []string
func (*SourceZoteroDeprecated) GetTitle ¶
func (zot *SourceZoteroDeprecated) GetTitle() string
func (*SourceZoteroDeprecated) GetUrl ¶
func (zot *SourceZoteroDeprecated) GetUrl() string
func (*SourceZoteroDeprecated) GetVars ¶
func (zot *SourceZoteroDeprecated) GetVars() *Varlist
func (*SourceZoteroDeprecated) Init ¶
func (zot *SourceZoteroDeprecated) Init(entry *cacheEntry) error
func (*SourceZoteroDeprecated) Name ¶
func (zot *SourceZoteroDeprecated) Name() string
type User ¶
type User struct {
Server *Server `json:"-"`
Id string `json:"Id"`
Groups []string `json:"Groups"`
Email string `json:"email"`
FirstName string `json:"firstName"`
LastName string `json:"lastName"`
HomeOrg string `json:"homeOrg"`
Exp time.Time `json:"exp"`
LoggedIn bool `json:"loggedIn"`
LoggedOut bool `json:"loggedOut"`
}
func NewGuestUser ¶
func (User) LinkCollections ¶
func (User) LinkSignature ¶
func (User) LinkSignatureCache ¶
type UserCache ¶
type UserCache struct {
// contains filtered or unexported fields
}
func NewUserCache ¶
type ZoteroCollection ¶
type ZoteroCollection struct {
Key string `json:"Key"`
Version int64 `json:"version"`
Library ZoteroLibrary `json:"library,omitempty"`
Links interface{} `json:"links,omitempty"`
Meta ZoteroCollectionMeta `json:"meta,omitempty"`
Data ZoteroCollectionData `json:"data,omitempty"`
Parent *ZoteroCollection `json:"parent,omitempty"`
}
func (*ZoteroCollection) GetParents ¶
func (zc *ZoteroCollection) GetParents() []string
type ZoteroCollectionData ¶
type ZoteroCollectionData struct {
Key string `json:"Key"`
Name string `json:"Name"`
Version int64 `json:"version"`
Relations RelationList `json:"relations"`
ParentCollection Parent `json:"parentCollection,omitempty"`
}
type ZoteroCollectionMeta ¶
type ZoteroData ¶
type ZoteroData struct {
Key string `json:"Key"`
Version int `json:"version"`
Library ZoteroLibrary `json:"library"`
Links interface{} `json:"links"`
Meta interface{} `json:"meta"`
Data ItemGeneric `json:"data"`
Group ZoteroGroup `json:"group"`
Children []ZoteroData `json:"children,omitempty"`
Collections []ZoteroCollection `json:"collections,omitempty"`
}
type ZoteroGroup ¶
type ZoteroGroup struct {
Id int64 `json:"id"`
Version int64 `json:"version"`
Links interface{} `json:"links,omitempty"`
Meta ZoteroGroupMeta `json:"meta"`
Data ZoteroGroupData `json:"data"`
}
type ZoteroGroupData ¶
type ZoteroGroupData struct {
Id int64 `json:"id"`
Version int64 `json:"version"`
Name string `json:"Name"`
Owner int64 `json:"owner"`
Type string `json:"type"`
Description string `json:"description"`
Url string `json:"url"`
HasImage int64 `json:"hasImage"`
LibraryEditing string `json:"libraryEditing"`
LibraryReading string `json:"libraryReading"`
FileEditing string `json:"fileEditing"`
Admins []int64 `json:"admins"`
}
type ZoteroGroupMeta ¶
type ZoteroLibrary ¶
type ZoteroStringList ¶
type ZoteroStringList []string
zotero returns single item lists as string
func (*ZoteroStringList) UnmarshalJSON ¶
func (irl *ZoteroStringList) UnmarshalJSON(data []byte) error
Source Files
¶
- Source.go
- SourceCDK.go
- SourceDiplomHGK.go
- SourceError.go
- SourceZoteroDeprecated.go
- document.go
- elasticSearch.go
- elasticSearchAggregation.go
- elasticSearchHighlight.go
- elasticSearchQuery.go
- facetManager.go
- generateDefaultCert.go
- helper.go
- search.go
- searchEngine.go
- server.go
- serverClusterAllHandler.go
- serverClusterHandler.go
- serverCollectionsHandler.go
- serverDetailHandler.go
- serverGoogleHandler.go
- serverReloadTemplates.go
- serverSearchHandler.go
- serverSitemapHandler.go
- serverUpdateHandler.go
- serverUserHandler.go
- solr.go
- solrFacet.go
- solrJSONDomainMap.go
- solrJSONFacetMap.go
- solrJSONHeatmapFacetMap.go
- solrJSONQueryFacetMap.go
- solrJSONRangeFacetMap.go
- solrJSONTermsFacetMap.go
- solrResultJSONFacets.go
- solrSearch.go
- sourceZotero.go
- userCache.go
- zoteroItemData.go