Documentation
¶
Index ¶
- Constants
- type AddEndpoint
- type AddEndpointHandler
- type CallWebhookEndpoint
- type CallWebhookEndpointHandler
- type CreateApiKey
- type CreateApiKeyHandler
- type CreateApplication
- type CreateApplicationHandler
- type CreateEventType
- type CreateEventTypeHandler
- type DestroyApiKey
- type DestroyApiKeyHandler
- type EventPublisher
- type MessageSent
- type SendMessage
- type SendMessageHandler
- type SignIn
- type SignInHandler
- type Signup
- type SignupHandler
- type TransactFunc
- type TransactableAdapters
- type TransactionProvider
Constants ¶
View Source
const (
MessageSentEvent = "MessageSent"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddEndpoint ¶
type AddEndpoint struct { ApplicationID domain.ApplicationID EndpointUrl string Description string EventTypeIDs []domain.EventTypeID }
type AddEndpointHandler ¶
type AddEndpointHandler struct {
// contains filtered or unexported fields
}
func NewAddEndpointHandler ¶
func NewAddEndpointHandler(repo domain.EndpointRepository) AddEndpointHandler
func (AddEndpointHandler) Execute ¶
func (c AddEndpointHandler) Execute(ctx context.Context, cmd AddEndpoint) error
type CallWebhookEndpoint ¶
type CallWebhookEndpoint struct { EndpointID domain.EndpointID MessageID domain.MessageID }
type CallWebhookEndpointHandler ¶
type CallWebhookEndpointHandler struct {
// contains filtered or unexported fields
}
func NewCallWebhookEndpointHandler ¶
func NewCallWebhookEndpointHandler(txProvider TransactionProvider) CallWebhookEndpointHandler
func (CallWebhookEndpointHandler) Execute ¶
func (c CallWebhookEndpointHandler) Execute(ctx context.Context, cmd CallWebhookEndpoint) error
type CreateApiKey ¶
type CreateApiKeyHandler ¶
type CreateApiKeyHandler struct {
// contains filtered or unexported fields
}
func NewCreateApiKeyHandler ¶
func NewCreateApiKeyHandler( apiKeyRepo domain.ApiKeyRepository, envRepo domain.EnvironmentRepository, ) CreateApiKeyHandler
func (CreateApiKeyHandler) Execute ¶
func (c CreateApiKeyHandler) Execute(ctx context.Context, cmd CreateApiKey) (*domain.ApiKey, error)
type CreateApplication ¶
type CreateApplication struct { Name string EnvID domain.EnvironmentID }
type CreateApplicationHandler ¶
type CreateApplicationHandler struct {
// contains filtered or unexported fields
}
func NewCreateApplicationHandler ¶
func NewCreateApplicationHandler( repo domain.ApplicationRepository, ) CreateApplicationHandler
func (CreateApplicationHandler) Execute ¶
func (c CreateApplicationHandler) Execute(ctx context.Context, cmd CreateApplication) (domain.ApplicationID, error)
type CreateEventType ¶
type CreateEventTypeHandler ¶
type CreateEventTypeHandler struct {
// contains filtered or unexported fields
}
func NewCreateEventTypeHandler ¶
func NewCreateEventTypeHandler(repo domain.EventTypeRepository) CreateEventTypeHandler
func (CreateEventTypeHandler) Execute ¶
func (c CreateEventTypeHandler) Execute(ctx context.Context, cmd CreateEventType) (domain.EventTypeID, error)
type DestroyApiKey ¶
type DestroyApiKeyHandler ¶
type DestroyApiKeyHandler struct {
// contains filtered or unexported fields
}
func NewDestroyApiKeyHandler ¶
func NewDestroyApiKeyHandler( apiKeyRepo domain.ApiKeyRepository, ) DestroyApiKeyHandler
func (DestroyApiKeyHandler) Execute ¶
func (c DestroyApiKeyHandler) Execute(ctx context.Context, cmd DestroyApiKey) error
type EventPublisher ¶
type EventPublisher interface {
PublishMessageSent(ctx context.Context, e MessageSent) error
}
type MessageSent ¶
type SendMessage ¶
type SendMessage struct { EventTypeID *domain.EventTypeID Payload string ApplicationID domain.ApplicationID OrgID string }
type SendMessageHandler ¶
type SendMessageHandler struct {
// contains filtered or unexported fields
}
func NewSendMessageHandler ¶
func NewSendMessageHandler(txProvider TransactionProvider, endpointRepo domain.EndpointRepository) SendMessageHandler
func (SendMessageHandler) Execute ¶
func (c SendMessageHandler) Execute(ctx context.Context, cmd SendMessage) error
type SignInHandler ¶
type SignInHandler struct {
// contains filtered or unexported fields
}
func NewSignInHandler ¶
func NewSignInHandler(repo iam.MemberRepository) SignInHandler
type SignupHandler ¶
type SignupHandler struct {
// contains filtered or unexported fields
}
func NewSignupHandler ¶
func NewSignupHandler(txProvider TransactionProvider) SignupHandler
type TransactFunc ¶
type TransactFunc func(adapters TransactableAdapters) error
type TransactableAdapters ¶
type TransactableAdapters struct { EventPublisher EventPublisher MemberRepository iam.MemberRepository OrganizationRepository iam.OrganizationRepository EnvironmentRepository domain.EnvironmentRepository MessageRepository domain.MessageRepository EndpointRepository domain.EndpointRepository }
type TransactionProvider ¶
type TransactionProvider interface {
Transact(ctx context.Context, f TransactFunc) error
}
Click to show internal directories.
Click to hide internal directories.