service

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Middleware

type Middleware func(Service) Service

Middleware describes a service (as opposed to endpoint) middleware.

func LoggingMiddleware

func LoggingMiddleware(logger log.Logger) Middleware

LoggingMiddleware takes a logger as a dependency and returns a ServiceMiddleware.

type Service

type Service interface {
	Generate(ctx context.Context, data string) ([]byte, error)
}

Service describes a service that generates QR Code images.

func New

func New(logger log.Logger) Service

New returns a basic Service with all of the expected middlewares wired in.

func NewService

func NewService() Service

NewService constructs a service

Jump to

Keyboard shortcuts

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