Documentation ¶
Index ¶
- Constants
- Variables
- func ApiCQR2Query(c *gin.Context)
- func ApiQuery2CQR(c *gin.Context)
- func ApiTransform(c *gin.Context)
- func HandleAccountCreate(c *gin.Context)
- func HandleAccountLogin(c *gin.Context)
- func HandleTransform(c *gin.Context)
- func RenderPlugin(tmpl template.Template, data interface{}) render.HTML
- func TemplatePlugin(p string) template.Template
- func TmplDict(values ...interface{}) (map[string]interface{}, error)
- type Config
- type EntrezConfig
- type ErrorPage
- type InternalPluginDetails
- type OtherServiceAddresses
- type Plugin
- type PluginDetails
- type PluginPermission
- type PluginStorage
- func (p *PluginStorage) Close() error
- func (p *PluginStorage) CreateBucket(bucket string) error
- func (p *PluginStorage) DeleteKey(bucket, key string) error
- func (p *PluginStorage) GetBuckets() ([]string, error)
- func (p *PluginStorage) GetValue(bucket, key string) (string, error)
- func (p *PluginStorage) GetValues(bucket string) (map[string]string, error)
- func (p *PluginStorage) PutValue(bucket, key, value string) error
- func (p *PluginStorage) ToCSV(bucket string) (string, error)
- type Query
- type Resources
- type Server
- func (s Server) ApiAccountCreate(c *gin.Context)
- func (s Server) ApiAccountLogin(c *gin.Context)
- func (s Server) ApiAccountLogout(c *gin.Context)
- func (s Server) ApiAccountUsername(c *gin.Context)
- func (s Server) ApiAdminCSVStorage(c *gin.Context)
- func (s Server) ApiAdminConfirm(c *gin.Context)
- func (s Server) ApiAdminDeleteStorage(c *gin.Context)
- func (s Server) ApiAdminUpdateStorage(c *gin.Context)
- func (s Server) ApiGetQuerySeedFromExchangeServer(token string) (toolexchange.Item, error)
- func (s Server) ApiHistoryAdd(c *gin.Context)
- func (s Server) ApiHistoryDelete(c *gin.Context)
- func (s Server) ApiHistoryGet(c *gin.Context)
- func (s Server) ApiKeywordSuggestor(c *gin.Context)
- func (s Server) ApiRequestTokenFromExchangeServer(query string) string
- func (s Server) ApiScroll(c *gin.Context)
- func (s Server) ApiSettingsRelevantSet(c *gin.Context)
- func (s Server) HandleAdmin(c *gin.Context)
- func (s Server) HandleClear(c *gin.Context)
- func (s Server) HandleIndex(c *gin.Context)
- func (s Server) HandlePluginWithControl(c *gin.Context)
- func (s Server) HandlePlugins(c *gin.Context)
- func (s Server) HandleQuery(c *gin.Context)
- func (s Server) HandleResults(c *gin.Context)
- func (s Server) HandleSettings(c *gin.Context)
- type Services
- type Settings
Constants ¶
View Source
const ( PluginAdmin = iota PluginUser PluginPublic )
View Source
const PluginStoragePath = "plugin_storage"
Variables ¶
View Source
var ( QueryCacher = combinator.NewFileQueryCache("file_cache") PluginTemplates []string Components = []string{"components/sidebar.tmpl.html", "components/util.tmpl.html", "components/login.template.html", "components/announcement.tmpl.html"} ServerConfiguration = Server{} )
Functions ¶
func ApiCQR2Query ¶
func ApiQuery2CQR ¶
func ApiTransform ¶
func HandleAccountCreate ¶
func HandleAccountLogin ¶
func HandleTransform ¶
func RenderPlugin ¶
RenderPlugin returns a gin-compatible HTML renderer for plugins.
func TemplatePlugin ¶
TemplatePlugin is the template method which will include searchrefiner components.
Types ¶
type Config ¶
type Config struct { Host string AdminEmail string Admins []string Entrez EntrezConfig Resources Resources // TODO: This should be merged into the Services struct. Mode string EnableAll bool Services Services ExchangeServerAddress string OtherServiceAddresses OtherServiceAddresses }
type EntrezConfig ¶
type InternalPluginDetails ¶
type InternalPluginDetails struct { URL string PluginDetails }
InternalPluginDetails contains details about a plugin which are vital in rendering the plugin page.
type OtherServiceAddresses ¶
type OtherServiceAddresses struct {
SRA string
}
type Plugin ¶
type Plugin interface { Startup(Server) Serve(Server, *gin.Context) PermissionType() PluginPermission Details() PluginDetails }
Plugin is the interface that must be implemented in order to register an external tool. See more: http://ielab.io/searchrefiner/plugins/
type PluginDetails ¶
type PluginDetails struct { Title string Description string Author string Version string ProjectURL string AcceptsQueryPosts bool }
PluginDetails are details about a plugin which is shown in the plugins page of searchrefiner.
type PluginPermission ¶
type PluginPermission int
type PluginStorage ¶
type PluginStorage struct {
// contains filtered or unexported fields
}
func OpenPluginStorage ¶
func OpenPluginStorage(plugin string) (*PluginStorage, error)
func (*PluginStorage) Close ¶
func (p *PluginStorage) Close() error
func (*PluginStorage) CreateBucket ¶
func (p *PluginStorage) CreateBucket(bucket string) error
func (*PluginStorage) DeleteKey ¶
func (p *PluginStorage) DeleteKey(bucket, key string) error
func (*PluginStorage) GetBuckets ¶
func (p *PluginStorage) GetBuckets() ([]string, error)
func (*PluginStorage) GetValue ¶
func (p *PluginStorage) GetValue(bucket, key string) (string, error)
func (*PluginStorage) GetValues ¶
func (p *PluginStorage) GetValues(bucket string) (map[string]string, error)
func (*PluginStorage) PutValue ¶
func (p *PluginStorage) PutValue(bucket, key, value string) error
type Server ¶
type Server struct { Perm *permissionbolt.Permissions Queries map[string][]Query Settings map[string]Settings Config Config Plugins []InternalPluginDetails Storage map[string]*PluginStorage Entrez stats.EntrezStatisticsSource CUIEmbeddings *cui2vec.PrecomputedEmbeddings QuicheCache quickumlsrest.Cache CUIMapping cui2vec.Mapping MetaMapClient metawrap.HTTPClient }
func (Server) ApiAccountCreate ¶
func (Server) ApiAccountLogin ¶
func (Server) ApiAccountLogout ¶
func (Server) ApiAccountUsername ¶
func (Server) ApiAdminCSVStorage ¶
func (Server) ApiAdminConfirm ¶
func (Server) ApiAdminDeleteStorage ¶
func (Server) ApiAdminUpdateStorage ¶
func (Server) ApiGetQuerySeedFromExchangeServer ¶
func (s Server) ApiGetQuerySeedFromExchangeServer(token string) (toolexchange.Item, error)
func (Server) ApiHistoryAdd ¶
func (Server) ApiHistoryDelete ¶
func (Server) ApiHistoryGet ¶
func (Server) ApiKeywordSuggestor ¶
func (Server) ApiRequestTokenFromExchangeServer ¶
func (Server) ApiSettingsRelevantSet ¶
func (Server) HandleAdmin ¶
func (Server) HandleClear ¶
func (Server) HandleIndex ¶
func (Server) HandlePluginWithControl ¶
func (Server) HandlePlugins ¶
func (Server) HandleQuery ¶
func (Server) HandleResults ¶
func (Server) HandleSettings ¶
type Services ¶
type Services struct { ElasticsearchPubMedURL string ElasticsearchPubMedUsername string ElasticsearchPubMedPassword string ElasticsearchUMLSURL string ElasticsearchUMLSUsername string ElasticsearchUMLSPassword string MetaMapURL string IndexName string DefaultPool int DefaultRetSize int MaxRetSize int MaxPool int Merged bool Sources string }
type Settings ¶
type Settings struct {
Relevant combinator.Documents
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.