consumer

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2022 License: MIT Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeCreateEventEndpoint added in v0.2.1

func MakeCreateEventEndpoint(svc Service) endpoint.Endpoint

func MakeListEventsEndpoint added in v0.2.1

func MakeListEventsEndpoint(svc Service) endpoint.Endpoint

func NewHTTPHandler added in v0.2.1

func NewHTTPHandler(endpoints Endpoints) http.Handler

func NewKafkaHandler added in v0.2.1

func NewKafkaHandler(e endpoint.Endpoint) kafka.Handler

Types

type CreateEventRequest added in v0.2.1

type CreateEventRequest struct {
	Payload *domain.Event
}

type CreateEventResponse added in v0.2.1

type CreateEventResponse struct {
}

type Endpoints added in v0.2.1

type Endpoints struct {
	CreateEventEndpoint endpoint.Endpoint
	ListEventsEndpoint  endpoint.Endpoint
}

type ListEventsRequest added in v0.2.1

type ListEventsRequest struct {
}

type ListEventsResponse added in v0.2.1

type ListEventsResponse struct {
	Results []domain.Event
}

type Service

type Service interface {
	Create(ctx context.Context, e domain.Event) error
	List(ctx context.Context) ([]domain.Event, error)
}

type StorageService added in v0.2.1

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

func NewStorageService added in v0.2.1

func NewStorageService(logger log.Logger) (*StorageService, error)

func (*StorageService) Create added in v0.2.1

func (svc *StorageService) Create(_ context.Context, e domain.Event) error

func (*StorageService) List added in v0.2.1

func (svc *StorageService) List(_ context.Context) ([]domain.Event, error)

Jump to

Keyboard shortcuts

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