rest

package
v1.1.14 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 13 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://apidoc.gnames.org/gnmatcher

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