Documentation ¶
Index ¶
- func AddCommitFileToGitRepository(repository, branchName string, auth *http.BasicAuth, add []FilesToAdd, ...) (pushed bool)
- func AddValueToRedisSet(redisClient *redis.Client, setKey, value string) (isSetValueunique bool)
- func AskMultiSelectQuestion(questionText string, options []string) []string
- func AskSingleInputQuestion(questionText string, defaultAnswer string) string
- func AskSingleSelectQuestion(questionText string, options []string) string
- func CheckIfRedisSearchIndexExists(client *redisearch.Client) (bool, error)
- func CheckRedisKV(connectionString, redisPassword, key, expectedValue string) (keyValueExists bool)
- func CheckUrlAvailability(webURL string) bool
- func CheckVaultKVExistenceInSecretPath(kvpath, token string) bool
- func CloneGitRepository(repository, branchName, commitId string, auth *http.BasicAuth) (fs billy.Filesystem, cloned bool)
- func ConvertJSONToYAML(jsonString string) string
- func ConvertYAMLToJSON(yamlString string) string
- func CreateGitAuth(gitUser, gitToken string) *http.BasicAuth
- func CreateGithubClient(token string) *github.Client
- func CreateMinioBucket(minioClient *minio.Client, bucket, location string) bool
- func CreateMinioClient() (bool, *minio.Client)
- func CreatePullRequest(client *github.Client, ...) (err error, prId string)
- func CreateRedisClient(connectionString, redisPassword string) (client *redis.Client)
- func CreateRedisConnectionPool(redisHost, redisPassword string) (pool *redigo.Pool)
- func CreateRedisSearchIndex(client *redisearch.Client, schema *redisearch.Schema)
- func CreateRepository(client *github.Client, name, description, repoOwner string, ...) (err error, repoName string)
- func CreateTableHeader(s interface{}) table.Row
- func CreateTableRows(s interface{}) table.Row
- func DecryptSopsFile(encryptedSopsFilePath, fileExtension string) (err error, decryptedSopsFile string)
- func DeleteBranch(client *github.Client, repository, repoOwner, branchName string)
- func DeleteRedisSet(redisClient *redis.Client, setKey string) (isSetDeleted bool)
- func DownloadFileWithProgressBar(downloadUrl, targetDir string)
- func DownloadObjectFromMinioBucket(minioClient *minio.Client, bucket, objectname, destinationName string) bool
- func DropRedisSearchIndex(client *redisearch.Client)
- func EncryptStore(ageKey, rawData string) (encryptedData string)
- func EnqueueDataInRedisStreams(connectionString, redisPassword, stream string, values map[string]interface{}) (enqueue bool)
- func ExecuteRediSearchQuery(client *redisearch.Client, query *redisearch.Query) (docs []redisearch.Document, total int, err error)
- func ExtractTarGzArchive(archiveFilePath, extractionFilePath string, extractFileMode int)
- func GenerateAgeIdentitdy() (identity *age.X25519Identity)
- func GetAllValuesFromRedis(redisClient *redis.Client, ctx context.Context, key string) []string
- func GetCommitInformationFromGithubRepo(userName, repoName, branchName, option string) (getCommits bool, allCommits []map[string]interface{}, err error)
- func GetFileContent(fileArg string) (targetName string, b []byte, err error)
- func GetFileContentFromGithubRepo(client *github.Client, userName, repoName, branchName, filePath string) (content string, err error)
- func GetFileListFromGitRepository(directory string, fs billy.Filesystem) (fileList, directoryList []string)
- func GetGitTree(client *github.Client, ref *github.Reference, sourceFiles []string, ...) (tree *github.Tree, err error)
- func GetObjectsFromMinioBucket(minioClient *minio.Client, bucket string) []string
- func GetRandomValueFromRedis(redisClient *redis.Client, ctx context.Context, key string) string
- func GetRedisJSON(redisJSONHandler *rejson.Handler, jsonKey string) (jsonObject []byte, jsonExists bool)
- func GetReferenceObject(client *github.Client, ...) (ref *github.Reference, err error)
- func GetSecretValueFromVaultSecretEngine(vaultConnectionInformation map[string]string) (string, string, string, string)
- func GetUnderlyingAsValue(data interface{}) reflect.Value
- func GetValueFromRedisByKey(redisClient *redis.Client, key string) (value string)
- func GetValuesFromRedisSet(redisClient *redis.Client, setKey string) (values []string)
- func GetVaultConnectionInformation() map[string]string
- func GetVaultKvSecretEngines(vaultAddr, vaultToken, vaultNamespace string) []string
- func GetVaultKvSecretPaths(vaultAddr, vaultToken, vaultNamespace, kvpath string) []string
- func GetVaultSecretValue(kvpath, token string) string
- func GetYAMLMapValues(content []byte, dictName string) (transformedValues map[string]interface{})
- func GetYamlStringKey(key, pathToConfig, extension string) string
- func IndexDocument(client *redisearch.Client, document redisearch.Document)
- func MergePullRequest(client *github.Client, repository, repoOwner, message, mergeMethod string, ...)
- func PushCommit(client *github.Client, ref *github.Reference, tree *github.Tree, ...) (err error)
- func ReadFileContentFromGitRepo(repo billy.Filesystem, filePath string) string
- func ReadFileToVar(file string) (content []byte, err error)
- func ReadInlineYamlToObject(inlineYAML []byte, yamlObject interface{}) interface{}
- func ReadVaultSecretEngines(vaultAddr, vaultToken, vaultNamespace, kvpath string) []string
- func ReadYamlKeyValuesFromFile(yamlFileContent []byte) (yamlStructure map[string]interface{})
- func ReadYamlToObject(pathToYAML, fileExtension string, yamlObject interface{}) interface{}
- func RemoveValueFromRedis(redisClient *redis.Client, ctx context.Context, key string, member string) bool
- func RenderTemplateSurvey(templateContent string, globalValues map[string]interface{}) (string, map[string]interface{})
- func SendWebhookToTeams(webhook MsTeamsWebhook) bool
- func SetRedisJSON(redisJSONHandler *rejson.Handler, jsonObject interface{}, jsonKey string)
- func StoreSecretInSecretEngine(vaultAddr, vaultToken, vaultNamespace, secretEngine, secretName string, ...)
- func UnZipArchive(source, destination string) error
- func UploadObjectToMinioBucket(minioClient *minio.Client, bucket, sourcePath, objectName string) (bool, int64)
- func VerifyEnvVars(envVars []string) bool
- func VerifyReadKeyValues(templateValues []string, log *sthingsBase.Logger, enableVault bool) map[string]interface{}
- func VerifyVaultAuthType(vaultAuthType string, log *sthingsBase.Logger, vaultAuthFound bool)
- func VerifyVaultEnvVars() (string, bool)
- type Client
- type FilesToAdd
- type MsTeamsWebhook
- type RenderSurvey
- type Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCommitFileToGitRepository ¶ added in v0.1.38
func AddValueToRedisSet ¶ added in v0.1.7
func AskMultiSelectQuestion ¶
func AskSingleInputQuestion ¶
func AskSingleSelectQuestion ¶
func CheckIfRedisSearchIndexExists ¶ added in v0.1.117
func CheckIfRedisSearchIndexExists(client *redisearch.Client) (bool, error)
CHECK IF REDISEARCH-INDEX EXISTS
func CheckRedisKV ¶ added in v0.1.12
func CheckUrlAvailability ¶ added in v0.1.41
func CloneGitRepository ¶ added in v0.1.17
func ConvertJSONToYAML ¶ added in v0.1.32
func ConvertYAMLToJSON ¶ added in v0.1.32
func CreateGitAuth ¶ added in v0.1.18
func CreateGithubClient ¶ added in v0.1.124
func CreateMinioBucket ¶ added in v0.1.84
func CreateMinioClient ¶ added in v0.1.83
func CreateMinioClient() (bool, *minio.Client)
func CreatePullRequest ¶ added in v0.1.100
func CreatePullRequest(client *github.Client, prSubject, prRepoOwner, sourceOwner, commitBranch, prRepo, sourceRepo, repoBranch, baseBranch, prDescription string, prLabels []string) (err error, prId string)
CreatePullRequest CREATES A PULL REQUEST. BASED ON: HTTPS://GODOC.ORG/GITHUB.COM/GOOGLE/GO-GITHUB/GITHUB#EXAMPLE-PULLREQUESTSSERVICE-CREATE
func CreateRedisClient ¶ added in v0.1.8
func CreateRedisClient(connectionString, redisPassword string) (client *redis.Client)
func CreateRedisConnectionPool ¶ added in v0.1.117
CREATE A REDIS CONNECTION POOL
func CreateRedisSearchIndex ¶ added in v0.1.117
func CreateRedisSearchIndex(client *redisearch.Client, schema *redisearch.Schema)
CREATE REDISEARCH INDEX
func CreateRepository ¶ added in v0.1.104
func CreateRepository(client *github.Client, name, description, repoOwner string, privateRepo, autoInit bool) (err error, repoName string)
CreateRepository CREATES A GITHUB REPOSITORY
func CreateTableHeader ¶ added in v0.1.5
func CreateTableRows ¶ added in v0.1.6
func DecryptSopsFile ¶ added in v0.1.111
func DeleteBranch ¶ added in v0.1.106
DeleteBranch DELETES A BRANCH
func DeleteRedisSet ¶ added in v0.1.80
func DownloadFileWithProgressBar ¶ added in v0.1.24
func DownloadFileWithProgressBar(downloadUrl, targetDir string)
func DownloadObjectFromMinioBucket ¶ added in v0.1.83
func DropRedisSearchIndex ¶ added in v0.1.117
func DropRedisSearchIndex(client *redisearch.Client)
DROP REDISEARCH INDEX
func EncryptStore ¶ added in v0.1.89
func EnqueueDataInRedisStreams ¶ added in v0.1.13
func ExecuteRediSearchQuery ¶ added in v0.1.120
func ExecuteRediSearchQuery(client *redisearch.Client, query *redisearch.Query) (docs []redisearch.Document, total int, err error)
EXECUTE REDISEARCH QUERY
func ExtractTarGzArchive ¶ added in v0.1.31
func GenerateAgeIdentitdy ¶ added in v0.1.89
func GenerateAgeIdentitdy() (identity *age.X25519Identity)
func GetAllValuesFromRedis ¶ added in v0.1.7
func GetCommitInformationFromGithubRepo ¶ added in v0.1.86
func GetFileContent ¶ added in v0.1.93
func GetFileContentFromGithubRepo ¶ added in v0.1.116
func GetFileListFromGitRepository ¶ added in v0.1.17
func GetFileListFromGitRepository(directory string, fs billy.Filesystem) (fileList, directoryList []string)
func GetGitTree ¶ added in v0.1.93
func GetGitTree(client *github.Client, ref *github.Reference, sourceFiles []string, sourceOwner, sourceRepo string) (tree *github.Tree, err error)
GetGitTree GENERATES THE TREE TO COMMIT BASED ON THE GIVEN FILES AND THE COMMIT OF THE REF YOU GOT IN GETREF.
func GetObjectsFromMinioBucket ¶ added in v0.1.83
func GetRandomValueFromRedis ¶ added in v0.1.7
func GetRedisJSON ¶ added in v0.1.33
func GetReferenceObject ¶ added in v0.1.94
func GetReferenceObject(client *github.Client, sourceOwner, sourceRepo, commitBranch, baseBranch string) (ref *github.Reference, err error)
GetReferenceObject RETURNS THE COMMIT BRANCH REFERENCE OBJECT IF IT EXISTS OR CREATES IT FROM THE BASE BRANCH BEFORE RETURNING IT.
func GetUnderlyingAsValue ¶ added in v0.1.6
func GetValueFromRedisByKey ¶ added in v0.1.83
func GetValuesFromRedisSet ¶ added in v0.1.11
func GetVaultKvSecretEngines ¶
func GetVaultKvSecretPaths ¶
func GetVaultSecretValue ¶
func GetYAMLMapValues ¶ added in v0.1.108
func GetYamlStringKey ¶ added in v0.1.47
func IndexDocument ¶ added in v0.1.119
func IndexDocument(client *redisearch.Client, document redisearch.Document)
INDEX DOCUMENT
func MergePullRequest ¶ added in v0.1.105
func MergePullRequest(client *github.Client, repository, repoOwner, message, mergeMethod string, pullRequestID int)
CreateRepository CREATES A GITHUB REPOSITORY
func PushCommit ¶ added in v0.1.99
func PushCommit(client *github.Client, ref *github.Reference, tree *github.Tree, sourceOwner, sourceRepo, authorName, authorEmail, commitMessage string) (err error)
PushCommit CREATES THE COMMIT IN THE GIVEN REFERENCE USING THE GIVEN TREE
func ReadFileContentFromGitRepo ¶ added in v0.1.21
func ReadFileContentFromGitRepo(repo billy.Filesystem, filePath string) string
func ReadFileToVar ¶ added in v0.1.93
func ReadInlineYamlToObject ¶ added in v0.1.22
func ReadInlineYamlToObject(inlineYAML []byte, yamlObject interface{}) interface{}
func ReadVaultSecretEngines ¶
func ReadYamlKeyValuesFromFile ¶ added in v0.1.37
func ReadYamlToObject ¶ added in v0.1.20
func ReadYamlToObject(pathToYAML, fileExtension string, yamlObject interface{}) interface{}
func RemoveValueFromRedis ¶ added in v0.1.7
func RenderTemplateSurvey ¶ added in v0.1.46
func SendWebhookToTeams ¶ added in v0.1.10
func SendWebhookToTeams(webhook MsTeamsWebhook) bool
func SetRedisJSON ¶ added in v0.1.36
func SetRedisJSON(redisJSONHandler *rejson.Handler, jsonObject interface{}, jsonKey string)
func UnZipArchive ¶ added in v0.1.30
func UploadObjectToMinioBucket ¶ added in v0.1.83
func VerifyEnvVars ¶
func VerifyReadKeyValues ¶ added in v0.1.122
func VerifyReadKeyValues(templateValues []string, log *sthingsBase.Logger, enableVault bool) map[string]interface{}
func VerifyVaultAuthType ¶ added in v0.1.122
func VerifyVaultAuthType(vaultAuthType string, log *sthingsBase.Logger, vaultAuthFound bool)