notificationdriver

package
v0.0.0-...-e7c744b Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeGetNotificationsEndpoint

func MakeGetNotificationsEndpoint(service notification.Service) endpoint.Endpoint

MakeGetNotificationsEndpoint returns an endpoint for the matching method of the underlying service.

func RegisterHTTPHandlers

func RegisterHTTPHandlers(endpoints Endpoints, router *mux.Router, options ...kithttp.ServerOption)

RegisterHTTPHandlers mounts all of the service endpoints into an http.Handler.

Types

type Endpoints

type Endpoints struct {
	GetNotifications endpoint.Endpoint
}

Endpoints collects all of the endpoints that compose the underlying service. It's meant to be used as a helper struct, to collect all of the endpoints into a single parameter.

func MakeEndpoints

func MakeEndpoints(service notification.Service, middleware ...endpoint.Middleware) Endpoints

MakeEndpoints returns a(n) Endpoints struct where each endpoint invokes the corresponding method on the provided service.

type GetNotificationsRequest

type GetNotificationsRequest struct{}

GetNotificationsRequest is a request struct for GetNotifications endpoint.

type GetNotificationsResponse

type GetNotificationsResponse struct {
	Notifications notification.Notifications
	Err           error
}

GetNotificationsResponse is a response struct for GetNotifications endpoint.

func (GetNotificationsResponse) Failed

func (r GetNotificationsResponse) Failed() error

Jump to

Keyboard shortcuts

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