config

package
v1.5.8 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Configuration = Config{}

Functions

This section is empty.

Types

type APIConfig

type APIConfig struct {
	Host       string `mapstructure:"host" default:"0.0.0.0"`
	Port       string `mapstructure:"port" default:"8080"`
	DebugMode  bool   `mapstructure:"debug_mode" default:"false"`
	ApiVersion string `mapstructure:"api_version" default:"2024-09-01"`
}

type AuthConfig

type AuthConfig struct {
	Secret string `mapstructure:"secret"`
}

type AuthenticityConfig

type AuthenticityConfig struct {
	KeyConfig         KeyConfig         `mapstructure:"key"`
	CertificateConfig CertificateConfig `mapstructure:"certificate"`
}

type BloockConfig

type BloockConfig struct {
	ApiHost          string `mapstructure:"api_host" default:"https://api.bloock.com"`
	ApiKey           string `mapstructure:"api_key"`
	CdnHost          string `mapstructure:"cdn_host" default:"https://cdn.bloock.com"`
	WebhookSecretKey string `mapstructure:"webhook_secret_key"`
}

type CertificateConfig

type CertificateConfig struct {
	Pkcs12Path     string `mapstructure:"pkcs12_path"`
	Pkcs12Password string `mapstructure:"pkcs12_password"`
}

type Config

type Config struct {
	Api          APIConfig
	Auth         AuthConfig
	Db           DBConfig
	Bloock       BloockConfig
	Webhook      WebhookConfig
	Authenticity AuthenticityConfig
	Encryption   EncryptionConfig
	Storage      StorageConfig
	Integrity    IntegrityConfig
	Tracing      TracingConfig
}

func InitConfig

func InitConfig() (*Config, error)

type DBConfig

type DBConfig struct {
	ConnectionString string `mapstructure:"connection_string" default:"file:managed?mode=memory&cache=shared&_fk=1"`
}

type EncryptionConfig

type EncryptionConfig struct {
	KeyConfig         KeyConfig         `mapstructure:"key"`
	CertificateConfig CertificateConfig `mapstructure:"certificate"`
}

type IntegrityConfig added in v1.3.0

type IntegrityConfig struct {
	AggregateMode       bool `mapstructure:"aggregate_mode" default:"false"`
	AggregateWorker     bool `mapstructure:"aggregate_worker" default:"false"`
	AggregateInterval   int  `mapstructure:"aggregate_interval" default:"3600"`
	MaxProofMessageSize int  `mapstructure:"max_proof_message_size" default:"1000"`
}

type KeyConfig

type KeyConfig struct {
	KeyType string `mapstructure:"key_type"`
	Key     string `mapstructure:"key"`
}

type StorageConfig

type StorageConfig struct {
	TmpDir        string `mapstructure:"tmp_dir" default:"./tmp"`
	LocalPath     string `mapstructure:"local_path" default:"./data"`
	LocalStrategy string `mapstructure:"local_strategy" default:"HASH"`
}

type TracingConfig added in v1.5.8

type TracingConfig struct {
	Enabled        bool   `mapstructure:"enabled" default:"false"`
	TracerConnUrl  string `mapstructure:"tracer_conn_url" default:""`
	AppEnvironment string `mapstructure:"app_environment" default:""`
	AppVersion     string `mapstructure:"app_version" default:""`
}

type WebhookConfig

type WebhookConfig struct {
	ClientEndpointUrl string `mapstructure:"client_endpoint_url"`
	MaxRetries        uint64 `mapstructure:"max_retries"`
}

Jump to

Keyboard shortcuts

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