command

package
v0.0.0-...-fdadb5e Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2025 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

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

type CreateApiKey

type CreateApiKey struct {
	OrgID         string
	Name          string
	EnvironmentID domain.EnvironmentID
	ExpiresAt     *time.Time
}

type CreateApiKeyHandler

type CreateApiKeyHandler struct {
	// contains filtered or unexported fields
}

func NewCreateApiKeyHandler

func NewCreateApiKeyHandler(
	apiKeyRepo domain.ApiKeyRepository,
	envRepo domain.EnvironmentRepository,
) CreateApiKeyHandler

func (CreateApiKeyHandler) Execute

type CreateApplication

type CreateApplication struct {
	Name  string
	EnvID domain.EnvironmentID
}

type CreateApplicationHandler

type CreateApplicationHandler struct {
	// contains filtered or unexported fields
}

func (CreateApplicationHandler) Execute

type CreateEventType

type CreateEventType struct {
	OrgID         iam.OrgID
	Name          string
	Description   string
	Schema        string
	SchemaExample string
}

type CreateEventTypeHandler

type CreateEventTypeHandler struct {
	// contains filtered or unexported fields
}

func (CreateEventTypeHandler) Execute

type DestroyApiKey

type DestroyApiKey struct {
	OrgID string
	ID    domain.ApiKeyID
}

type DestroyApiKeyHandler

type DestroyApiKeyHandler struct {
	// contains filtered or unexported fields
}

func NewDestroyApiKeyHandler

func NewDestroyApiKeyHandler(
	apiKeyRepo domain.ApiKeyRepository,
) DestroyApiKeyHandler

func (DestroyApiKeyHandler) Execute

type EventPublisher

type EventPublisher interface {
	PublishMessageSent(ctx context.Context, e MessageSent) error
}

type MessageSent

type MessageSent struct {
	MessageID  string
	EndpointID string
}

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 SignIn

type SignIn struct {
	Email             iam.Email
	PlainTextPassword string
}

type SignInHandler

type SignInHandler struct {
	// contains filtered or unexported fields
}

func NewSignInHandler

func NewSignInHandler(repo iam.MemberRepository) SignInHandler

func (SignInHandler) Execute

func (c SignInHandler) Execute(ctx context.Context, cmd SignIn) (*iam.Member, error)

type Signup

type Signup struct {
	FirstName string
	LastName  string
	Email     iam.Email
	Password  iam.Password
}

type SignupHandler

type SignupHandler struct {
	// contains filtered or unexported fields
}

func NewSignupHandler

func NewSignupHandler(txProvider TransactionProvider) SignupHandler

func (SignupHandler) Execute

func (c SignupHandler) Execute(ctx context.Context, cmd Signup) error

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
}

Jump to

Keyboard shortcuts

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