Documentation ¶
Index ¶
Constants ¶
View Source
const ( GetConnectionURL = "/connection/:id" GetDecryptedConnectionURL = "/connection/:id/decrypted" GetAllConnectionURL = "/connection" CreateConnectionURL = "/connection" UpdateConnectionURL = "/connection" DeleteConnectionURL = "/connection/:id" IDConnURLParam = "id" ConnDecryptTokenQueryParam = "token" MissedTokenErrorMessage = "missed the token URL param" )
View Source
const ( ErrorMessageTemplate = "%s: %s" EmptyURIErrorMessage = "the uri parameter is empty" ValidationConnErrorMessage = "Validation of connection is failed" UnknownTypeErrorMessage = "unknown type: %s. Supported types: %s" DockerTypePasswordErrorMessage = "docker type requires the password parameter" //nolint DockerTypeUsernameErrorMessage = "docker type requires the username parameter" GitTypePublicKeyErrorMessage = "git type requires that publicKey parameter must be encoded" + " in base64 format, error message: %s" GitTypePublicKeyExtractionErrorMessage = "can not extract the public SSH host key from URI: %s" GitTypeKeySecretErrorMessage = "git type requires that keySecret parameter must be encoded" + " in base64 format, error message: %s" GcsTypeRegionErrorMessage = "gcs type requires that region must be non-empty" GcsTypeKeySecretEmptyErrorMessage = "gcs type requires that keySecret parameter" + " must be non-empty" GcsTypeRoleNotSupportedErrorMessage = "gcs type does not support role parameter yet" + " must be non-empty" AzureBlobTypeKeySecretEmptyErrorMessage = "azureblob type requires that keySecret parameter contains" + "HTTP endpoint with SAS Token" S3TypeRegionErrorMessage = "s3 type requires that region must be non-empty" S3TypeKeySecretEmptyErrorMessage = "s3 type requires that keyID and keySecret parameters" + " must be non-empty" S3TypeRoleNotSupportedErrorMessage = "s3 type does not support role parameter yet" ECRTypeKeySecretEmptyErrorMessage = "ecr type requires that keyID and keySecret parameters" + " must be non-empty" ECRTypeNotValidURI = "not valid uri for ecr type: %s" )
Variables ¶
This section is empty.
Functions ¶
func ConfigureRoutes ¶
func ConfigureRoutes( routeGroup *gin.RouterGroup, connRepository conn_repository.Repository, keyEvaluator PublicKeyEvaluator, )
Types ¶
type ConnValidator ¶
type ConnValidator struct {
// contains filtered or unexported fields
}
func NewConnValidator ¶
func NewConnValidator(keyEvaluator PublicKeyEvaluator) *ConnValidator
Currently validator does not need any arguments
func (*ConnValidator) ValidatesAndSetDefaults ¶
func (cv *ConnValidator) ValidatesAndSetDefaults(conn *connection.Connection) (err error)
type PublicKeyEvaluator ¶
Click to show internal directories.
Click to hide internal directories.