Skip to content

Applications Go-API

import "givc/modules/pkgs/applications"

The application package provides functionality to parse and validate application manifests and runtime arguments.

func ParseApplicationManifests(jsonApplicationString string) ([]types.ApplicationManifest, error)

ParseApplicationManifests parses the JSON string of application manifests and validates their formats.

func ValidateAppUnitRequest(serviceName string, appArgs []string, applications []types.ApplicationManifest) error

ValidateAppUnitRequest validates the application unit request by checking the service name format, and verifying the application arguments against the manifest.

func validateApplicationArgs(args []string, allowedArgs []string, directories []string) error

validateApplicationArgs checks if the application arguments are valid according to the specified types, and subsequently triggers individual validation functions for each type.

func validateFilePath(filePathString string, directories []string) error

validateFilePath checks if the file path is valid and exists in the specified directories.

func validateServiceName(serviceName string) error

validateServiceName checks if the service name is valid according to the specified format.

func validateUrl(urlString string) error

validateUrl checks if the URL is valid and has a valid scheme.

Generated by gomarkdoc