config

package
v0.90.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	// Defines the path to the BOPURL.
	BOPURL *string `json:"BOPURL,omitempty" yaml:"BOPURL,omitempty" mapstructure:"BOPURL,omitempty"`

	// Database corresponds to the JSON schema field "database".
	Database *DatabaseConfig `json:"database,omitempty" yaml:"database,omitempty" mapstructure:"database,omitempty"`

	// Endpoints corresponds to the JSON schema field "endpoints".
	Endpoints []DependencyEndpoint `json:"endpoints,omitempty" yaml:"endpoints,omitempty" mapstructure:"endpoints,omitempty"`

	// FeatureFlags corresponds to the JSON schema field "featureFlags".
	FeatureFlags *FeatureFlagsConfig `json:"featureFlags,omitempty" yaml:"featureFlags,omitempty" mapstructure:"featureFlags,omitempty"`

	// A set of configMap/secret hashes
	HashCache *string `json:"hashCache,omitempty" yaml:"hashCache,omitempty" mapstructure:"hashCache,omitempty"`

	// The external hostname of the deployment, where applicable
	Hostname *string `json:"hostname,omitempty" yaml:"hostname,omitempty" mapstructure:"hostname,omitempty"`

	// InMemoryDb corresponds to the JSON schema field "inMemoryDb".
	InMemoryDb *InMemoryDBConfig `json:"inMemoryDb,omitempty" yaml:"inMemoryDb,omitempty" mapstructure:"inMemoryDb,omitempty"`

	// Kafka corresponds to the JSON schema field "kafka".
	Kafka *KafkaConfig `json:"kafka,omitempty" yaml:"kafka,omitempty" mapstructure:"kafka,omitempty"`

	// Logging corresponds to the JSON schema field "logging".
	Logging LoggingConfig `json:"logging" yaml:"logging" mapstructure:"logging"`

	// Metadata corresponds to the JSON schema field "metadata".
	Metadata *AppMetadata `json:"metadata,omitempty" yaml:"metadata,omitempty" mapstructure:"metadata,omitempty"`

	// Defines the path to the metrics server that the app should be configured to
	// listen on for metric traffic.
	MetricsPath string `json:"metricsPath" yaml:"metricsPath" mapstructure:"metricsPath"`

	// Defines the metrics port that the app should be configured to listen on for
	// metric traffic.
	MetricsPort int `json:"metricsPort" yaml:"metricsPort" mapstructure:"metricsPort"`

	// ObjectStore corresponds to the JSON schema field "objectStore".
	ObjectStore *ObjectStoreConfig `json:"objectStore,omitempty" yaml:"objectStore,omitempty" mapstructure:"objectStore,omitempty"`

	// PrivateEndpoints corresponds to the JSON schema field "privateEndpoints".
	PrivateEndpoints []PrivateDependencyEndpoint `json:"privateEndpoints,omitempty" yaml:"privateEndpoints,omitempty" mapstructure:"privateEndpoints,omitempty"`

	// Defines the private port that the app should be configured to listen on for API
	// traffic.
	PrivatePort *int `json:"privatePort,omitempty" yaml:"privatePort,omitempty" mapstructure:"privatePort,omitempty"`

	// Defines the public port that the app should be configured to listen on for API
	// traffic.
	PublicPort *int `json:"publicPort,omitempty" yaml:"publicPort,omitempty" mapstructure:"publicPort,omitempty"`

	// Defines the port CA path
	TlsCAPath *string `json:"tlsCAPath,omitempty" yaml:"tlsCAPath,omitempty" mapstructure:"tlsCAPath,omitempty"`

	// Deprecated: Use 'publicPort' instead.
	WebPort *int `json:"webPort,omitempty" yaml:"webPort,omitempty" mapstructure:"webPort,omitempty"`
}

ClowdApp deployment configuration for Clowder enabled apps.

func (*AppConfig) UnmarshalJSON

func (j *AppConfig) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type AppMetadata added in v0.20.0

type AppMetadata struct {
	// Metadata pertaining to an application's deployments
	Deployments []DeploymentMetadata `json:"deployments,omitempty" yaml:"deployments,omitempty" mapstructure:"deployments,omitempty"`

	// Name of the ClowdEnvironment this ClowdApp runs in
	EnvName *string `json:"envName,omitempty" yaml:"envName,omitempty" mapstructure:"envName,omitempty"`

	// Name of the ClowdApp
	Name *string `json:"name,omitempty" yaml:"name,omitempty" mapstructure:"name,omitempty"`
}

Arbitrary metadata pertaining to the application application

type BrokerConfig

