server

package
v0.0.0-...-17eb709 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RoutesHandler

type RoutesHandler interface {
	ListVersions(w http.ResponseWriter, r *http.Request)
	ListPayments(w http.ResponseWriter, r *http.Request)
	CreatePayment(w http.ResponseWriter, r *http.Request)
	FetchPayment(w http.ResponseWriter, r *http.Request)
	UpdatePayment(w http.ResponseWriter, r *http.Request)
	DeletePayment(w http.ResponseWriter, r *http.Request)
	DumpPayment(w http.ResponseWriter, r *http.Request)
}

type Server

type Server struct {
	Router *chi.Mux
	Port   int
	Nats   f3nats.NatsConn
	// contains filtered or unexported fields
}

func NewServer

func NewServer(options ...func(s *Server) error) (*Server, error)

NewServer returns a valid Server.

func (*Server) CreatePayment

func (s *Server) CreatePayment(w http.ResponseWriter, r *http.Request)

func (*Server) DeletePayment

func (s *Server) DeletePayment(w http.ResponseWriter, r *http.Request)

func (*Server) DumpPayment

func (s *Server) DumpPayment(w http.ResponseWriter, r *http.Request)

func (*Server) FetchPayment

func (s *Server) FetchPayment(w http.ResponseWriter, r *http.Request)

func (*Server) ListPayments

func (s *Server) ListPayments(w http.ResponseWriter, r *http.Request)

func (*Server) ListVersions

func (s *Server) ListVersions(w http.ResponseWriter, r *http.Request)

func (*Server) Start

func (s *Server) Start() error

Start creates the routes and starts serving traffic.

func (*Server) UpdatePayment

func (s *Server) UpdatePayment(w http.ResponseWriter, r *http.Request)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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