nginx

package
v0.0.0-...-b7a4fd5 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const ID = "nginx"

Variables

This section is empty.

Functions

func InitPlugin

func InitPlugin(c *types.PluginConfig) error

Types

type NginxAPIPublishCert

type NginxAPIPublishCert struct {
	Domain string `json:"domain" validate:"required"`
	Cert   string `json:"cert" validate:"required"`
	Key    string `json:"key" validate:"required"`
}

type NginxLocation

type NginxLocation struct {
	Path  string   `yaml:"path" validate:"required"`
	Proxy string   `yaml:"proxy"`
	Opts  []string `yaml:"opts"`
}

type NginxMeta

type NginxMeta struct {
	OriginCertPath string `yaml:"origin_cert_path" validate:"required"`
	NginxCertPath  string `yaml:"nginx_cert_path" validate:"required"`
	Common         string `yaml:"common" validate:"required"` // Common config
}

type NginxServer

type NginxServer struct {
	ID        string          `yaml:"id" validate:"required"`
	Names     []string        `yaml:"names" validate:"required,min=1"`
	Comment   string          `yaml:"comment" validate:"required"`
	Broken    bool            `yaml:"broken"`
	Locations []NginxLocation `yaml:"locations" validate:"required"`
}

type NginxServerManage

type NginxServerManage struct {
	Domain string    `validate:"required"`
	Server NginxYaml `validate:"required"`
}

type NginxTemplate

type NginxTemplate struct {
	Servers    []NginxServer
	Meta       NginxMeta
	Domain     string
	CertFile   string
	KeyFile    string
	MetaCommon string
}

type NginxYaml

type NginxYaml struct {
	Servers  []NginxServer `yaml:"servers" validate:"required,dive"`
	RealName string        `yaml:"real_name"` // If unset, will use file name
}

Jump to

Keyboard shortcuts

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