mail

package
v0.0.0-...-edd07d6 Latest Latest
Warning

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

Go to latest
Published: May 6, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateInput

type CreateInput struct {
	From    string   `json:"from"`
	To      []string `json:"to"`
	Cc      []string `json:"cc"`
	Subject string   `json:"subject"`
	Body    string   `json:"body"`
	HTML    bool     `json:"html"`
}

func (CreateInput) Validate

func (input CreateInput) Validate() error

type CreateOutput

type CreateOutput struct {
	ID        int32     `json:"id"`
	Status    string    `json:"status"`
	CreatedAt time.Time `json:"createdAt"`
}

type GetInput

type GetInput struct {
	ID int32 `param:"id"`
}

func (GetInput) Validate

func (input GetInput) Validate() error

type GetOutput

type GetOutput struct {
	ID        int32     `json:"id"`
	From      string    `json:"from"`
	To        []string  `json:"to"`
	Cc        []string  `json:"cc"`
	Subject   string    `json:"subject"`
	Body      string    `json:"body"`
	HTML      bool      `json:"html"`
	Status    string    `json:"status"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
	RetryAt   time.Time `json:"retryAt"`
	Try       int16     `json:"try"`
}

type Handler

type Handler interface {
	Create(c echo.Context) error
	Get(c echo.Context) error
}

func NewHandler

func NewHandler(repo db.Repository) Handler

type Service

type Service interface {
	Create(ctx context.Context, input CreateInput) (CreateOutput, error)
	Get(ctx context.Context, input GetInput) (GetOutput, error)
}

Jump to

Keyboard shortcuts

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