dhalladapter

package module
v0.0.0-...-fcdaaf4 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

README

Dhall Config Adapter for Caddy

This Caddy plugin lets you configure Caddy with the Dhall configuration language.

The result of evaluating your Dhall document must be a valid Caddy JSON config.

Config adapter name: dhall

Installation

You can select this plugin on Caddy's download page.

Or, you can plug it in by building Caddy yourself with xcaddy:

$ xcaddy build --with github.com/mholt/dhall-adapter

Usage

Using this config adapter is the same as any other:

$ caddy run --config caddy.dhall --adapter dhall

The key is to specify --adapter dhall on the command line or, if using Caddy's config API, Content-Type: application/dhall.

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 Dhall 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 Dhall config in body to Caddy JSON.

Jump to

Keyboard shortcuts

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