type BrokerConfig struct {
	// Authtype corresponds to the JSON schema field "authtype".
	Authtype *BrokerConfigAuthtype `json:"authtype,omitempty" yaml:"authtype,omitempty" mapstructure:"authtype,omitempty"`

	// CA certificate trust list for broker in PEM format. If absent, client should
	// use OS default trust list
	Cacert *string `json:"cacert,omitempty" yaml:"cacert,omitempty" mapstructure:"cacert,omitempty"`

	// Hostname of kafka broker
	Hostname string `json:"hostname" yaml:"hostname" mapstructure:"hostname"`

	// Port of kafka broker
	Port *int `json:"port,omitempty" yaml:"port,omitempty" mapstructure:"port,omitempty"`

	// Sasl corresponds to the JSON schema field "sasl".
	Sasl *KafkaSASLConfig `json:"sasl,omitempty" yaml:"sasl,omitempty" mapstructure:"sasl,omitempty"`

	// Broker security procotol, expect one of either: SASL_SSL, SSL
	SecurityProtocol *string `json:"securityProtocol,omitempty" yaml:"securityProtocol,omitempty" mapstructure:"securityProtocol,omitempty"`
}

Broker Configuration

func (*BrokerConfig) UnmarshalJSON

func (j *BrokerConfig) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type BrokerConfigAuthtype

type BrokerConfigAuthtype string
const BrokerConfigAuthtypeSasl BrokerConfigAuthtype = "sasl"

func (*BrokerConfigAuthtype) UnmarshalJSON

func (j *BrokerConfigAuthtype) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type CloudWatchConfig

type CloudWatchConfig struct {
	// Defines the access key that the app should use for configuring CloudWatch.
	AccessKeyId string `json:"accessKeyId" yaml:"accessKeyId" mapstructure:"accessKeyId"`

	// Defines the logGroup that the app should use for configuring CloudWatch.
	LogGroup string `json:"logGroup" yaml:"logGroup" mapstructure:"logGroup"`

	// Defines the region that the app should use for configuring CloudWatch.
	Region string `json:"region" yaml:"region" mapstructure:"region"`

	// Defines the secret key that the app should use for configuring CloudWatch.
	SecretAccessKey string `json:"secretAccessKey" yaml:"secretAccessKey" mapstructure:"secretAccessKey"`
}

Cloud Watch configuration

func (*CloudWatchConfig) UnmarshalJSON

func (j *CloudWatchConfig) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type DatabaseConfig

type DatabaseConfig struct {
	// Defines the pgAdmin password.
	AdminPassword string `json:"adminPassword" yaml:"adminPassword" mapstructure:"adminPassword"`

	// Defines the pgAdmin username.
	AdminUsername string `json:"adminUsername" yaml:"adminUsername" mapstructure:"adminUsername"`

	// Defines the hostname of the database configured for the ClowdApp.
	Hostname string `json:"hostname" yaml:"hostname" mapstructure:"hostname"`

	// Defines the database name.
	Name string `json:"name" yaml:"name" mapstructure:"name"`

	// Defines the password for the standard user.
	Password string `json:"password" yaml:"password" mapstructure:"password"`

	// Defines the port of the database configured for the ClowdApp.
	Port int `json:"port" yaml:"port" mapstructure:"port"`

	// Defines the CA used to access the database.
	RdsCa *string `json:"rdsCa,omitempty" yaml:"rdsCa,omitempty" mapstructure:"rdsCa,omitempty"`

	// Defines the postgres SSL mode that should be used.
	SslMode string `json:"sslMode" yaml:"sslMode" mapstructure:"sslMode"`

	// Defines a username with standard access to the database.
	Username string `json:"username" yaml:"username" mapstructure:"username"`
}

Database Configuration

func (*DatabaseConfig) Populate

func (dbc *DatabaseConfig) Populate(data *map[string]string) error

Populate sets the database configuration on the object from the passed in map.

func (*DatabaseConfig) UnmarshalJSON

func (j *DatabaseConfig) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type DatabaseConfigContainer added in v0.21.0

type DatabaseConfigContainer struct {
	Config DatabaseConfig       `json:"config"`
	Ref    types.NamespacedName `json:"ref"`
}

type DependencyEndpoint

