configuration

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: May 26, 2021 License: MIT Imports: 12 Imported by: 0

README

Configuration Package

The configuration package provides a possibility to store a configuration of databases, or AWS services such a DynamoDB, SNS, SQS, SecretsManager and e.t.c

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCustomSettingsByKey

func GetCustomSettingsByKey(key string) (interface{}, error)

GetCustomSettings returns the Custom Settings

func GetDB

func GetDB(key string) (Database, error)

GetDB returns Database configuration by key

func GetDynamo

func GetDynamo(key string) (Dynamo, error)

GetDynamo returns the Dynamo configuration by key

func GetS3

func GetS3(key string) (S3, error)

GetS3 returns the S3 configuration by key

func GetSES

func GetSES(key string) (SES, error)

GetSes returns the SES configuration by key

func GetSNS

func GetSNS(key string) (SNS, error)

GetSNS returns the SNS configuration by key

func GetSQS

func GetSQS(key string) (SQS, error)

GetSQS returns the SQS configuration by key

func GetSecretsManager

func GetSecretsManager() (secretsmanager.SecretsManager, error)

GetSecretsManager returns SecretManager configuration

func GetStage

func GetStage() string

GetStage returns current stage

func SetCustomSettings

func SetCustomSettings(key string, cs interface{})

SetCustomSettings sets the Custom Setting

func SetDatabase

func SetDatabase(key string, database Database) error

SetDatabase sets the Database configuration

func SetDatabaseObject

func SetDatabaseObject(key string, database Database) error

SetDatabaseObject sets the Database configuration

func SetDatabaseProperties

func SetDatabaseProperties(key string, provider string, host string, port int, database string, user string, password string) error

SetDatabaseProperties sets the Database configuration by providing parameters

func SetDynamo

func SetDynamo(key string, region string, prefix string) error

SetDynamo sets the Dynamo configuration

func SetS3

func SetS3(key string, region string, bucket string) error

SetS3 sets the S3 configuration

func SetSES

func SetSES(key string, region string, from string, domain string) error

SetSES sets the SES configuration

func SetSNS

func SetSNS(key string, region string, topic string, prefix string) error

SetSNS sets the SNS configuration

func SetSQS

func SetSQS(key string, region string, prefix string, queue string) error

SetSQS sets the SQS configuration

func SetSecretsManager

func SetSecretsManager(region string)

SetSecretsManager creates a Secrets Manager instance and sets it into the instance of the configuration

func SetStage

func SetStage(stage string)

SetStage sets the current stage

Types

type Config

type Config struct {
	Databases      Databases
	AWS            *AWS
	CustomSettings map[string]interface{}
	Stage          string
}

Config is a type of configuration

type Databases

type Databases map[string]Database

Databases is a slice of Database

Directories

Path Synopsis
aws
s3
ses
sns
sqs

Jump to

Keyboard shortcuts

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