configV2

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2021 License: Apache-2.0 Imports: 6 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiDefaults

type ApiDefaults struct {
	RefdataDir     string `json:"refdataDir"`
	HttpServerPort string `json:"httpServerPort"`
	QueryRowLimit  int    `json:"queryRowLimit"`
	AuthEnabled    bool   `json:"authEnabled"`
	CorsEnabled    bool   `json:"corsEnabled"`
}

type BrokerDefaults

type BrokerDefaults struct {
	CloudEventDomain          string                      `json:"cloudEventDomain"`
	BrokerTopicPrefix         string                      `json:"brokerTopicPrefix"`
	BrokerSubscriptionPrefix  string                      `json:"brokerSubscriptionPrefix"`
	BrokerDeadLetterSuffix    string                      `json:"brokerDeadLetterSuffix"`
	BrokerForwarderSuffix     string                      `json:"brokerForwarderSuffix"`
	BrokerMaxDeliveryAttempts int                         `json:"brokerMaxDeliveryAttempts"`
	BrokerMaxAckTimeInSeconds int                         `json:"brokerMaxAckTimeInSeconds"`
	Forwarders                map[RegionName][]RegionName `json:"forwarders"`
}

type BrokerParameters

type BrokerParameters struct {
	BrokerType           string                      `json:"brokerType"`
	MultiRegionForwarder bool                        `json:"multiRegionForwarder"`
	AzureBroker          *BrokerParametersCloudAzure `json:"azureBroker"`
	GcpBroker            *BrokerParametersCloudGcp   `json:"gcpBroker"`
	AwsBroker            *BrokerParametersCloudAws   `json:"awsBroker"`
	OtherConfigMap       map[string]string           `json:"otherConfig"`
}

type BrokerParametersCloudAws

type BrokerParametersCloudAws struct {
	// TODO
	OtherConfigMap map[string]string `json:"otherConfig"`
}

type BrokerParametersCloudAzure

type BrokerParametersCloudAzure struct {
	BrokerPrefix     string            `json:"brokerPrefix"`
	BrokerSku        string            `json:"brokerSku"`
	ConnectionString string            `json:"connectionString"`
	OtherConfigMap   map[string]string `json:"otherConfig"`
}

type BrokerParametersCloudGcp

type BrokerParametersCloudGcp struct {
	OwnerAccount               string            `json:"ownerAccount"`
	ApplicationCredentialsFile string            `json:"applicationCredentialsFile"`
	OtherConfigMap             map[string]string `json:"otherConfig"`
}

type CloudAwsConfig

type CloudAwsConfig struct {
	// TODO
	OtherConfigMap map[string]string `json:"otherConfig"`
}

type CloudAzureConfig

type CloudAzureConfig struct {
	SubscriptionId    string            `json:"subscriptionId"`
	ResourceGroup     string            `json:"resourceGroup"`
	AzureAuthLocation string            `json:"azureAuthLocation"`
	OtherConfigMap    map[string]string `json:"otherConfig"`
}

type CloudGcpConfig

type CloudGcpConfig struct {
	ProjectID                         string            `json:"projectID"`
	ProjectOwnerAccount               string            `json:"projectOwnerAccount"`
	ProjectApplicationCredentialsFile string            `json:"projectApplicationCredentialsFile"`
	OtherConfigMap                    map[string]string `json:"otherConfig"`
}

type CloudParameters

type CloudParameters struct {
	CloudType      string            `json:"cloudType"`
	AzureConfig    *CloudAzureConfig `json:"azureConfig"`
	GcpConfig      *CloudGcpConfig   `json:"gcpConfig"`
	AwsConfig      *CloudAwsConfig   `json:"awsConfig"`
	OtherConfigMap map[string]string `json:"otherConfig"`
}

type ConfigName

type ConfigName string

type DatastoreDefaults

type DatastoreDefaults struct {
	DatastoreCollectionPrefix string `json:"datastoreCollectionPrefix"`
}

type DatastoreParameters

type DatastoreParameters struct {
	DatastoreType  string                         `json:"datastoreType"`
	AzureDatastore *DatastoreParametersCloudAzure `json:"azureDatastore"`
	GcpDatastore   *DatastoreParametersCloudGcp   `json:"gcpDatastore"`
	AwsDatastore   *DatastoreParametersCloudAws   `json:"awsDatastore"`
	MongoDb        *DatastoreParametersMongodb    `json:"mongoDb"`
	OtherConfigMap map[string]string              `json:"otherConfig"`
}

type DatastoreParametersCloudAws

type DatastoreParametersCloudAws struct {
	// TODO
	OtherConfigMap map[string]string `json:"otherConfig"`
}

type DatastoreParametersCloudAzure

type DatastoreParametersCloudAzure struct {
	DatastorePrefix     string            `json:"datastorePrefix"`
	CosmosDbAccountName string            `json:"CosmosDbAccountName"`
	CosmosDbKind        string            `json:"CosmosDbKind"`
	CosmosDbVersion     string            `json:"CosmosDbVersion"`
	OtherConfigMap      map[string]string `json:"otherConfig"`
}

type DatastoreParametersCloudGcp

type DatastoreParametersCloudGcp struct {
	OwnerAccount               string            `json:"ownerAccount"`
	ApplicationCredentialsFile string            `json:"applicationCredentialsFile"`
	FirestoreRegion            string            `json:"firestoreRegion"`
	OtherConfigMap             map[string]string `json:"otherConfig"`
}

type DatastoreParametersMongodb