type DependencyEndpoint struct {
	// The top level api path that the app should serve from /api/<apiPath>
	// (deprecated, use apiPaths)
	ApiPath string `json:"apiPath" yaml:"apiPath" mapstructure:"apiPath"`

	// The list of API paths (each matching format: '/api/some-path/') that this app
	// will serve requests from
	ApiPaths []string `json:"apiPaths,omitempty" yaml:"apiPaths,omitempty" mapstructure:"apiPaths,omitempty"`

	// The app name of the ClowdApp hosting the service.
	App string `json:"app" yaml:"app" mapstructure:"app"`

	// The hostname of the dependent service.
	Hostname string `json:"hostname" yaml:"hostname" mapstructure:"hostname"`

	// The PodSpec name of the dependent service inside the ClowdApp.
	Name string `json:"name" yaml:"name" mapstructure:"name"`

	// The port of the dependent service.
	Port int `json:"port" yaml:"port" mapstructure:"port"`

	// The TLS port of the dependent service.
	TlsPort *int `json:"tlsPort,omitempty" yaml:"tlsPort,omitempty" mapstructure:"tlsPort,omitempty"`
}

Dependent service connection info

func (*DependencyEndpoint) UnmarshalJSON

func (j *DependencyEndpoint) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type DeploymentMetadata added in v0.20.0

type DeploymentMetadata struct {
	// Image used by deployment
	Image string `json:"image" yaml:"image" mapstructure:"image"`

	// Name of deployment
	Name string `json:"name" yaml:"name" mapstructure:"name"`
}

Deployment Metadata

func (*DeploymentMetadata) UnmarshalJSON added in v0.20.0

func (j *DeploymentMetadata) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type FeatureFlagsConfig

type FeatureFlagsConfig struct {
	// Defines the client access token to use when connect to the FeatureFlags server
	ClientAccessToken *string `json:"clientAccessToken,omitempty" yaml:"clientAccessToken,omitempty" mapstructure:"clientAccessToken,omitempty"`

	// Defines the hostname for the FeatureFlags server
	Hostname string `json:"hostname" yaml:"hostname" mapstructure:"hostname"`

	// Defines the port for the FeatureFlags server
	Port int `json:"port" yaml:"port" mapstructure:"port"`

	// Details the scheme to use for FeatureFlags http/https
	Scheme FeatureFlagsConfigScheme `json:"scheme" yaml:"scheme" mapstructure:"scheme"`
}

Feature Flags Configuration

func (*FeatureFlagsConfig) UnmarshalJSON

func (j *FeatureFlagsConfig) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type FeatureFlagsConfigScheme added in v0.21.0

type FeatureFlagsConfigScheme string
const FeatureFlagsConfigSchemeHttp FeatureFlagsConfigScheme = "http"
const FeatureFlagsConfigSchemeHttps FeatureFlagsConfigScheme = "https"

func (*FeatureFlagsConfigScheme) UnmarshalJSON added in v0.21.0

func (j *FeatureFlagsConfigScheme) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type InMemoryDBConfig

type InMemoryDBConfig struct {
	// Defines the hostname for the In Memory DB server configuration.
	Hostname string `json:"hostname" yaml:"hostname" mapstructure:"hostname"`

	// Defines the password for the In Memory DB server configuration.
	Password *string `json:"password,omitempty" yaml:"password,omitempty" mapstructure:"password,omitempty"`

	// Defines the port for the In Memory DB server configuration.
	Port int `json:"port" yaml:"port" mapstructure:"port"`

	// Defines the sslMode used by the In Memory DB server coniguration
	SslMode *bool `json:"sslMode,omitempty" yaml:"sslMode,omitempty" mapstructure:"sslMode,omitempty"`

	// Defines the username for the In Memory DB server configuration.
	Username *string `json:"username,omitempty" yaml:"username,omitempty" mapstructure:"username,omitempty"`
}

In Memory DB Configuration

func (*InMemoryDBConfig) UnmarshalJSON

func (j *InMemoryDBConfig) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type KafkaConfig

type KafkaConfig struct {
	// Defines the brokers the app should connect to for Kafka services.
	Brokers []BrokerConfig `json:"brokers" yaml:"brokers" mapstructure:"brokers"`

	// Defines a list of the topic configurations available to the application.
	Topics []TopicConfig `json:"topics" yaml:"topics" mapstructure:"topics"`
}

Kafka Configuration

func (*KafkaConfig) UnmarshalJSON

func (j *KafkaConfig) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type KafkaSASLConfig

type KafkaSASLConfig struct {
	// Broker SASL password
	Password *string `json:"password,omitempty" yaml:"password,omitempty" mapstructure:"password,omitempty"`

	// Broker SASL mechanism, expect: SCRAM-SHA-512
	SaslMechanism *string `json:"saslMechanism,omitempty" yaml:"saslMechanism,omitempty" mapstructure:"saslMechanism,omitempty"`

	// Broker security protocol, expect one of either: SASL_SSL, SSL. DEPRECATED, use
	// the top level securityProtocol field instead
	SecurityProtocol *string `json:"securityProtocol,omitempty" yaml:"securityProtocol,omitempty" mapstructure:"securityProtocol,omitempty"`

	// Broker SASL username
	Username *string `json:"username,omitempty" yaml:"username,omitempty" mapstructure:"username,omitempty"`
}

