napodate

package
v0.0.0-...-d0adc60 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeGetEndpoint

func MakeGetEndpoint(srv Service) endpoint.Endpoint

func MakeStatusEndpoint

func MakeStatusEndpoint(srv Service) endpoint.Endpoint

func MakeValidateEndpoint

func MakeValidateEndpoint(srv Service) endpoint.Endpoint

func NewHTTPServer

func NewHTTPServer(ctx context.Context, endpoints Endpoints) http.Handler

Types

type Endpoints

type Endpoints struct {
	StatusEndpoint   endpoint.Endpoint
	GetEndpoint      endpoint.Endpoint
	ValidateEndpoint endpoint.Endpoint
}

func (Endpoints) Get

func (e Endpoints) Get(ctx context.Context) (string, error)

func (Endpoints) Status

func (e Endpoints) Status(ctx context.Context) (string, error)

func (Endpoints) Validate

func (e Endpoints) Validate(ctx context.Context, date string) (bool, error)

type Service

type Service interface {
	Status(ctx context.Context) (string, error)
	Get(ctx context.Context) (string, error)
	Validate(ctx context.Context, date string) (bool, error)
}

func NewService

func NewService() Service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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