config

package
v0.0.0-...-8018a7e Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSConfig

type AWSConfig struct {
	ServiceType          string                `mapstructure:"service_type"`
	Port                 int                   `mapstructure:"port"`
	UrlPrefix            string                `mapstructure:"url_prefix"`
	Middleware           []string              `mapstructure:"middleware"`
	DestinationAWSConfig *AWSDestinationConfig `mapstructure:"aws_destination_config"`
	DestinationGCPConfig *GCPDestinationConfig `mapstructure:"gcp_destination_config"`
}

type AWSDestinationConfig

type AWSDestinationConfig struct {
	Name            string     `mapstructure:"name"`
	AccessKeyId     string     `mapstructure:"access_key_id"`
	SecretAccessKey string     `mapstructure:"secret_access_key"`
	S3Config        *GCSConfig `mapstructure:"s3_config"`
}

type Config

type Config struct {
	AwsConfigs       map[string]AWSConfig        `mapstructure:"aws_configs"`
	GcpConfigs       map[string]AWSConfig        `mapstructure:"gcp_configs"`
	Middleware       map[string]MiddlewareConfig `mapstructure:"middleware"`
	Logger           *LogConfig                  `mapstructure:"logger"`
	PanicOnBindError bool                        `mapstructure:"panic_on_bind_error"`
}

func FromFile

func FromFile(filename string) *Config

type GCPDatastoreConfig

type GCPDatastoreConfig struct {
	TableKeyNameMap map[string]string `mapstructure:"table_key_map"`
}

type GCPDestinationConfig

type GCPDestinationConfig struct {
	Name            string              `mapstructure:"name"`
	Project         string              `mapstructure:"project"`
	Instance        string              `mapstructure:"instance"`
	GCSConfig       *GCSConfig          `mapstructure:"gcs_config"`
	DatastoreConfig *GCPDatastoreConfig `mapstructure:"datastore_config"`
	KeyFileLocation *string             `mapstructure:"key_file_location"`
	KeyFromUrl      *bool               `mapstructure:"key_from_url"`
	RawKey          *string             `mapstructure:"raw_key"`
}

type GCSConfig

type GCSConfig struct {
	BucketRename         map[string]string `mapstructure:"bucket_rename"`
	MultipartDBDirectory string            `mapstructure:"multipart_db_directory"`
	MultipartPathPrefix  string            `mapstructure:"multipart_temp_path_prefix"`
}

type LogConfig

type LogConfig struct {
	Format *string `mapstructure:"format"`
	Level  *string `mapstructure:"level"`
}

type MiddlewareConfig

type MiddlewareConfig struct {
	Type string `mapstructure:"type"`
}

Jump to

Keyboard shortcuts

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