rest_api

package
v0.0.0-...-7a1a7bc Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnableToParseFont = errors.New("unable to process font")
View Source
var ErrUnableToPrint = errors.New("unable to print phrase")

Functions

This section is empty.

Types

type Opts

type Opts struct {
	Host      string `short:"b" long:"bind" env:"HOST" default:"0.0.0.0"`
	Port      int    `short:"p" long:"port" env:"PORT" default:"5000"`
	AuthToken string `short:"t" long:"auth-token"`
}

type RestAPIServer

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

func NewRestAPIServer

func NewRestAPIServer(opts Opts, storage storage.FontStorage) (RestAPIServer, error)

func (RestAPIServer) FontNames

func (srv RestAPIServer) FontNames(response http.ResponseWriter, request *http.Request)

func (RestAPIServer) FontUpload

func (srv RestAPIServer) FontUpload(response http.ResponseWriter, request *http.Request)

func (RestAPIServer) Print

func (srv RestAPIServer) Print(response http.ResponseWriter, request *http.Request)

func (RestAPIServer) Run

func (srv RestAPIServer) Run()

Jump to

Keyboard shortcuts

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