utils

package
v0.0.0-...-9a487e9 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CallHelpCommand = func(cmd *cobra.Command, args []string) error {
	if err := cmd.Help(); err != nil {
		return fmt.Errorf("calling help command: %w", err)
	}
	return nil
}
View Source
var PropagatePersistentPreRun = func(cmd *cobra.Command, args []string) {
	if cmd.Parent().PersistentPreRun != nil {
		cmd.Parent().PersistentPreRun(cmd.Parent(), args)
	}
}

Functions

func AWSConfigOptions

func AWSConfigOptions(opts *message.MessengerOptions) []*config.ConfigOption

AWSConfigOptions returns the config options for AWS. Relevant for loading configs needed for the messenger type(s): `AWS_*`.

func BaseDistributionAccountSignatureClientConfigOptions

func BaseDistributionAccountSignatureClientConfigOptions(opts *signing.SignatureServiceOptions) []*config.ConfigOption

func BaseSignatureServiceConfigOptions

func BaseSignatureServiceConfigOptions(opts *signing.SignatureServiceOptions) []*config.ConfigOption

func ClearTestEnvironment

func ClearTestEnvironment(t *testing.T)

clearTestEnvironment removes all envs from the test environment. It's useful to make tests independent from the localhost environment variables.

func CrashTrackerTypeConfigOption

func CrashTrackerTypeConfigOption(targetPointer interface{}) *config.ConfigOption

func DistributionPublicKey

func DistributionPublicKey(targetPointer interface{}) *config.ConfigOption

func EventBrokerConfigOptions

func EventBrokerConfigOptions(opts *EventBrokerOptions) []*config.ConfigOption

func KafkaConfig

func KafkaConfig(opts EventBrokerOptions) events.KafkaConfig

func NetworkPassphrase

func NetworkPassphrase(targetPointer interface{}) *config.ConfigOption

func SchedulerConfigOptions

func SchedulerConfigOptions(opts *scheduler.SchedulerOptions) []*config.ConfigOption

func SetConfigOptionCrashTrackerType

func SetConfigOptionCrashTrackerType(co *config.ConfigOption) error

func SetConfigOptionEC256PrivateKey

func SetConfigOptionEC256PrivateKey(co *config.ConfigOption) error

SetConfigOptionEC256PrivateKey parses the config option incoming value and validates if it is a valid EC256PrivateKey.

func SetConfigOptionEC256PublicKey

func SetConfigOptionEC256PublicKey(co *config.ConfigOption) error

SetConfigOptionEC256PublicKey parses the config option incoming value and validates if it is a valid EC256PublicKey.

func SetConfigOptionEventBrokerType

func SetConfigOptionEventBrokerType(co *config.ConfigOption) error

func SetConfigOptionKafkaSecurityProtocol

func SetConfigOptionKafkaSecurityProtocol(co *config.ConfigOption) error

func SetConfigOptionLogLevel

func SetConfigOptionLogLevel(co *config.ConfigOption) error

func SetConfigOptionMessengerType

func SetConfigOptionMessengerType(co *config.ConfigOption) error

func SetConfigOptionMetricType

func SetConfigOptionMetricType(co *config.ConfigOption) error

func SetConfigOptionStellarPrivateKey

func SetConfigOptionStellarPrivateKey(co *config.ConfigOption) error

func SetConfigOptionStellarPublicKey

func SetConfigOptionStellarPublicKey(co *config.ConfigOption) error

func SetConfigOptionStringList

func SetConfigOptionStringList(co *config.ConfigOption) error

func SetConfigOptionURLList

func SetConfigOptionURLList(co *config.ConfigOption) error

func SetConfigOptionURLString

func SetConfigOptionURLString(co *config.ConfigOption) error

func SetCorsAllowedOrigins

func SetCorsAllowedOrigins(co *config.ConfigOption) error

func SetRegistrationContactType

func SetRegistrationContactType(co *config.ConfigOption) error

func TenantRoutingConfigOptions

func TenantRoutingConfigOptions(opts *TenantRoutingOptions) []*config.ConfigOption

TenantRoutingConfigOptions returns the config options for routing commands that apply to all tenants or a specific tenant.

func TenantXLMBootstrapAmount

func TenantXLMBootstrapAmount(targetPointer interface{}) *config.ConfigOption

func TransactionSubmitterEngineConfigOptions

func TransactionSubmitterEngineConfigOptions(opts *di.TxSubmitterEngineOptions) config.ConfigOptions

func TwilioConfigOptions

func TwilioConfigOptions(opts *message.MessengerOptions) []*config.ConfigOption

TwilioConfigOptions returns the config options for Twilio. Relevant for loading configs needed for the messenger type(s): `TWILIO_*`.

Types

type EventBrokerOptions

type EventBrokerOptions struct {
	EventBrokerType events.EventBrokerType
	BrokerURLs      []string
	ConsumerGroupID string

	// KAFKA specific options
	KafkaSecurityProtocol  events.KafkaSecurityProtocol
	KafkaSASLUsername      string
	KafkaSASLPassword      string
	KafkaAccessKey         string
	KafkaAccessCertificate string
}

type GlobalOptionsType

type GlobalOptionsType struct {
	LogLevel          logrus.Level
	SentryDSN         string
	Environment       string
	Version           string
	GitCommit         string
	DatabaseURL       string
	BaseURL           string
	SDPUIBaseURL      string
	NetworkPassphrase string
}

func (GlobalOptionsType) PopulateCrashTrackerOptions

func (g GlobalOptionsType) PopulateCrashTrackerOptions(crashTrackerOptions *crashtracker.CrashTrackerOptions)

populateConfigOptions populates the CrastTrackerOptions from the global options.

type TenantRoutingOptions

type TenantRoutingOptions struct {
	All      bool
	TenantID string
}

func (*TenantRoutingOptions) ValidateFlags

func (o *TenantRoutingOptions) ValidateFlags() error

Jump to

Keyboard shortcuts

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