Documentation
¶
Index ¶
- Constants
- Variables
- func AppFilesHaveChanged(refreshPaths []string, changedFiles []string) bool
- func CheckOutOfBoundsSymlinks(basePath string, skipPaths ...string) error
- func GetSourceRefreshPaths(app *v1alpha1.Application, source v1alpha1.ApplicationSource) []string
- func Path(root, path string) (string, error)
- type OutOfBoundsSymlinkError
Constants ¶
View Source
const ErrMessageAppPathDoesNotExist = "app path does not exist"
Variables ¶
View Source
var ErrAppPathDoesNotExist = errors.New(ErrMessageAppPathDoesNotExist)
ErrAppPathDoesNotExist is returned when the requested app path does not exist in the repository. It is a user input error rather than a server fault.
Functions ¶
func AppFilesHaveChanged ¶ added in v1.8.8
AppFilesHaveChanged returns true if any of the changed files are under the given refresh paths If refreshPaths or changedFiles are empty, it will always return true
func CheckOutOfBoundsSymlinks ¶ added in v1.8.8
CheckOutOfBoundsSymlinks determines if basePath contains any symlinks that are absolute or point to a path outside of the basePath. If found, an OutOfBoundsSymlinkError is returned.
func GetSourceRefreshPaths ¶ added in v1.8.8
func GetSourceRefreshPaths(app *v1alpha1.Application, source v1alpha1.ApplicationSource) []string
GetSourceRefreshPaths returns the list of paths that should trigger a refresh for an application. The source parameter influences the returned refresh paths:
- if source hydrator configured AND source is syncSource: use sync source path (ignores annotation)
- if source hydrator configured AND source is drySource WITH annotation: use annotation paths with drySource base
- if source hydrator not configured: use annotation paths with source base, or empty if no annotation
Types ¶
type OutOfBoundsSymlinkError ¶ added in v1.8.8
func (*OutOfBoundsSymlinkError) Error ¶ added in v1.8.8
func (e *OutOfBoundsSymlinkError) Error() string
Click to show internal directories.
Click to hide internal directories.