caddyfile

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package caddyfile provides API for creating and editing caddyfile

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Path

func Path() string

Path parses corefile path from argument1s or returns default value

Types

type Caddyfile

type Caddyfile interface {
	Scope
	Save() error
}

Caddyfile provides API for creating and editing caddyfile

func NewCaddyfile

func NewCaddyfile(path string) Caddyfile

NewCaddyfile creates new instance of Caddyfile

type Scope

type Scope interface {
	fmt.Stringer
	Write(string) Scope
	WriteScope(string) Scope
	Up() Scope
	HasScope(string) bool
	GetOrCreate(string) Scope
	Records() []fmt.Stringer
	Remove(string)
	Name() string
}

Scope is part of caddyfile, represented as a block of records

Jump to

Keyboard shortcuts

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