config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DSNAuthType name of DSN auth.
	DSNAuthType string = "DSN"
	// BasicAuthType name of Basic auth.
	BasicAuthType string = "Basic"
	// JWTAuthType name of JWT auth.
	JWTAuthType string = "JWT"
	// X509AuthType name of X509 auth.
	X509AuthType string = "X509"
)

Variables

View Source
var ErrInvalidAuthMechanism = errors.New("invalid auth mechanism")

ErrInvalidAuthMechanism occurs when there's invalid mechanism config value.

Functions

This section is empty.

Types

type AuthConfig

type AuthConfig struct {
	// Mechanism type of auth. Valid types: DSN, Basic, JWT, X509.
	Mechanism string `json:"mechanism" default:"DSN" validate:"inclusion=DSN|Basic|JWT|X509"`
	// Host link to db.
	Host string `json:"host"`
	// DSN connection to SAP HANA database.
	DSN string `json:"dsn"`
	// Username parameter for basic auth.
	Username string `json:"username"`
	// Password parameter for basic auth.
	Password string `json:"password"`
	// Token parameter for JWT auth.
	Token string `json:"token"`
	// ClientCertFilePath path to file, parameter for X509 auth.
	ClientCertFilePath string `json:"clientCertFilePath"`
	// ClientKeyFilePath path to file, parameter for X509 auth.
	ClientKeyFilePath string `json:"clientKeyFilePath"`
}

AuthConfig auth parameters.

func (*AuthConfig) Validate

func (a *AuthConfig) Validate() error

Validate auth config parameters.

type Config

type Config struct {
	// Table is a name of the table that the connector should write to or read from.
	Table string `json:"table" validate:"required"`

	Auth AuthConfig
}

Config contains configurable values shared between source and destination SAP HANA connector.

Jump to

Keyboard shortcuts

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