rest

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

package rest provides http REST interface to gnmatcher functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(m MatcherService)

Run creates and runs a RESTful API service of gnmatcher. this API is described by OpenAPI schema at https://app.swaggerhub.com/apis/dimus/gnmatcher/1.0.0

Types

type MatcherService

type MatcherService interface {
	// Port returns the port of the service.
	Port() int

	// Ping checks connection to the service.
	Ping() string

	// GNmatcher is the main use-case of the gnmatcher project.
	gnmatcher.GNmatcher

	// Encoder provides serialization/deserialization interface.
	gnfmt.Encoder
}

MatcherService describes remote service of gnmatchter.

func NewMatcherService

func NewMatcherService(gnm gnmatcher.GNmatcher,
	port int, enc gnfmt.Encoder) MatcherService

NewMNewMatcherREST is a constructor for MatchREST.

Jump to

Keyboard shortcuts

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