Applications Go-API
applications
Section titled “applications”import "givc/modules/pkgs/applications"The application package provides functionality to parse and validate application manifests and runtime arguments.
- Variables
- func ValidateAppUnitRequest(serviceName string, appArgs []string, applications []types.ApplicationManifest) error
- func ValidateApplicationManifests(applications []types.ApplicationManifest) error
- func validateApplicationArgs(args []string, allowedArgs []string, directories []string) error
- func validateFilePath(filePathString string, directories []string) error
- func validateServiceName(serviceName string) error
- func validateUrl(urlString string) error
Variables
Section titled “Variables”var ( UrlExtraSchemes = []string{ "element", "io.element.desktop", })func ValidateAppUnitRequest
Section titled “func ValidateAppUnitRequest”func ValidateAppUnitRequest(serviceName string, appArgs []string, applications []types.ApplicationManifest) errorValidateAppUnitRequest validates the application unit request by checking the service name format, and verifying the application arguments against the manifest.
func ValidateApplicationManifests
Section titled “func ValidateApplicationManifests”func ValidateApplicationManifests(applications []types.ApplicationManifest) errorValidateApplicationManifests validates the application manifests.
func validateApplicationArgs
Section titled “func validateApplicationArgs”func validateApplicationArgs(args []string, allowedArgs []string, directories []string) errorvalidateApplicationArgs checks if the application arguments are valid according to the specified types, and subsequently triggers individual validation functions for each type.
func validateFilePath
Section titled “func validateFilePath”func validateFilePath(filePathString string, directories []string) errorvalidateFilePath checks if the file path is valid and exists in the specified directories.
func validateServiceName
Section titled “func validateServiceName”func validateServiceName(serviceName string) errorvalidateServiceName checks if the service name is valid according to the specified format.
func validateUrl
Section titled “func validateUrl”func validateUrl(urlString string) errorvalidateUrl checks if the URL is valid and has a valid scheme.
Generated by gomarkdoc