listener

package module
v0.0.0-...-95526ce Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2020 License: AGPL-3.0 Imports: 9 Imported by: 0

README

open-dispatch-go

A micro webservice service to handle dispatching items for delivery using an experimental cryptographic identity system

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Delivery

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

Delivery represents all the data fields supplied by the client

type HTTPService

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

HTTPService is a HTTP service

func New

func New(port int, staticPath string) (*HTTPService, error)

New returns a new HttpService

func (*HTTPService) CreateHandler

func (h *HTTPService) CreateHandler(response http.ResponseWriter, request *http.Request)

CreateHandler creates new orders

func (*HTTPService) DeleteHandler

func (h *HTTPService) DeleteHandler(response http.ResponseWriter, request *http.Request)

DeleteHandler removes an order

func (*HTTPService) InfoHandler

func (h *HTTPService) InfoHandler(response http.ResponseWriter, request *http.Request)

InfoHandler returns orders by id

func (*HTTPService) Shutdown

func (h *HTTPService) Shutdown()

Shutdown halts the HTTPService and closes all listeners

func (*HTTPService) UpdateHandler

func (h *HTTPService) UpdateHandler(response http.ResponseWriter, request *http.Request)

UpdateHandler updates an order by id

func (*HTTPService) Wait

func (h *HTTPService) Wait()

Wait blocks until Shutdown has been called

type Signature

type Signature interface {
	// Key() returns the serialized public key
	Key() string
	// Signature() returns the serialized signature
	RawSignature() string
	// Verify() validates the signature
	Verify() error
}

Signature is an interfacerepresents a signature over a serialized (JSON) Payload

type SignedDelivery

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

SignedDelivery contains the delivery information and a signature

Directories

Path Synopsis
Package cert provides a cryptographic certicate library.
Package cert provides a cryptographic certicate library.
Package eddsa provides EdDSA (Ed25519) wrappers.
Package eddsa provides EdDSA (Ed25519) wrappers.

Jump to

Keyboard shortcuts

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