Documentation ¶
Index ¶
- func ConvertMetadataToProperties(items []MetadataItem) (map[string]string, error)
- func LookUpEnv(key string) string
- func ParseConfigurationMap(t *testing.T, configMap map[string]interface{})
- type Auth
- type Component
- type ComponentList
- type ComponentSpec
- type DynamicValue
- type MetadataItem
- type SecretKeyRef
- type StandaloneComponents
- type TestComponent
- type TestConfiguration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertMetadataToProperties ¶
func ConvertMetadataToProperties(items []MetadataItem) (map[string]string, error)
func ParseConfigurationMap ¶
Types ¶
type Auth ¶ added in v1.2.0
type Auth struct {
SecretStore string `json:"secretStore"`
}
Auth represents authentication details for the component.
type Component ¶ added in v1.2.0
type Component struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // +optional Spec ComponentSpec `json:"spec,omitempty"` // +optional Auth `json:"auth,omitempty"` // +optional Scopes []string `json:"scopes,omitempty"` }
Component describes an Dapr component type.
func LoadComponents ¶
type ComponentList ¶ added in v1.2.0
type ComponentList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []Component `json:"items"` }
ComponentList is a list of Dapr components.
type ComponentSpec ¶ added in v1.2.0
type ComponentSpec struct { Type string `json:"type"` Version string `json:"version"` // +optional IgnoreErrors bool `json:"ignoreErrors"` Metadata []MetadataItem `json:"metadata"` // +optional InitTimeout string `json:"initTimeout"` }
ComponentSpec is the spec for a component.
type DynamicValue ¶ added in v1.2.0
DynamicValue is a dynamic value struct for the component.metadata pair value.
func (*DynamicValue) String ¶ added in v1.2.0
func (d *DynamicValue) String() string
String returns the string representation of the raw value. If the value is a string, it will be unquoted as the string is guaranteed to be a JSON serialized string.
type MetadataItem ¶ added in v1.2.0
type MetadataItem struct { Name string `json:"name"` // +optional Value DynamicValue `json:"value,omitempty"` // +optional SecretKeyRef SecretKeyRef `json:"secretKeyRef,omitempty"` }
MetadataItem is a name/value pair for a metadata.
type SecretKeyRef ¶ added in v1.2.0
SecretKeyRef is a reference to a secret holding the value for the metadata item. Name is the secret name, and key is the field in the secret.
type StandaloneComponents ¶ added in v1.2.0
type StandaloneComponents struct {
// contains filtered or unexported fields
}
StandaloneComponents loads components in a standalone mode environment.
func NewStandaloneComponents ¶ added in v1.2.0
func NewStandaloneComponents(componentPath string) *StandaloneComponents
NewStandaloneComponents returns a new standalone loader.
func (*StandaloneComponents) LoadComponents ¶ added in v1.2.0
func (s *StandaloneComponents) LoadComponents() ([]Component, error)
LoadComponents loads dapr components from a given directory.
type TestComponent ¶
type TestConfiguration ¶
type TestConfiguration struct { ComponentType string `yaml:"componentType,omitempty"` Components []TestComponent `yaml:"components,omitempty"` }
func NewTestConfiguration ¶
func NewTestConfiguration(configFilepath string) (*TestConfiguration, error)
NewTestConfiguration reads the tests.yml and loads the TestConfiguration.
func (*TestConfiguration) Run ¶
func (tc *TestConfiguration) Run(t *testing.T)