server

package
v0.3.1-beta-rc2 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: MIT Imports: 18 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 {
	Auth    auth.AuthorizedKeysStorage
	Signer  Signer
	Address string
	Logger  log.FieldLogger
}

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

func (*Server) Handler

func (s *Server) Handler() (http.Handler, error)

Handler returns new Signatory HTTP API handler

func (*Server) New

func (s *Server) New() (*http.Server, error)

New returns a new http server with Signatory HTTP API handler. See Handler

type Signer

type Signer interface {
	Sign(ctx context.Context, req *signatory.SignRequest) (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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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