printer

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPagePrinter

func NewPagePrinter(w io.Writer, ctx context.Context, static bool, importMap []byte, meta gox.Editor) gox.Printer

func NewResourcePrinter

func NewResourcePrinter(printer gox.Printer) gox.Printer

Types

type HandlerFunc

type HandlerFunc = func(ctx context.Context, w http.ResponseWriter, r *http.Request) bool

type HandlerSimpleFunc

type HandlerSimpleFunc = func(w http.ResponseWriter, r *http.Request)

type PayloadPrinter

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

func NewPayloadPrinter

func NewPayloadPrinter(disableGzip bool) *PayloadPrinter

func (*PayloadPrinter) Finalize

func (b *PayloadPrinter) Finalize()

func (*PayloadPrinter) Payload

func (b *PayloadPrinter) Payload() action.Payload

func (*PayloadPrinter) Release

func (b *PayloadPrinter) Release()

func (*PayloadPrinter) Send

func (b *PayloadPrinter) Send(job gox.Job) error

type Source

type Source interface {
	// Handler serves the resource request.
	Handler() HandlerFunc

	gox.Modify
	// contains filtered or unexported methods
}

Source describes content or a URL that can be attached to HTML resource attributes and, when needed, served by Doors.

type SourceBytes

type SourceBytes []byte

func (SourceBytes) Handler

func (s SourceBytes) Handler() HandlerFunc

func (SourceBytes) Modify

func (s SourceBytes) Modify(_ context.Context, tag string, attrs gox.Attrs) error

func (SourceBytes) StaticEntry

func (s SourceBytes) StaticEntry() resources.StaticEntry

type SourceExternal

type SourceExternal string

func (SourceExternal) Handler

func (s SourceExternal) Handler() HandlerFunc

func (SourceExternal) Modify

func (s SourceExternal) Modify(_ context.Context, tag string, attrs gox.Attrs) error

type SourceFS

type SourceFS struct {
	FS    fs.FS
	Entry string
}

func (SourceFS) Handler

func (s SourceFS) Handler() HandlerFunc

func (SourceFS) Modify

func (s SourceFS) Modify(_ context.Context, tag string, attrs gox.Attrs) error

func (SourceFS) StaticEntry

func (s SourceFS) StaticEntry() resources.StaticEntry

type SourceHook

type SourceHook func(ctx context.Context, w http.ResponseWriter, r *http.Request) bool

func (SourceHook) Handler

func (s SourceHook) Handler() HandlerFunc

func (SourceHook) Modify

func (s SourceHook) Modify(_ context.Context, tag string, attrs gox.Attrs) error

type SourceLocalFS

type SourceLocalFS string

func (SourceLocalFS) Handler

func (s SourceLocalFS) Handler() HandlerFunc

func (SourceLocalFS) Modify

func (s SourceLocalFS) Modify(_ context.Context, tag string, attrs gox.Attrs) error

func (SourceLocalFS) StaticEntry

func (s SourceLocalFS) StaticEntry() resources.StaticEntry

type SourceProxy

type SourceProxy string

func (SourceProxy) Handler

func (s SourceProxy) Handler() HandlerFunc

func (SourceProxy) Modify

func (s SourceProxy) Modify(_ context.Context, tag string, attrs gox.Attrs) error

type SourceStatic

type SourceStatic interface {
	Source
	// StaticEntry returns the underlying static resource description.
	StaticEntry() resources.StaticEntry
}

SourceStatic is a Source that can also be mounted at a stable public path.

type SourceString

type SourceString string

func (SourceString) Handler

func (s SourceString) Handler() HandlerFunc

func (SourceString) Modify

func (s SourceString) Modify(_ context.Context, tag string, attrs gox.Attrs) error

func (SourceString) StaticEntry

func (s SourceString) StaticEntry() resources.StaticEntry

Jump to

Keyboard shortcuts

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