util

package
v0.0.0-...-ded4385 Latest Latest
Warning

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

Go to latest
Published: May 18, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultDependenciesDirectoryName = "dependencies"

DefaultDependenciesDirectoryName --

View Source
const DefaultPropertiesDirectoryName = "properties"

DefaultPropertiesDirectoryName --

View Source
const DefaultRoutesDirectoryName = "routes"

DefaultRoutesDirectoryName --

View Source
const DefaultWorkingDirectoryName = "workspace"

DefaultWorkingDirectoryName --

Variables

View Source
var CLIEnvVars []string = []string{}

CLIEnvVars -- List of CLI provided environment variables. They take precedence over any environment variables with the same name.

View Source
var ContainerDependenciesDirectory = "/deployments/dependencies"

ContainerDependenciesDirectory --

View Source
var ContainerPropertiesDirectory = "/etc/camel/conf.d"

ContainerPropertiesDirectory --

View Source
var ContainerResourcesDirectory = "/etc/camel/resources"

ContainerResourcesDirectory --

View Source
var ContainerRoutesDirectory = "/etc/camel/sources"

ContainerRoutesDirectory --

View Source
var ListOfLazyEvaluatedEnvVars []string = []string{}

ListOfLazyEvaluatedEnvVars -- List of unevaluated environment variables. These are sensitive values or values that may have different values depending where the integration is run (locally vs. the cloud). These environment variables are evaluated at the time of the integration invocation.

View Source
var MavenWorkingDirectory string = ""

MavenWorkingDirectory -- Directory used by Maven for an invocation of the kamel local command. By default a temporary folder will be used.

View Source
var QuarkusDependenciesBaseDirectory = "/quarkus-app"

QuarkusDependenciesBaseDirectory --

Functions

func BoolP

func BoolP(b bool) *bool

BoolP returns a pointer to a bool value

func CopyFile

func CopyFile(src, dst string) (int64, error)

CopyFile --

func CopyIntegrationFilesToDirectory

func CopyIntegrationFilesToDirectory(files []string, directory string) ([]string, error)

CopyIntegrationFilesToDirectory --

func CreateDirectory

func CreateDirectory(directory string) error

CreateDirectory --

func CreateLocalDependenciesDirectory

func CreateLocalDependenciesDirectory() error

CreateLocalDependenciesDirectory --

func CreateLocalPropertiesDirectory

func CreateLocalPropertiesDirectory() error

CreateLocalPropertiesDirectory --

func CreateLocalRoutesDirectory

func CreateLocalRoutesDirectory() error

CreateLocalRoutesDirectory --

func DependenciesToJSON

func DependenciesToJSON(list []string) ([]byte, error)

DependenciesToJSON --

func DependenciesToYAML

func DependenciesToYAML(list []string) ([]byte, error)

DependenciesToYAML --

func DirectoryExists

func DirectoryExists(directory string) (bool, error)

DirectoryExists --

func EncodeXML

func EncodeXML(content interface{}) ([]byte, error)

EncodeXML --

func EvaluateCLIAndLazyEnvVars

func EvaluateCLIAndLazyEnvVars() ([]string, error)

EvaluateCLIAndLazyEnvVars -- Function that creates a list of environment variables with entries VAR=value that can be passed when running the integration.

func FileExists

func FileExists(name string) (bool, error)

FileExists --

func FindAllDistinctStringSubmatch

func FindAllDistinctStringSubmatch(data string, regexps ...*regexp.Regexp) []string

FindAllDistinctStringSubmatch --

func FindNamedMatches

func FindNamedMatches(expr string, str string) map[string]string

FindNamedMatches ---

func GetEnvironmentVariable

func GetEnvironmentVariable(variable string) (string, error)

GetEnvironmentVariable --

func GetLocalDependenciesDir

func GetLocalDependenciesDir() string

GetLocalDependenciesDir --<mavenWorkingDirectory>/dependencies

func GetLocalPropertiesDir

func GetLocalPropertiesDir() string

GetLocalPropertiesDir -- <mavenWorkingDirectory>/properties

func GetLocalRoutesDir

func GetLocalRoutesDir() string

GetLocalRoutesDir -- <mavenWorkingDirectory>/routes

func IsFalse

func IsFalse(b *bool) bool

IsFalse checks if the bool pointer is defined and false

func IsNilOrFalse

func IsNilOrFalse(b *bool) bool

IsNilOrFalse checks if the bool pointer is nil or false. You can use it if the bool pointer is meant to be false by default.

func IsNilOrTrue

func IsNilOrTrue(b *bool) bool

IsNilOrTrue checks if the bool pointer is nil or true. You can use it if the bool pointer is meant to be true by default.

func IsTrue

func IsTrue(b *bool) bool

IsTrue checks if the bool pointer is defined and true

func JSONToYAML

func JSONToYAML(src []byte) ([]byte, error)

JSONToYAML --

func SortedMapKeys

func SortedMapKeys(m map[string]interface{}) []string

SortedMapKeys --

func SortedStringMapKeys

func SortedStringMapKeys(m map[string]string) []string

SortedStringMapKeys --

func StringSliceContains

func StringSliceContains(slice []string, items []string) bool

StringSliceContains --

func StringSliceContainsAnyOf

func StringSliceContainsAnyOf(slice []string, items ...string) bool

StringSliceContainsAnyOf --

func StringSliceExists

func StringSliceExists(slice []string, item string) bool

StringSliceExists --

func StringSliceJoin

func StringSliceJoin(slices ...[]string) []string

StringSliceJoin --

func StringSliceUniqueAdd

func StringSliceUniqueAdd(slice *[]string, item string) bool

StringSliceUniqueAdd append the given item if not already present in the slice

func StringSliceUniqueConcat

func StringSliceUniqueConcat(slice *[]string, items []string) bool

StringSliceUniqueConcat append all the items of the "items" slice if they are not already present in the slice

func SubstringFrom

func SubstringFrom(s string, substr string) string

SubstringFrom --

func WriteFileWithBytesMarshallerContent

func WriteFileWithBytesMarshallerContent(buildDir string, relativePath string, content BytesMarshaller) error

WriteFileWithBytesMarshallerContent --

func WriteFileWithContent

func WriteFileWithContent(buildDir string, relativePath string, content []byte) error

WriteFileWithContent --

func WriteToFile

func WriteToFile(filePath string, fileContents string) error

WriteToFile --

Types

type BytesMarshaller

type BytesMarshaller interface {
	MarshalBytes() ([]byte, error)
}

BytesMarshaller --

Directories

Path Synopsis
Package bindings provides APIs to transform Kubernetes objects into Camel URIs equivalents
Package bindings provides APIs to transform Kubernetes objects into Camel URIs equivalents
log
Package minishift contains utilities for Minishift deployments
Package minishift contains utilities for Minishift deployments
Package sync provides useful tools to get notified when a file system resource changes
Package sync provides useful tools to get notified when a file system resource changes

Jump to

Keyboard shortcuts

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