pkladapter

package module
v0.0.0-...-5b5eecd Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

README

Pkl Config Adapter for Caddy

This plugin allows you to use Pkl to configure Caddy.

REQUIREMENTS: This package uses Apple's official Go bindings, which spawns a child process, so the pkl command must be installed on your system.

Install

Install with xcaddy.

xcaddy build \
    --with github.com/caddyserver/pkl-adapter

Usage

Specify with the --adapter flag for caddy run.

caddy run --config /path/to/pkl/config.pkl --adapter pkl

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct{}

Adapter adapts Pkl to Caddy JSON.

func (Adapter) Adapt

func (a Adapter) Adapt(body []byte, options map[string]interface{}) (result []byte, warnings []caddyconfig.Warning, err error)

Adapt converts the Pkl config in body to Caddy JSON.

Jump to

Keyboard shortcuts

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