render

package
v3.0.0-alpha.67 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Newline string

Functions

This section is empty.

Types

type Renderer

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

Renderer holds the template set for a given configuration. It provides methods for rendering various output modules.

func NewRenderer

func NewRenderer(collector *collect.Collector, options *flags.GenerateBindingsOptions) *Renderer

NewRenderer initialises a code renderer for the given configuration and data collector.

func (*Renderer) EventCreate

func (renderer *Renderer) EventCreate(w io.Writer, events *collect.EventMap) error

EventCreate renders the given event map to w as event data creation code.

func (*Renderer) EventCreateFile

func (renderer *Renderer) EventCreateFile() string

EventCreateFile returns the standard name of the event data creation file with the appropriate extension.

func (*Renderer) EventData

func (renderer *Renderer) EventData(w io.Writer, events *collect.EventMap) error

EventData renders the given event map to w as an event data table.

func (*Renderer) EventDataFile

func (renderer *Renderer) EventDataFile() string

EventDataFile returns the standard name of the event data definitions file with the appropriate extension.

func (*Renderer) Index

func (renderer *Renderer) Index(w io.Writer, index *collect.PackageIndex) error

Index renders the given package index to w.

func (*Renderer) IndexFile

func (renderer *Renderer) IndexFile() string

IndexFile returns the standard name of a package index file with the appropriate extension.

func (*Renderer) Models

func (renderer *Renderer) Models(w io.Writer, imports *collect.ImportMap, models []*collect.ModelInfo) error

Models renders type definitions for the given list of models.

func (*Renderer) ModelsFile

func (renderer *Renderer) ModelsFile() string

ModelsFile returns the standard name of a models file with the appropriate extension.

func (*Renderer) Service

func (renderer *Renderer) Service(w io.Writer, info *collect.ServiceInfo) error

Service renders binding code for the given service type to w.

func (*Renderer) ServiceFile

func (renderer *Renderer) ServiceFile(name string) string

ServiceFile returns the standard name of a service file for the given struct name, with the appropriate extension.

Jump to

Keyboard shortcuts

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