Documentation ¶
Index ¶
- func NewError(err error, status int, message string) error
- type ClientError
- type Error
- type Server
- func (s *Server) Close() error
- func (s *Server) ConsumeAndSendNewsletter(ctx context.Context) error
- func (s *Server) Error(fn appHandler) http.HandlerFunc
- func (s *Server) Open() (err error)
- func (s *Server) Port() int
- func (s *Server) Scheme() string
- func (s *Server) URL() string
- func (s *Server) UseTLS() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientError ¶
type ClientError interface { Error() string Body() ([]byte, error) Headers() (int, map[string]string) }
ClientError is the interface that wraps methods related to error on the client side
type Server ¶
type Server struct { Addr string Domain string SubscriptionService mailbus.SubscriptionService NewsletterService mailbus.NewsletterService QueueService mailbus.QueueService // contains filtered or unexported fields }
Server represents HTTP server
func (*Server) ConsumeAndSendNewsletter ¶
func (*Server) Error ¶
func (s *Server) Error(fn appHandler) http.HandlerFunc
Error parse HTTP error and write to header and body
Click to show internal directories.
Click to hide internal directories.