render

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: MIT Imports: 19 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArtifactFromObject

func ArtifactFromObject(obj object.Object) (*object.RenderArtifact, bool)

func ConfigForEnv

func ConfigForEnv(env *object.Environment) *object.RenderConfig

func DataURLFromBytes

func DataURLFromBytes(mimeType string, data []byte) string

func IsRenderable

func IsRenderable(obj object.Object) bool

func Metadata

func Metadata(art *object.RenderArtifact) string

func RenderObjectForTerminal

func RenderObjectForTerminal(env *object.Environment, obj object.Object) (string, error)

func RenderResolvedForTerminal

func RenderResolvedForTerminal(res *ResolvedArtifact, cfg *object.RenderConfig, mode string) string

Types

type ResolvedArtifact

type ResolvedArtifact struct {
	Kind       string `json:"kind"`
	SourceType string `json:"source_type"`
	Source     string `json:"source,omitempty"`
	Name       string `json:"name,omitempty"`
	MIME       string `json:"mime,omitempty"`
	Alt        string `json:"alt,omitempty"`
	Width      int64  `json:"width,omitempty"`
	Height     int64  `json:"height,omitempty"`
	Size       int64  `json:"size,omitempty"`
	Content    string `json:"content,omitempty"`
	DataURL    string `json:"data_url,omitempty"`
	Error      string `json:"error,omitempty"`
	Bytes      []byte `json:"-"`
}

Jump to

Keyboard shortcuts

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