messages

package
v0.0.0-...-2eb00bf Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeGetMessageByID

func MakeGetMessageByID(s Service) endpoint.Endpoint

func MakeGetMessages

func MakeGetMessages(s Service) endpoint.Endpoint

func MakeHandler

func MakeHandler(messagesService Service, logger log.Logger) http.Handler

Types

type Endpoints

type Endpoints struct {
	GetMessagesEndpoint    endpoint.Endpoint
	GetMessageByIDEndpoint endpoint.Endpoint
}

func MakeEndpoints

func MakeEndpoints(s Service) Endpoints

type Service

type Service interface {
	GetMessages(context.Context, string) ([]*models.Message, error)
	GetMessageByID(context.Context, string, string) (*models.Message, error)
}

func New

func New(logger log.Logger, repo repos.Repository, mailx mailx.Service) Service

Jump to

Keyboard shortcuts

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