connection

package
v0.0.0-...-db3a1d9 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2019 License: Apache-2.0 Imports: 13 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"
	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

type PublicKeyEvaluator func(string) (string, error)

Jump to

Keyboard shortcuts

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