Documentation
¶
Overview ¶
Package ws provides the core library used by cmds/ws/ws.go, cmds/wsinit/wsinit.go and cmds/wsindexer/wsindexer.go
Copyright (c) 2014 - 2016, R. S. Doiel All rights not granted herein are expressly reserved by R. S. Doiel.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Index ¶
Constants ¶
const (
// Version is used as a release number number for ws, wsinit, wsindexer
Version = "0.0.8"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
Configuration provides the basic settings used by _ws_ and _wsint_ commands.
func (*Configuration) GenerateKeyAndCert ¶
func (config *Configuration) GenerateKeyAndCert() error
GenerateKeyAndCert will generate a new SSL Key/Cert pair if none exist. It will return a error if they already exist.
func (*Configuration) Getenv ¶
func (config *Configuration) Getenv() error
Getenv scans the environment variables and updates the fields in the configuration. If there is a problem parsing WS_URL then an error is returned.
func (*Configuration) InitializeProject ¶
func (config *Configuration) InitializeProject() (string, error)
InitializeProject scans the current working path and identifies what directories need to be created, creates them, adds SSL keys/certs if needed and returns a suggested configuration file.
func (*Configuration) SetDefaults ¶ added in v0.0.8
func (config *Configuration) SetDefaults()
SetDefaults sets the structure to common default values + DocRoot = "." + URL = http://localhost:8000
func (*Configuration) String ¶
func (config *Configuration) String() string
String returns a multiline block of text suitable to save in a text file.
func (*Configuration) Validate ¶
func (config *Configuration) Validate() error
Validate performs a sanity check of the values in the configuration Returns nil if OK otherwise returns error
Directories
¶
Path | Synopsis |
---|---|
cmds
|
|
ws
ws.go - A simple web server for static files and limit server side JavaScript @author R. S. Doiel, <rsdoiel@gmail.com> Copyright (c) 2014 - 2016, R. S. Doiel All rights not granted herein are expressly reserved by R. S. Doiel.
|
ws.go - A simple web server for static files and limit server side JavaScript @author R. S. Doiel, <rsdoiel@gmail.com> Copyright (c) 2014 - 2016, R. S. Doiel All rights not granted herein are expressly reserved by R. S. Doiel. |