Documentation ¶
Overview ¶
Copyright © 2020 Denis Rendler <connect@rendler.me>
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 Denis Rendler <connect@rendler.me>
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 ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiParams ¶
type ApiParams struct { PathPrefix string `mapstructure:"path-prefix"` Domain string CorsHost string `mapstructure:"cors-host"` }
web api general configuration options
type EnvJs ¶
type EnvJs struct { Cache bool `json:"cache"` Web struct { Domain string `json:"domain"` StoragePath string `json:"storage_path" mapstructure:"storage-path"` } `json:"web"` Theme struct { Logo struct { Image string `json:"image"` ImageCss []string `json:"imageCss"` } `json:"logo"` } `json:"theme"` }
type Https ¶
type Https struct { Enable bool Port string Cert string CertKey string `mapstructure:"cert-key"` ServerName string `mapstructure:"server-name"` EnableRedirect bool `mapstructure:"enable-redirect"` RedirectTo string `mapstructure:"redirect-to"` }
https configuration parameters
type Parameters ¶
type Parameters struct { Server ServerParams Api ApiParams `mapstructure:"web-api"` StaticSite StaticSite `mapstructure:"static-site"` Verbose bool Notifications notify.Config Sketch sketch.Config }
Top level options
func NewConfigParams ¶
func NewConfigParams() *Parameters
type ServerParams ¶
Parameters for configuring the server part of the application, ie. port, ip, https
func (ServerParams) HTTPSListeningAddr ¶
func (c ServerParams) HTTPSListeningAddr() string
HTTPSListeningAddr returns a string representing the HTTPS listening address in IP:port format
func (ServerParams) ListeningAddr ¶
func (c ServerParams) ListeningAddr() string
ListeningAddr returns a string representing the HTTP listening address in IP:port format