Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertCommandToRequest(cmd string) string
- func GetPropertyData(userName string, propertyName string, usersList *en.EntityManager) (interface{}, error)
- func GetResponse(response *http.Response, err error) (int, string, error)
- func HTTPDataMethod(method string, url string, data string) (int, string, error)
- func RemoveSpaces(inStr string) string
- func TestSetCookie(cookieStr string)
- type ComamndsToPath
- type CommandToPath
- type Error
- type FileData
- type Match
- type Secret
- type SecureFile
- type StringMessage
- type URL
- type UpdateSecret
Constants ¶
const ( // HTTPGetStr : HTTP GET token HTTPGetStr = "GET" // HTTPPostStr : HTTP POST token HTTPPostStr = "POST" // HTTPPutStr : HTTP PUT token HTTPPutStr = "PUT" // HTTPDeleteStr : HTTP DELETE token HTTPDeleteStr = "DELETE" // HTTPPatchStr : HTTP PATCH token HTTPPatchStr = "PATCH" // GetMessageStr : string to get parameters from the HTP request GetMessageStr = "get-data" // SetCookieStr : token use to set the cookie SetCookieStr = "Set-Cookie" // AccessToken : token use to set the AccessToken AccessToken = "AccessToken" // NoMessageStr : define the empty message NoMessageStr = "" // VersionPath : define the version path VersionPath = "/version" )
Variables ¶
var ( // ServicePathPrefix : prefix to be use by the RESTFul API ServicePathPrefix = "/forewind/app" // Version : the current RESTFul version Version = "/v1" // EmptyStr : the defined EmptyStr EmptyStr = StringMessage{""} )
Functions ¶
func ConvertCommandToRequest ¶
ConvertCommandToRequest : Remove all the {} from the command string so it could be used for request
func GetPropertyData ¶
func GetPropertyData(userName string, propertyName string, usersList *en.EntityManager) (interface{}, error)
GetPropertyData : extract the property data from the relevant module
func GetResponse ¶
GetResponse : parse the http response
func HTTPDataMethod ¶
HTTPDataMethod : extract the http data method and atach the cookie
func RemoveSpaces ¶
RemoveSpaces : clean the given string from all white spaces, \r and \n
func TestSetCookie ¶
func TestSetCookie(cookieStr string)
TestSetCookie : set the cookie string to the given parameter
Types ¶
type ComamndsToPath ¶
ComamndsToPath : Convert between command index and the relevant path
type CommandToPath ¶
CommandToPath : hash map to convert between command and the relevant path
type SecureFile ¶
SecureFile : SecureFile struct definition: file path and the associated secret
type StringMessage ¶
type StringMessage struct {
Str string
}
StringMessage : StringMessage struct definition
type UpdateSecret ¶
UpdateSecret : UpdateSecret struct definition