server

package
v0.0.1-beta8 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPServer

type HTTPServer interface {
	ListenAndServe() error
	Shutdown(ctx context.Context) error
}

HTTPServer represents a subset of http.Server methods

type Logging

type Logging struct {
	Logger *log.Logger
}

Logging is a logrus-enabled logging middleware

func (*Logging) Handler

func (l *Logging) Handler(h http.Handler) http.Handler

Handler wraps provided http.Handler with middleware

type ResponseStatusWriter

type ResponseStatusWriter interface {
	http.ResponseWriter
	Status() int
}

ResponseStatusWriter wraps http.ResponseWriter to save HTTP status code

type Server

type Server struct {
	Signer  Signer
	Address string
	Logger  log.FieldLogger
}

Server struct containing the information necessary to run a tezos remote signers

func (*Server) New

func (s *Server) New() HTTPServer

New returns a new http server with registered routes

type Signer

type Signer interface {
	Sign(ctx context.Context, keyHash string, message []byte) (string, error)
	GetPublicKey(ctx context.Context, keyHash string) (*signatory.PublicKey, error)
}

Signer interface representing a Signer (currently implemented by Signatory)

type UtilityServer

type UtilityServer struct {
	Address string
	Health  vault.ReadinessChecker
	Logger  log.FieldLogger
	// contains filtered or unexported fields
}

UtilityServer struct containing the information necessary to run a utility endpoints

func (*UtilityServer) New

func (u *UtilityServer) New() HTTPServer

New returns a new http server with registered routes

Jump to

Keyboard shortcuts

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