service

package
v0.0.0-...-154307e Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartWebServer

func StartWebServer(data *Data) error

StartWebServer starts the HTTP service and listens for the convert requests

Types

type Data

type Data struct {
	Port int

	Saver FileSaver
	Coder Encoder
	// contains filtered or unexported fields
}

Data is service operation data

type Encoder

type Encoder interface {
	Convert(nameIn string, format string, metadata []string) (string, error)
}

Encoder encodes file, returns file name

type FileSaver

type FileSaver interface {
	Save(name string, reader io.Reader) (string, error)
}

FileSaver saves the file with the provided name

Jump to

Keyboard shortcuts

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