ren

package module
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 15 Imported by: 0

README

Logo

Go Report Card Build Status Coverage Status GitHub release GitHub license

About

Ren is a small service that renders SVG templates using URL query data as input.

Documentation

Overview

Package ren implements the business logic layer.

Index

Constants

View Source
const ErrTemplateNotFound = errorx.Error("template not found")

ErrTemplateNotFound occurs when a template cannot be found.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

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

Application represents the application.

func NewApplication

func NewApplication(r Reader, obsvr *observe.Observer) *Application

NewApplication creates an instance of Application.

func (*Application) IsHealthy

func (a *Application) IsHealthy() error

IsHealthy checks the health of the Application.

func (*Application) Render

func (a *Application) Render(ctx context.Context, path string, data map[string]string) ([]byte, error)

Render renders a template with the given data.

type Reader added in v1.3.0

type Reader interface {
	Read(ctx context.Context, path string) (string, error)
}

Reader represents a template Reader.

Directories

Path Synopsis
Package api implements a HTTP api.
Package api implements a HTTP api.
cmd
ren
Package reader implement template readers.
Package reader implement template readers.

Jump to

Keyboard shortcuts

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