Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewErrDestinationValidation ¶
func NewErrDestinationValidation(errors []ValidationErrorDetail) error
Types ¶
type BaseProvider ¶
type BaseProvider struct {
// contains filtered or unexported fields
}
BaseProvider provides common functionality for all destination providers
func NewBaseProvider ¶
func NewBaseProvider(loader *metadata.MetadataLoader, providerType string) (*BaseProvider, error)
NewBaseProvider creates a new base provider with loaded metadata
func (*BaseProvider) Metadata ¶
func (p *BaseProvider) Metadata() *metadata.ProviderMetadata
Metadata returns the provider metadata
func (*BaseProvider) Validate ¶
func (p *BaseProvider) Validate(ctx context.Context, destination *models.Destination) error
Validate performs schema validation using the provider's metadata
type ErrDestinationPublish ¶
type ErrDestinationPublish struct {
Err error
}
func (*ErrDestinationPublish) Error ¶
func (e *ErrDestinationPublish) Error() string
type ErrDestinationValidation ¶
type ErrDestinationValidation struct {
Errors []ValidationErrorDetail `json:"errors"`
}
func (*ErrDestinationValidation) Error ¶
func (e *ErrDestinationValidation) Error() string
type Provider ¶
type Provider interface {
// Metadata returns the metadata for the provider
Metadata() *metadata.ProviderMetadata
// Validate destination configuration and credentials
Validate(ctx context.Context, destination *models.Destination) error
// Publish an event to the destination
Publish(ctx context.Context, destination *models.Destination, event *models.Event) error
}
type Registry ¶
type Registry interface {
RegisterProvider(destinationType string, provider Provider) error
GetProvider(destinationType string) (Provider, error)
RetrieveProviderMetadata(providerType string) (*metadata.ProviderMetadata, error)
ListProviderMetadata() map[string]*metadata.ProviderMetadata
MetadataLoader() *metadata.MetadataLoader
}
func NewRegistry ¶
type ValidationErrorDetail ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
internal/destregistry/metadata/types.go
|
internal/destregistry/metadata/types.go |
Click to show internal directories.
Click to hide internal directories.