rest

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(m model.MatcherService)

Run creates and runs the HTTP API service of gnmatcher.

Types

type MatcherREST

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

MatchMatcherREST implements MatcherService interface.

func NewMatcherREST

func NewMatcherREST(gnm *gnmatcher.GNMatcher, port int) MatcherREST

NewMNewMatcherREST is a constructor for MatchREST.

func (MatcherREST) GetPort

func (mr MatcherREST) GetPort() int

GetPort returns port number to the service.

func (MatcherREST) GetVersion

func (mr MatcherREST) GetVersion() model.Version

GetVersion returns version number and build timestamp of gnmatcher.

func (MatcherREST) MatchAry

func (mr MatcherREST) MatchAry(names []string) []*model.Match

MatchAry takes a list of strings and matches them to known scientific names.

func (MatcherREST) Ping

func (mr MatcherREST) Ping() model.Pong

Ping returns "pong" message if connection to the service did succed.

Jump to

Keyboard shortcuts

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