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" )
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" PasswordDecodeErrorMessage = "password must be base64-encoded, error: %s" KeyIDDecodeErrorMessage = "key id must be base64-encoded, error: %s" KeySecretDecodeErrorMessage = "key secret must be base64-encoded, error: %s" PublicKeyDecodeErrorMessage = "public key must be base64-encoded, error: %s" DockerTypePasswordErrorMessage = "docker type requires the password parameter" //nolint DockerTypeUsernameErrorMessage = "docker type requires the username parameter" GitTypePublicKeyExtractionErrorMessage = "can not extract the public SSH host key from URI: %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, connService conn_service.Service, keyEvaluator PublicKeyEvaluator, connectionConfig config.ConnectionConfig, )
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.