Documentation
¶
Index ¶
- Constants
- func ValidateComponentName(val interface{}) error
- func ValidateGitHubURL(urlStr string) error
- func ValidateName(resourceType string, val interface{}) error
- func ValidateOrganizationName(val interface{}) error
- func ValidateParams(cmdType CommandType, resource ResourceType, params interface{}) error
- func ValidateProjectName(val interface{}) error
- func ValidateURL(val interface{}) error
- type CommandType
- type ResourceType
Constants ¶
View Source
const (
// ResourceNamePattern is the regex pattern that resource names must follow
ResourceNamePattern = "^[a-z0-9][a-z0-9-]*[a-z0-9]$"
)
Variables ¶
This section is empty.
Functions ¶
func ValidateComponentName ¶
func ValidateComponentName(val interface{}) error
ValidateComponentName validates a component name
func ValidateGitHubURL ¶
ValidateGitHubURL validates that a URL is a proper GitHub repository URL
func ValidateName ¶
ValidateName validates that a resource name follows the required pattern
func ValidateOrganizationName ¶
func ValidateOrganizationName(val interface{}) error
ValidateOrganizationName validates an organization name
func ValidateParams ¶
func ValidateParams(cmdType CommandType, resource ResourceType, params interface{}) error
ValidateParams validates command parameters based on command and resource types
func ValidateProjectName ¶
func ValidateProjectName(val interface{}) error
ValidateProjectName validates a project name
Types ¶
type CommandType ¶
type CommandType string
CommandType represents the type of CLI command
const ( CmdCreate CommandType = "create" CmdGet CommandType = "get" CmdLogs CommandType = "logs" CmdApply CommandType = "apply" CmdDelete CommandType = "delete" )
type ResourceType ¶
type ResourceType string
ResourceType represents the resource being managed
const ( ResourceProject ResourceType = "project" ResourceComponent ResourceType = "component" ResourceBuild ResourceType = "build" ResourceDeployment ResourceType = "deployment" ResourceDeploymentTrack ResourceType = "deploymenttrack" ResourceEnvironment ResourceType = "environment" ResourceDeployableArtifact ResourceType = "deployableartifact" ResourceEndpoint ResourceType = "endpoint" ResourceOrganization ResourceType = "organization" ResourceDataPlane ResourceType = "dataplane" ResourceLogs ResourceType = "logs" ResourceApply ResourceType = "apply" ResourceDelete ResourceType = "delete" ResourceDeploymentPipeline ResourceType = "deploymentpipeline" ResourceConfigurationGroup ResourceType = "configurationgroup" ResourceWorkload ResourceType = "workload" )
Click to show internal directories.
Click to hide internal directories.