api

package
v0.0.0-...-1142866 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoContract     = errors.New("no contract to match")
	ErrNoProducerData = errors.New("no producer data")
	ErrContractBreak  = errors.New("contract break")
)

Functions

func NewServer

func NewServer(st store.Store, mm map[string]match.Matcher) *pat.PatternServeMux

NewServer creates a new Contrato Server mux.

Types

type Server

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

Server define the API endpoints for the contract matching calls

func (Server) Commit

func (s Server) Commit(w http.ResponseWriter, req *http.Request)

func (Server) MatchContract

func (s Server) MatchContract(w http.ResponseWriter, req *http.Request)

MatchContract match a single contract and persist if is requested

func (Server) Rollback

func (s Server) Rollback(w http.ResponseWriter, req *http.Request)

func (Server) UpdateProducer

func (s Server) UpdateProducer(w http.ResponseWriter, req *http.Request)

UpdateProducer match a contract among all related contracts and persist if is requested

Jump to

Keyboard shortcuts

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