Added KorAP plugin stylesheet support
Change-Id: Iaec401c59da0a2abc179f51b318c11e9fc41ce07
diff --git a/config/config.go b/config/config.go
index cdc1e0f..73e5697 100644
--- a/config/config.go
+++ b/config/config.go
@@ -13,7 +13,9 @@
const (
defaultServer = "https://korap.ids-mannheim.de/"
defaultSDK = "https://korap.ids-mannheim.de/js/korap-plugin-latest.js"
+ defaultStylesheet = "https://korap.ids-mannheim.de/css/kalamar-plugin-latest.css"
defaultServiceURL = "https://korap.ids-mannheim.de/plugin/koralmapper"
+ defaultCookieName = "km-config"
defaultPort = 5725
defaultLogLevel = "warn"
)
@@ -58,8 +60,10 @@
// MappingConfig represents the root configuration containing multiple mapping lists
type MappingConfig struct {
SDK string `yaml:"sdk,omitempty"`
+ Stylesheet string `yaml:"stylesheet,omitempty"`
Server string `yaml:"server,omitempty"`
ServiceURL string `yaml:"serviceURL,omitempty"`
+ CookieName string `yaml:"cookieName,omitempty"`
Port int `yaml:"port,omitempty"`
LogLevel string `yaml:"loglevel,omitempty"`
Lists []MappingList `yaml:"lists,omitempty"`
@@ -156,6 +160,7 @@
// Create final configuration
result := &MappingConfig{
SDK: globalConfig.SDK,
+ Stylesheet: globalConfig.Stylesheet,
Server: globalConfig.Server,
ServiceURL: globalConfig.ServiceURL,
Port: globalConfig.Port,
@@ -173,8 +178,10 @@
func ApplyDefaults(config *MappingConfig) {
defaults := map[*string]string{
&config.SDK: defaultSDK,
+ &config.Stylesheet: defaultStylesheet,
&config.Server: defaultServer,
&config.ServiceURL: defaultServiceURL,
+ &config.CookieName: defaultCookieName,
&config.LogLevel: defaultLogLevel,
}