Documentation
¶
Index ¶
- Variables
- func ContainsString(arr []string, str string) bool
- func ConvertInterfaceToByteArray(mimeType string, i interface{}) (results []byte, err error)
- func DeriveStaticURIFromPath(input string) (string, string)
- func GetCallerStackFrame() runtime.Frame
- func GetCurrentStackFrame() runtime.Frame
- func GetGoRoutineID() string
- func IsAbsolutePath(p string) bool
- func JoinBasePathIfRelativeRegularFilePath(base string, in string) (out string)
- func SanitizeUrl(url string, suffixSlash bool) string
Constants ¶
This section is empty.
Variables ¶
View Source
var PlatformServerFlagConstants = map[string]map[string]string{
"Hostname": {
"FlagName": "hostname",
"ShortFlag": "n",
"Description": "Hostname where Plank accepts connections",
},
"Port": {
"FlagName": "port",
"ShortFlag": "p",
"Description": "Port where Plank is to be served",
},
"RootDir": {
"FlagName": "rootdir",
"ShortFlag": "r",
"Description": "Root directory for the server (default: Current directory)",
},
"Cert": {
"FlagName": "cert",
"Description": "X509 Certificate file for TLS",
},
"CertKey": {
"FlagName": "cert-key",
"Description": "X509 Certificate private Key file for TLS",
},
"Static": {
"FlagName": "static",
"ShortFlag": "s",
"Description": "Path(s) where static files will be served",
},
"SpaPath": {
"FlagName": "spa-path",
"Description": "Path to serve Single Page Application (SPA) from. The URI is derived from the leaf directory. A different URI can be specified by providing it following a colon (e.g. --spa-path ./path/to/spa-app:my-spa",
},
"NoFabricBroker": {
"FlagName": "no-fabric-broker",
"Description": "Disable Fabric (STOMP) broker",
},
"FabricEndpoint": {
"FlagName": "fabric-endpoint",
"Description": "Fabric broker endpoint",
},
"TopicPrefix": {
"FlagName": "topic-prefix",
"Description": "Topic prefix for Fabric broker",
},
"QueuePrefix": {
"FlagName": "query-prefix",
"Description": "Queue prefix for Fabric broker",
},
"RequestPrefix": {
"FlagName": "request-prefix",
"Description": "Application request prefix for Fabric broker",
},
"RequestQueuePrefix": {
"FlagName": "request-queue-prefix",
"Description": "Application request queue prefix for Fabric broker",
},
"ConfigFile": {
"FlagName": "config-file",
"Description": "Path to the server config JSON file",
},
"ShutdownTimeout": {
"FlagName": "shutdown-timeout",
"Description": "Graceful server shutdown timeout in minutes",
},
"OutputLog": {
"FlagName": "output-log",
"ShortFlag": "l",
"Description": "Platform log output. Possible values: stdout, stderr, null, or path to a file",
},
"AccessLog": {
"FlagName": "access-log",
"ShortFlag": "a",
"Description": "HTTP server access log output. Possible values: stdout, stderr, null, or path to a file",
},
"ErrorLog": {
"FlagName": "error-log",
"ShortFlag": "e",
"Description": "HTTP server error log output. Possible values: stdout, stderr, null, or path to a file",
},
"Debug": {
"FlagName": "debug",
"ShortFlag": "d",
"Description": "Enable debug logging",
},
"NoBanner": {
"FlagName": "no-banner",
"ShortFlag": "b",
"Description": "Do not print Plank banner at startup",
},
"RestBridgeTimeout": {
"FlagName": "rest-bridge-timeout",
"Description": "Time in minutes before a REST endpoint for a service request to timeout",
},
}
Functions ¶
func ContainsString ¶
func ConvertInterfaceToByteArray ¶
ConvertInterfaceToByteArray converts the interface i into a byte array. Depending on the value of mimeType being of JSON type, either JSON Marshaller is used or the interface is just straight cast to a byte array.
func DeriveStaticURIFromPath ¶
func GetCallerStackFrame ¶
func GetCurrentStackFrame ¶
func GetGoRoutineID ¶
func GetGoRoutineID() string
func IsAbsolutePath ¶
IsAbsolutePath returns if path is an absolute path in *nix and Windows file systems
func SanitizeUrl ¶
SanitizeUrl removes excess forward slashes as well as pad the end of the URL with / if suffixSlash is true
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.