type DatastoreParametersMongodb struct {
	ConnectionString string            `json:"connectionString"`
	OtherConfigMap   map[string]string `json:"otherConfig"`
}

type MultiRegionConfig

type MultiRegionConfig struct {
	EnvironmentPrefix       string                               `json:"environmentPrefix"`
	RegionList              []RegionName                         `json:"regionList"`
	CurrentRegion           RegionName                           `json:"-"`
	ApiDefaults             *ApiDefaults                         `json:"apiDefaults"`
	DatastoreDefaults       *DatastoreDefaults                   `json:"datastoreDefaults"`
	BrokerDefaults          *BrokerDefaults                      `json:"brokerDefaults"`
	ServiceConfigMap        map[ConfigName]*ServiceConfig        `json:"serviceConfig"`
	DefaultServiceConfigMap map[RegionName]ConfigName            `json:"defaultServiceConfig"`
	CollectionMap           map[collectionName]*collectionConfig `json:"collections"`
}

func (*MultiRegionConfig) GetBroker

func (cfg *MultiRegionConfig) GetBroker(collection string, region string) (broker string, err error)

func (*MultiRegionConfig) GetBrokerTypeForConfigName

func (cfg *MultiRegionConfig) GetBrokerTypeForConfigName(cfgName string) (brokerType string)

func (*MultiRegionConfig) GetCloudEventDomain

func (cfg *MultiRegionConfig) GetCloudEventDomain(collection string) string

func (*MultiRegionConfig) GetCollectionName

func (cfg *MultiRegionConfig) GetCollectionName(collection string, region string) string

func (*MultiRegionConfig) GetCollections

func (cfg *MultiRegionConfig) GetCollections() (collections []string)

func (*MultiRegionConfig) GetCoreSubscription

func (cfg *MultiRegionConfig) GetCoreSubscription(collection string, region string) string

func (*MultiRegionConfig) GetCoreTopic

func (cfg *MultiRegionConfig) GetCoreTopic(collection string, region string) string

func (*MultiRegionConfig) GetDatastore

func (cfg *MultiRegionConfig) GetDatastore(collection, region string) (datastore string, err error)

func (*MultiRegionConfig) GetDatastoreTypeForConfigName

func (cfg *MultiRegionConfig) GetDatastoreTypeForConfigName(cfgName string) (datastoreType string)

func (*MultiRegionConfig) GetForwarderDeadletterSubscription

func (cfg *MultiRegionConfig) GetForwarderDeadletterSubscription(collection string, region string) string

func (*MultiRegionConfig) GetForwarderDeadletterTopic

func (cfg *MultiRegionConfig) GetForwarderDeadletterTopic(collection string, region string) string

func (*MultiRegionConfig) GetForwarderSubscription

func (cfg *MultiRegionConfig) GetForwarderSubscription(collection string, region string) string

func (*MultiRegionConfig) GetForwarders

func (cfg *MultiRegionConfig) GetForwarders(region string) (forwarders []string)

func (*MultiRegionConfig) GetGcpProjectID

func (cfg *MultiRegionConfig) GetGcpProjectID(collection, region string) (project string, err error)

func (*MultiRegionConfig) GetHandlerDeadletterSubscription

func (cfg *MultiRegionConfig) GetHandlerDeadletterSubscription(collection string, region string) string

func (*MultiRegionConfig) GetHandlerDeadletterTopic

func (cfg *MultiRegionConfig) GetHandlerDeadletterTopic(collection string, region string) string

func (*MultiRegionConfig) GetRegions

func (cfg *MultiRegionConfig) GetRegions() (regions []string)

func (*MultiRegionConfig) GetServiceConfig

func (cfg *MultiRegionConfig) GetServiceConfig(sc string) *ServiceConfig

func (*MultiRegionConfig) GetServiceConfigForCollectionRegion

func (cfg *MultiRegionConfig) GetServiceConfigForCollectionRegion(collection, region string) (*ServiceConfig, error)

func (*MultiRegionConfig) GetServiceType

func (cfg *MultiRegionConfig) GetServiceType(collection string, region string) string

func (*MultiRegionConfig) IsEnabled

func (cfg *MultiRegionConfig) IsEnabled(collection string) bool

func (*MultiRegionConfig) Load

func (cfg *MultiRegionConfig) Load(ctx context.Context, file string) error

func (*MultiRegionConfig) SetGcpProjectApplicationCredentialsFile added in v0.1.4

func (cfg *MultiRegionConfig) SetGcpProjectApplicationCredentialsFile(collection, region string) (err error)

func (*MultiRegionConfig) SetHttpServerPort

func (cfg *MultiRegionConfig) SetHttpServerPort(port int)

func (*MultiRegionConfig) SetRegion

func (cfg *MultiRegionConfig) SetRegion(region string)

func (*MultiRegionConfig) Validate

func (cfg *MultiRegionConfig) Validate(ctx context.Context) (err error)

func (*MultiRegionConfig) ValidateList

func (cfg *MultiRegionConfig) ValidateList(l []string, k, s string) (err error)

type RegionName

type RegionName string

type ServiceConfig

type ServiceConfig struct {
	ServiceType         string               `json:"serviceType"`
	Region              RegionName           `json:"region"`
	CloudParameters     *CloudParameters     `json:"cloudParameters"`
	BrokerParameters    *BrokerParameters    `json:"brokerParameters"`
	DatastoreParameters *DatastoreParameters `json:"datastoreParameters"`
}

Jump to

Keyboard shortcuts

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