connection

package
v0.0.0-...-58c3220 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

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                   = "empty uri"
	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"
	ErrorConnectionIsVital = "%s connection is vital, it cannot be deleted"
)

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

type PublicKeyEvaluator func(string) (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL