builder

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

builder package provide an abstraction of latex online compilers. Such service shoud provide the Builder interface with single method BuildPDF. The Request to send is composed of two parts: - Parameters telling how to build the pdf, - Files containing the (latex, images...) sources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder interface {
	BuildPDF(Request) ([]byte, error)
}

Builder is an interface (service) that can build pdf based on Request.

type Files

type Files map[string][]byte

Files maps (unix) filename to file data. This files are used to build the pdf. The files are part of the request.

func (*Files) String

func (files *Files) String() string

String provides the Stringer interface for Files.

type Parameters

type Parameters struct {
	Log       log.Logger
	Service   string
	Compiler  string
	Force     bool
	Biblio    string
	Output    string
	Main      string
	PipedMain bool
	Patterns  []string
}

Parameters contains all context variables. In the CLI this variables are set by viper.

func (*Parameters) String

func (p *Parameters) String() string

String provides the Stringer interface for Parameters.

type Request

type Request struct {
	Parameters Parameters
	Files      Files
}

Request contains all data necessary to build the pdf.

func (*Request) String

func (r *Request) String() string

String provides the Stringer interface for Request.

Directories

Path Synopsis
laton package provides a builder.Builder interface to latexonline.cc service.
laton package provides a builder.Builder interface to latexonline.cc service.
ytotech package provides a builder.Builder interface to latex.ytotech.com service.
ytotech package provides a builder.Builder interface to latex.ytotech.com service.

Jump to

Keyboard shortcuts

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