tmpl2pdf

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Spec = conf.SectionSpec{
	{
		Name:        "Server",
		Description: "The address of the kwkhtmltopdf server.",
		Type:        conf.StringType,
		Required:    true,
	},
	{
		Name:        "AllowInsecure",
		Description: "Whether or not insecure TLS server certificates are accepted",
		Type:        conf.BoolType,
	},
}

Functions

func ConvertURLToPDF

func ConvertURLToPDF(ctx context.Context, cli *http.Client, serverURL string, args ...string) (io.ReadCloser, error)

Types

type Config

type Config struct {
	Server        string
	AllowInsecure bool
}

type Creator

type Creator struct {
	BaseURL string
	// contains filtered or unexported fields
}

func NewCreator

func NewCreator(ctx context.Context, baseURL string, cs *runtime.ConfigSchema) (*Creator, error)

func (*Creator) AddToSchema

func (creator *Creator) AddToSchema(schema *runtime.ConfigSchema) error

func (*Creator) LoadConfig

func (creator *Creator) LoadConfig(ctx context.Context)

func (*Creator) NotifyChange

func (creator *Creator) NotifyChange(ctx context.Context, changeType, id string, sec *conf.Section) error

func (*Creator) Render

func (creator *Creator) Render(ctx context.Context, req RenderRequest) (string, error)

func (*Creator) SetupAPI

func (creator *Creator) SetupAPI(grp *echo.Group)

type RenderRequest

type RenderRequest struct {
	Template string
	Vars     interface{}
}

Jump to

Keyboard shortcuts

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