Documentation
¶
Index ¶
- Variables
- func GetAwsSdkConfig(conf AWSSDKConfig) (*aws.Config, error)
- func LoadConfig[E any](defaults *E) (*E, error)
- type AMQPConnection
- type AMQPConnectionBasicAuth
- type AMQPProtocol
- type AWSAuthenticationMethod
- type AWSCryptoEngine
- type AWSSDKConfig
- type AlertsConfig
- type AuthJWTOptions
- type AuthMTLSOptions
- type BaseConfigLogging
- type BasicConnection
- type CAClient
- type CAConfig
- type CouchDBPSEConfig
- type CryptoEngines
- type CryptoMonitoring
- type DMSconfig
- type DeviceManagerConfig
- type EventBusEngine
- type EventBusProvider
- type GolangEngineConfig
- type HTTPClient
- type HTTPClientAuthMethod
- type HTTPConnection
- type HTTPProtocol
- type HashicorpVaultCryptoEngineConfig
- type HashicorpVaultSDK
- type HttpServer
- type HttpServerAuthentication
- type HttpServerMutualTLSAuthentication
- type IotAWS
- type LamassuMonolithicAssembleMode
- type LogLevel
- type MonolithicAWSIoTManagerConfig
- type MonolithicConfig
- type MutualTLSMode
- type PKCS11Config
- type PKCS11EngineConfig
- type PKCS11ModuleExtraOptions
- type Password
- type PluggableStorageEngine
- type PostgresPSEConfig
- type SMTPServer
- type SQLitePSEConfig
- type StorageProvider
- type TLSConfig
- type VAconfig
Constants ¶
This section is empty.
Variables ¶
View Source
var IotAWSDefaults = IotAWS{
AWSBidirectionalQueueName: "Lamassu-IoT-SYNC-EventBridgeOutput6A8BBEEC-LaYbNuW753SC",
}
Functions ¶
func GetAwsSdkConfig ¶
func GetAwsSdkConfig(conf AWSSDKConfig) (*aws.Config, error)
func LoadConfig ¶
Types ¶
type AMQPConnection ¶
type AMQPConnection struct {
BasicConnection `mapstructure:",squash"`
Exchange string `mapstructure:"exchange"`
Protocol AMQPProtocol `mapstructure:"protocol"`
BasicAuth AMQPConnectionBasicAuth `mapstructure:"basic_auth"`
ClientTLSAuth struct {
Enabled bool `mapstructure:"enabled"`
CertFile string `mapstructure:"cert_file"`
KeyFile string `mapstructure:"key_file"`
} `mapstructure:"client_tls_auth"`
}
type AMQPConnectionBasicAuth ¶
type AMQPProtocol ¶
type AMQPProtocol string
const ( AMQP AMQPProtocol = "amqp" AMQPS AMQPProtocol = "amqps" )
type AWSAuthenticationMethod ¶ added in v2.5.1
type AWSAuthenticationMethod string
const ( Static AWSAuthenticationMethod = "static" Default AWSAuthenticationMethod = "default" AssumeRole AWSAuthenticationMethod = "role" )
type AWSCryptoEngine ¶
type AWSCryptoEngine struct {
AWSSDKConfig `mapstructure:",squash"`
ID string `mapstructure:"id"`
Metadata map[string]interface{} `mapstructure:"metadata"`
}
type AWSSDKConfig ¶
type AWSSDKConfig struct {
AWSAuthenticationMethod AWSAuthenticationMethod `mapstructure:"auth_method"`
EndpointURL string `mapstructure:"endpoint_url"`
AccessKeyID string `mapstructure:"access_key_id"`
SecretAccessKey Password `mapstructure:"secret_access_key"`
Region string `mapstructure:"region"`
RoleARN string `mapstructure:"role_arn"`
}
type AlertsConfig ¶
type AlertsConfig struct {
Logs BaseConfigLogging `mapstructure:"logs"`
Server HttpServer `mapstructure:"server"`
SubscriberEventBus EventBusEngine `mapstructure:"subscriber_event_bus"`
Storage PluggableStorageEngine `mapstructure:"storage"`
SMTPConfig SMTPServer `mapstructure:"smtp_server"`
}
type AuthJWTOptions ¶
type AuthMTLSOptions ¶
type BaseConfigLogging ¶
type BaseConfigLogging struct {
Level LogLevel `mapstructure:"level"`
}
type BasicConnection ¶
type CAClient ¶
type CAClient struct {
HTTPClient `mapstructure:",squash"`
}
type CAConfig ¶
type CAConfig struct {
Logs BaseConfigLogging `mapstructure:"logs"`
Server HttpServer `mapstructure:"server"`
PublisherEventBus EventBusEngine `mapstructure:"publisher_event_bus"`
Storage PluggableStorageEngine `mapstructure:"storage"`
CryptoEngines CryptoEngines `mapstructure:"crypto_engines"`
CryptoMonitoring CryptoMonitoring `mapstructure:"crypto_monitoring"`
VAServerDomain string `mapstructure:"va_server_domain"`
}
type CouchDBPSEConfig ¶
type CouchDBPSEConfig struct {
HTTPConnection `mapstructure:",squash"`
Username string `mapstructure:"username"`
Password Password `mapstructure:"password"`
}
type CryptoEngines ¶
type CryptoEngines struct {
LogLevel LogLevel `mapstructure:"log_level"`
DefaultEngine string `mapstructure:"default_id"`
PKCS11Provider []PKCS11EngineConfig `mapstructure:"pkcs11"`
HashicorpVaultKV2Provider []HashicorpVaultCryptoEngineConfig `mapstructure:"hashicorp_vault"`
AWSKMSProvider []AWSCryptoEngine `mapstructure:"aws_kms"`
AWSSecretsManagerProvider []AWSCryptoEngine `mapstructure:"aws_secrets_manager"`
GolangProvider []GolangEngineConfig `mapstructure:"golang"`
}
type CryptoMonitoring ¶
type DMSconfig ¶
type DMSconfig struct {
Logs BaseConfigLogging `mapstructure:"logs"`
Server HttpServer `mapstructure:"server"`
PublisherEventBus EventBusEngine `mapstructure:"publisher_event_bus"`
Storage PluggableStorageEngine `mapstructure:"storage"`
CAClient struct {
HTTPClient `mapstructure:",squash"`
} `mapstructure:"ca_client"`
DevManagerClient struct {
HTTPClient `mapstructure:",squash"`
} `mapstructure:"device_manager_client"`
DownstreamCertificateFile string `mapstructure:"downstream_cert_file"`
}
type DeviceManagerConfig ¶
type DeviceManagerConfig struct {
Logs BaseConfigLogging `mapstructure:"logs"`
Server HttpServer `mapstructure:"server"`
PublisherEventBus EventBusEngine `mapstructure:"publisher_event_bus"`
SubscriberEventBus EventBusEngine `mapstructure:"subscriber_event_bus"`
Storage PluggableStorageEngine `mapstructure:"storage"`
CAClient struct {
HTTPClient `mapstructure:",squash"`
} `mapstructure:"ca_client"`
}
type EventBusEngine ¶ added in v2.4.1
type EventBusEngine struct {
LogLevel LogLevel `mapstructure:"log_level"`
Enabled bool `mapstructure:"enabled"`
Provider EventBusProvider `mapstructure:"provider"`
Amqp AMQPConnection `mapstructure:"amqp"`
AWSSqsSns AWSSDKConfig `mapstructure:"aws_sqs_sns"`
}
type EventBusProvider ¶ added in v2.4.1
type EventBusProvider string
const ( Amqp EventBusProvider = "amqp" AWSSqsSns EventBusProvider = "aws_sqs_sns" )
type GolangEngineConfig ¶
type HTTPClient ¶
type HTTPClient struct {
LogLevel LogLevel `mapstructure:"log_level"`
AuthMode HTTPClientAuthMethod `mapstructure:"auth_mode"`
AuthJWTOptions AuthJWTOptions `mapstructure:"jwt_options"`
AuthMTLSOptions AuthMTLSOptions `mapstructure:"mtls_options"`
HTTPConnection `mapstructure:",squash"`
}
type HTTPClientAuthMethod ¶
type HTTPClientAuthMethod string
const ( JWT HTTPClientAuthMethod = "jwt" MTLS HTTPClientAuthMethod = "mtls" NoAuth HTTPClientAuthMethod = "noauth" )
type HTTPConnection ¶
type HTTPConnection struct {
Protocol HTTPProtocol `mapstructure:"protocol"`
BasePath string `mapstructure:"base_path"`
BasicConnection `mapstructure:",squash"`
}
type HTTPProtocol ¶
type HTTPProtocol string
const ( HTTPS HTTPProtocol = "https" HTTP HTTPProtocol = "http" )
type HashicorpVaultCryptoEngineConfig ¶
type HashicorpVaultCryptoEngineConfig struct {
HashicorpVaultSDK `mapstructure:",squash"`
ID string `mapstructure:"id"`
Metadata map[string]interface{} `mapstructure:"metadata"`
}
type HashicorpVaultSDK ¶
type HashicorpVaultSDK struct {
RoleID string `mapstructure:"role_id"`
SecretID Password `mapstructure:"secret_id"`
AutoUnsealEnabled bool `mapstructure:"auto_unseal_enabled"`
AutoUnsealKeys []Password `mapstructure:"auto_unseal_keys"`
MountPath string `mapstructure:"mount_path"`
HTTPConnection `mapstructure:",squash"`
}
type HttpServer ¶
type HttpServer struct {
LogLevel LogLevel `mapstructure:"log_level"`
HealthCheckLogging bool `mapstructure:"health_check"`
ListenAddress string `mapstructure:"listen_address"`
Port int `mapstructure:"port"`
Protocol HTTPProtocol `mapstructure:"protocol"`
CertFile string `mapstructure:"cert_file"`
KeyFile string `mapstructure:"key_file"`
Authentication HttpServerAuthentication `mapstructure:"authentication"`
}
type HttpServerAuthentication ¶ added in v2.4.4
type HttpServerAuthentication struct {
MutualTLS HttpServerMutualTLSAuthentication `mapstructure:"mutual_tls"`
}
type HttpServerMutualTLSAuthentication ¶ added in v2.4.4
type HttpServerMutualTLSAuthentication struct {
Enabled bool `mapstructure:"enabled"`
ValidationMode MutualTLSMode `mapstructure:"validation_mode"`
CACertificateFile string `mapstructure:"ca_cert_file"`
}
type IotAWS ¶
type IotAWS struct {
Logs BaseConfigLogging `mapstructure:"logs"`
SubscriberEventBus EventBusEngine `mapstructure:"subscriber_event_bus"`
DMSManagerClient struct {
HTTPClient `mapstructure:",squash"`
} `mapstructure:"dms_manager_client"`
DevManagerClient struct {
HTTPClient `mapstructure:",squash"`
} `mapstructure:"device_manager_client"`
CAClient struct {
HTTPClient `mapstructure:",squash"`
} `mapstructure:"ca_client"`
ConnectorID string `mapstructure:"connector_id"`
AWSSDKConfig AWSSDKConfig `mapstructure:"aws_config"`
AWSBidirectionalQueueName string `mapstructure:"aws_bidirectional_queue_name"`
}
type LamassuMonolithicAssembleMode ¶
type LamassuMonolithicAssembleMode string
const ( //all Lamassu service but the proxy server are deployed in memory. If services interact between them, //they do so by using each other's Business Logic (aka Service). InMemory LamassuMonolithicAssembleMode = "IN_MEMORY" //each Lamassu service is deployed as separate HTTP servers. If services interact between them, HTTP clients (SDKs) are used Http LamassuMonolithicAssembleMode = "HTTP" )
type MonolithicAWSIoTManagerConfig ¶
type MonolithicAWSIoTManagerConfig struct {
Enabled bool `mapstructure:"enabled"`
ConnectorID string `mapstructure:"connector_id"`
AWSSDKConfig AWSSDKConfig `mapstructure:"aws_config"`
}
type MonolithicConfig ¶
type MonolithicConfig struct {
Logs BaseConfigLogging `mapstructure:"logs"`
PublisherEventBus EventBusEngine `mapstructure:"publisher_event_bus"`
SubscriberEventBus EventBusEngine `mapstructure:"subscriber_event_bus"`
Storage PluggableStorageEngine `mapstructure:"storage"`
CryptoEngines CryptoEngines `mapstructure:"crypto_engines"`
CryptoMonitoring CryptoMonitoring `mapstructure:"crypto_monitoring"`
Domain string `mapstructure:"domain"`
AssemblyMode LamassuMonolithicAssembleMode `mapstructure:"assembly_mode"`
GatewayPort int `mapstructure:"gateway_port"`
AWSIoTManager MonolithicAWSIoTManagerConfig `mapstructure:"aws_iot_manager"`
}
type MutualTLSMode ¶
type MutualTLSMode string
const ( Strict MutualTLSMode = "strict" Request MutualTLSMode = "request" Any MutualTLSMode = "any" )
type PKCS11Config ¶
type PKCS11Config struct {
TokenLabel string `mapstructure:"token"`
TokenPin Password `mapstructure:"pin"`
ModulePath string `mapstructure:"module_path"`
ModuleExtraOptions PKCS11ModuleExtraOptions `mapstructure:"module_extra_options"`
}
type PKCS11EngineConfig ¶
type PKCS11EngineConfig struct {
PKCS11Config `mapstructure:",squash"`
ID string `mapstructure:"id"`
Metadata map[string]interface{} `mapstructure:"metadata"`
}
type PluggableStorageEngine ¶
type PluggableStorageEngine struct {
LogLevel LogLevel `mapstructure:"log_level"`
Provider StorageProvider `mapstructure:"provider"`
CouchDB CouchDBPSEConfig `mapstructure:"couch_db"`
Postgres PostgresPSEConfig `mapstructure:"postgres"`
SQLite SQLitePSEConfig `mapstructure:"sqlite"`
}
type PostgresPSEConfig ¶
type SMTPServer ¶
type SQLitePSEConfig ¶ added in v2.5.2
type StorageProvider ¶
type StorageProvider string
const ( Postgres StorageProvider = "postgres" CouchDB StorageProvider = "couch_db" DynamoDB StorageProvider = "dynamo_db" SQLite StorageProvider = "sqlite" )
type VAconfig ¶
type VAconfig struct {
Logs BaseConfigLogging `mapstructure:"logs"`
Server HttpServer `mapstructure:"server"`
CAClient CAClient `mapstructure:"ca_client"`
}
Click to show internal directories.
Click to hide internal directories.