SASL Configuration for Kafka

type LoggingConfig

type LoggingConfig struct {
	// Cloudwatch corresponds to the JSON schema field "cloudwatch".
	Cloudwatch *CloudWatchConfig `json:"cloudwatch,omitempty" yaml:"cloudwatch,omitempty" mapstructure:"cloudwatch,omitempty"`

	// Defines the type of logging configuration
	Type string `json:"type" yaml:"type" mapstructure:"type"`
}

Logging Configuration

func (*LoggingConfig) UnmarshalJSON

func (j *LoggingConfig) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ObjectStoreBucket

type ObjectStoreBucket struct {
	// Defines the access key for specificed bucket.
	AccessKey *string `json:"accessKey,omitempty" yaml:"accessKey,omitempty" mapstructure:"accessKey,omitempty"`

	// Defines the endpoint for the Object Storage server configuration.
	Endpoint *string `json:"endpoint,omitempty" yaml:"endpoint,omitempty" mapstructure:"endpoint,omitempty"`

	// The actual name of the bucket being accessed.
	Name string `json:"name" yaml:"name" mapstructure:"name"`

	// Defines the region for the specified bucket.
	Region *string `json:"region,omitempty" yaml:"region,omitempty" mapstructure:"region,omitempty"`

	// The name that was requested for the bucket in the ClowdApp.
	RequestedName string `json:"requestedName" yaml:"requestedName" mapstructure:"requestedName"`

	// Defines the secret key for the specified bucket.
	SecretKey *string `json:"secretKey,omitempty" yaml:"secretKey,omitempty" mapstructure:"secretKey,omitempty"`

	// Details if the Object Server uses TLS.
	Tls *bool `json:"tls,omitempty" yaml:"tls,omitempty" mapstructure:"tls,omitempty"`
}

Object Storage Bucket

func (*ObjectStoreBucket) UnmarshalJSON

func (j *ObjectStoreBucket) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ObjectStoreConfig

type ObjectStoreConfig struct {
	// Defines the access key for the Object Storage server configuration.
	AccessKey *string `json:"accessKey,omitempty" yaml:"accessKey,omitempty" mapstructure:"accessKey,omitempty"`

	// Buckets corresponds to the JSON schema field "buckets".
	Buckets []ObjectStoreBucket `json:"buckets,omitempty" yaml:"buckets,omitempty" mapstructure:"buckets,omitempty"`

	// Defines the hostname for the Object Storage server configuration.
	Hostname string `json:"hostname" yaml:"hostname" mapstructure:"hostname"`

	// Defines the port for the Object Storage server configuration.
	Port int `json:"port" yaml:"port" mapstructure:"port"`

	// Defines the secret key for the Object Storage server configuration.
	SecretKey *string `json:"secretKey,omitempty" yaml:"secretKey,omitempty" mapstructure:"secretKey,omitempty"`

	// Details if the Object Server uses TLS.
	Tls bool `json:"tls" yaml:"tls" mapstructure:"tls"`
}

Object Storage Configuration

func (*ObjectStoreConfig) UnmarshalJSON

func (j *ObjectStoreConfig) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PrivateDependencyEndpoint

type PrivateDependencyEndpoint struct {
	// The app name of the ClowdApp hosting the service.
	App string `json:"app" yaml:"app" mapstructure:"app"`

	// The hostname of the dependent service.
	Hostname string `json:"hostname" yaml:"hostname" mapstructure:"hostname"`

	// The PodSpec name of the dependent service inside the ClowdApp.
	Name string `json:"name" yaml:"name" mapstructure:"name"`

	// The port of the dependent service.
	Port int `json:"port" yaml:"port" mapstructure:"port"`

	// The TLS port of the dependent service.
	TlsPort *int `json:"tlsPort,omitempty" yaml:"tlsPort,omitempty" mapstructure:"tlsPort,omitempty"`
}

Dependent service connection info

func (*PrivateDependencyEndpoint) UnmarshalJSON

func (j *PrivateDependencyEndpoint) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TopicConfig

type TopicConfig struct {
	// The name of the actual topic on the Kafka server.
	Name string `json:"name" yaml:"name" mapstructure:"name"`

	// The name that the app requested in the ClowdApp definition.
	RequestedName string `json:"requestedName" yaml:"requestedName" mapstructure:"requestedName"`
}

Topic Configuration

func (*TopicConfig) UnmarshalJSON

func (j *TopicConfig) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

Jump to

Keyboard shortcuts

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