global

package
v0.0.0-...-c85cc39 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2019 License: Apache-2.0 Imports: 11 Imported by: 8

Documentation

Overview

################################################################################ # Copyright 2019 IBM Corp. All Rights Reserved. # # 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 2019 IBM Corp. All Rights Reserved. # # 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 2019 IBM Corp. All Rights Reserved. # # 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 2019 IBM Corp. All Rights Reserved. # # 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

View Source
const BaseURL = "/cr/v1/"

BaseURL base url api

View Source
const COPYRIGHT string = `` /* 459-byte string literal not displayed */
View Source
const CommandsRunnerConfigFileName = "commands-runner.yml"

Server config file name

View Source
const CommandsRunnerLogFileName = "commands-runner.log"

CommandsRunnerLogFileName the logFile for CR

View Source
const DefaultExtenstionManifestFile = "extension-manifest.yml"

DefaultExtenstionManifestFile

View Source
const DefaultHost = "localhost"

DefaultHost default host server

View Source
const DefaultInsecureSSL = false

DefaultInsecureSSL by defualt the request are secured.

View Source
const DefaultLanguage = "en-US"

DefaultLanguage

View Source
const DefaultOutputFormat = "text"

DefaultOutputFormat default output format

View Source
const DefaultPort = "30101"

DefaultPort default port

View Source
const DefaultPortSSL = "30103"

DefaultPortSSL default port for SSL connection

View Source
const DefaultProtocol = "http"

DefaultProtocol default protocol

View Source
const DefaultTimeout = 180

DefaultTimeout default timeout for http request

View Source
const DefaultUIMetaDataName = "default"

DefaultUIMetaDataName default ui metadata attribute

View Source
const DefaultUrl = DefaultProtocol + "://" + DefaultHost + ":" + DefaultPort

DefaultUrl default api url

View Source
const SSLCertFileName = "cr-cert.crt"

SSLCertFileName certificate file name

View Source
const SSLKeyFileName = "cr-key.pem"

SSLKeyFileName key file name

View Source
const StatesFileName = "states-file.yml"

StatesFileName the states file name to use accross the different packages

View Source
const TokenFileName = "cr-token"

TokenFileName token file name

Variables

View Source
var About string

Default About

View Source
var AboutURL string

About URL

View Source
var ConfigDirectory string

ConfigDirectory directory where the config file can be found

View Source
var ConfigRootKey = "config"

ConfigRootKey default root key for the yaml config file.

View Source
var ConfigYamlFileName = "config.yml"

ConfigYamlFileName default file name for the config file.

View Source
var DefaultExtensionName string

DefaultExtensionName default extension name.

View Source
var Mock = false

Mock default false, when true all scripts are skipped

View Source
var ServerCertificatePath string

Server Certificate path

View Source
var ServerConfigDir string

Server Configuration director

View Source
var ServerKeyPath string

Server Key Path

View Source
var ServerPort string

Server Port

View Source
var ServerPortSSL string

Server Port SSL

Functions

func CopyRecursive

func CopyRecursive(src, destDir string) error

CopyRecursive copy one file (file or dir) to a destDir. If the destDir doesn't exist, it will be created.

func CopyToTemp

func CopyToTemp(tempDir string, fileName string) (string, error)

func ExtractKey

func ExtractKey(inputFilePath string, key string) ([]byte, error)

func ForwardRequest

func ForwardRequest(w http.ResponseWriter, req *http.Request, newURL string)

func GetExecutableDir

func GetExecutableDir() (string, error)

GetDir returns the directory where the executable is.

func GetExtensionNameFromRequest

func GetExtensionNameFromRequest(req *http.Request) (string, url.Values, error)

getExtensionName from request

func GetHomeDir

func GetHomeDir() string

GetHomeDir returns the current user home dir

func RemoveTemp

func RemoveTemp(fileName string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL