Documentation ¶
Index ¶
- Constants
- func GetAllLinesButLast(s string) []string
- func GetLastLine(s string) string
- func HandleCmd(repositoryURL, repositoryBranch, cmd string) string
- func HandlePrivateSSHKey(rawString string) string
- func RemoveDuplicates(s []string) []string
- func RequestResponse(success bool, errMsg string) map[string]interface{}
- func SanitizeSafetyJSON(s string) string
Constants ¶
const ( // CertFile contains the address for the API's TLS certificate. CertFile = "api/api-tls-cert.pem" // KeyFile contains the address for the API's TLS certificate key file. KeyFile = "api/api-tls-key.pem" )
Variables ¶
This section is empty.
Functions ¶
func GetAllLinesButLast ¶
GetAllLinesButLast receives a string with multiple lines and returns all but the last line.
func GetLastLine ¶
GetLastLine receives a string with multiple lines and returns it's last
func HandleCmd ¶
HandleCmd will extract %GIT_REPO% and %GIT_BRANCH% from cmd and replace it with the proper repository URL.
func HandlePrivateSSHKey ¶
HandlePrivateSSHKey will extract %GIT_PRIVATE_SSH_KEY% from cmd and replace it with the proper private SSH key.
func RemoveDuplicates ¶
RemoveDuplicates remove duplicated itens from a slice.
func RequestResponse ¶
RequestResponse returns a map string interface to be used in echo JSON requests response.
func SanitizeSafetyJSON ¶
SanitizeSafetyJSON returns a sanitized string from Safety container logs. Safety might return a JSON with the "\" and "\"" characters, which needs to be sanitized to be unmarshalled correctly.
Types ¶
This section is empty.