web

package
v1.14.1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: MIT Imports: 16 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package web provides RESTful API service and a website for gnparser.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTemplate added in v1.1.0

func NewTemplate() (*echoTempl, error)

func Run

func Run(gnps GNparserService)

Run starts the GNparser web service and servies both RESTful API and a website.

Types

type Data

type Data struct {
	Input             string
	Parsed            []parsed.Parsed
	Code              string
	Format            string
	HomePage          bool
	Version           string
	WithDetails       bool
	PreserveDiaereses bool
	CompactAuthors    bool
	FlattenOutput     bool

	// WithCultivars is deprecated by Code field
	WithCultivars bool
}

Data contains information required for web-pages templates.

type GNparserService added in v1.0.3

type GNparserService interface {
	gnparser.GNparser
	// Ping is a method to check if the service is running. Returns "pong".
	Ping() string
	// Port returns the port of the service.
	Port() int
}

GNparserService is an interface that provides functionality for GNparser RESTful service.

func NewGNparserService added in v1.0.3

func NewGNparserService(gnp gnparser.GNparser, port int) GNparserService

NewGNparserService creates a new object that implements GNparserService interface.

Jump to

Keyboard shortcuts

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