cfgfile

package
v8.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 1 more Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const HdrConfigFilePath = "Path"
View Source
const HdrLineComment = "Line-Comment"

Variables

This section is empty.

Functions

func CheckKeyPair

func CheckKeyPair(keyPem []byte, certPem []byte, ds string) error

func GetAllConfigs

func GetAllConfigs(
	toData *t3cutil.ConfigData,
	cfg config.Cfg,
) ([]t3cutil.ATSConfigFile, error)

GetAllConfigs gets all config files for cfg.CacheHostName.

func GetConfigFile

func GetConfigFile(toData *t3cutil.ConfigData, fileInfo atscfg.CfgMeta, hdrCommentTxt string, thiscfg config.Cfg) (string, string, bool, string, []string, error)

GetConfigFile returns the text of the generated config file, the MIME Content Type of the config file, and any error.

func GetSSLCertsAndKeyFiles

func GetSSLCertsAndKeyFiles(toData *t3cutil.ConfigData) ([]t3cutil.ATSConfigFile, error)

func GetVarnishConfigs

func GetVarnishConfigs(toData *t3cutil.ConfigData, cfg config.Cfg) ([]t3cutil.ATSConfigFile, error)

GetVarnishConfigs returns varnish configuration files TODO: add varnishncsa and hitch configs

func Make12MFacts

func Make12MFacts(toData *t3cutil.ConfigData, fileName string, hdrCommentTxt string, cfg config.Cfg) (atscfg.Cfg, error)

func MakeATSDotRules

func MakeATSDotRules(toData *t3cutil.ConfigData, fileName string, hdrCommentTxt string, cfg config.Cfg) (atscfg.Cfg, error)

func MakeAstatsDotConfig

func MakeAstatsDotConfig(toData *t3cutil.ConfigData, fileName string, hdrCommentTxt string, cfg config.Cfg) (atscfg.Cfg, error)

func MakeBGFetchDotConfig

func MakeBGFetchDotConfig(toData *t3cutil.ConfigData, fileName string, hdrCommentTxt string, cfg config.Cfg) (atscfg.Cfg, error)

func MakeCacheDotConfig

func MakeCacheDotConfig(toData *t3cutil.ConfigData, fileName string, hdrCommentTxt string, cfg config.Cfg) (atscfg.Cfg, error)

func MakeChkconfig

func MakeChkconfig(toData *t3cutil.ConfigData, fileName string, hdrCommentTxt string, cfg config.Cfg) (atscfg.Cfg, error)

func MakeConfigFilesList

func MakeConfigFilesList(toData *t3cutil.ConfigData, dir string, atsMajorVersion uint) ([]atscfg.CfgMeta, []string, error)

This file has wrappers that turn lib/go-atscfg Make funcs into ConfigFileFunc types.

We don't want to make lib/go-atscfg functions take a TOData, because then users wanting to generate a single file would have to fetch all kinds of data that file doesn't need, or else pass objects they know it doesn't currently need as nil and risk it crashing if that func is changed to use it in the future.

But it's useful to map filenames to functions for dispatch. Hence these wrappers.

The atsMajorVersion may be 0 to default to the Server Package Parameter.

MakeConfigFilesList returns the list of config files, any warnings, and any error.

func MakeDropQStringDotConfig

func MakeDropQStringDotConfig(toData *t3cutil.ConfigData, fileName string, hdrCommentTxt string, cfg config.Cfg) (atscfg.Cfg, error)

func MakeHeaderRewrite

func MakeHeaderRewrite(toData *t3cutil.ConfigData, fileName string, hdrCommentTxt string, cfg config.Cfg) (atscfg.Cfg, error)

func MakeHostingDotConfig

func MakeHostingDotConfig(toData *t3cutil.ConfigData, fileName string, hdrCommentTxt string, cfg config.Cfg) (atscfg.Cfg, error)

func MakeIPAllowDotConfig

func MakeIPAllowDotConfig(toData *t3cutil.ConfigData, fileName string, hdrCommentTxt string, cfg config.Cfg) (atscfg.Cfg, error)

func MakeIPAllowDotYAML

func MakeIPAllowDotYAML(toData *t3cutil.ConfigData, fileName string, hdrCommentTxt string, cfg config.Cfg) (atscfg.Cfg, error)

func MakeLoggingDotConfig

func MakeLoggingDotConfig(toData *t3cutil.ConfigData, fileName string, hdrCommentTxt string, cfg config.Cfg) (atscfg.Cfg, error)

func MakeLoggingDotYAML

func MakeLoggingDotYAML(toData *t3cutil.ConfigData, fileName string, hdrCommentTxt string, cfg config.Cfg) (atscfg.Cfg, error)

func MakeLogsXMLDotConfig

func MakeLogsXMLDotConfig(toData *t3cutil.ConfigData, fileName string, hdrCommentTxt string, cfg config.Cfg) (atscfg.Cfg, error)

func MakePackages

func MakePackages(toData *t3cutil.ConfigData, fileName string, hdrCommentTxt string, cfg config.Cfg) (atscfg.Cfg, error)

func MakeParentDotConfig

func MakeParentDotConfig(toData *t3cutil.ConfigData, fileName string, hdrCommentTxt string, cfg config.Cfg) (atscfg.Cfg, error)

func MakePluginDotConfig

func MakePluginDotConfig(toData *t3cutil.ConfigData, fileName string, hdrCommentTxt string, cfg config.Cfg) (atscfg.Cfg, error)

func MakeRecordsDotConfig

func MakeRecordsDotConfig(toData *t3cutil.ConfigData, fileName string, hdrCommentTxt string, cfg config.Cfg) (atscfg.Cfg, error)

func MakeRegexRemap

func MakeRegexRemap(toData *t3cutil.ConfigData, fileName string, hdrCommentTxt string, cfg config.Cfg) (atscfg.Cfg, error)

func MakeRegexRevalidateDotConfig

func MakeRegexRevalidateDotConfig(toData *t3cutil.ConfigData, fileName string, hdrCommentTxt string, cfg config.Cfg) (atscfg.Cfg, error)

func MakeRemapDotConfig

func MakeRemapDotConfig(toData *t3cutil.ConfigData, fileName string, hdrCommentTxt string, cfg config.Cfg) (atscfg.Cfg, error)

func MakeSNIDotYAML

func MakeSNIDotYAML(toData *t3cutil.ConfigData, fileName string, hdrCommentTxt string, cfg config.Cfg) (atscfg.Cfg, error)

func MakeSSLMultiCertDotConfig

func MakeSSLMultiCertDotConfig(toData *t3cutil.ConfigData, fileName string, hdrCommentTxt string, cfg config.Cfg) (atscfg.Cfg, error)

func MakeSSLServerNameYAML

func MakeSSLServerNameYAML(toData *t3cutil.ConfigData, fileName string, hdrCommentTxt string, cfg config.Cfg) (atscfg.Cfg, error)

func MakeSetDSCP

func MakeSetDSCP(toData *t3cutil.ConfigData, fileName string, hdrCommentTxt string, cfg config.Cfg) (atscfg.Cfg, error)

func MakeStorageDotConfig

func MakeStorageDotConfig(toData *t3cutil.ConfigData, fileName string, hdrCommentTxt string, cfg config.Cfg) (atscfg.Cfg, error)

func MakeStrategiesDotYAML

func MakeStrategiesDotYAML(toData *t3cutil.ConfigData, fileName string, hdrCommentTxt string, cfg config.Cfg) (atscfg.Cfg, error)

func MakeSysCtlDotConf

func MakeSysCtlDotConf(toData *t3cutil.ConfigData, fileName string, hdrCommentTxt string, cfg config.Cfg) (atscfg.Cfg, error)

func MakeURISigningConfig

func MakeURISigningConfig(toData *t3cutil.ConfigData, fileName string, hdrCommentTxt string, cfg config.Cfg) (atscfg.Cfg, error)

func MakeURLSigConfig

func MakeURLSigConfig(toData *t3cutil.ConfigData, fileName string, hdrCommentTxt string, cfg config.Cfg) (atscfg.Cfg, error)

func MakeUnknownConfig

func MakeUnknownConfig(toData *t3cutil.ConfigData, fileName string, hdrCommentTxt string, cfg config.Cfg) (atscfg.Cfg, error)

func MakeVolumeDotConfig

func MakeVolumeDotConfig(toData *t3cutil.ConfigData, fileName string, hdrCommentTxt string, cfg config.Cfg) (atscfg.Cfg, error)

func WriteConfigs

func WriteConfigs(configs []t3cutil.ATSConfigFile, output io.Writer) error

WriteConfigs writes the given configs as a RFC2046§5.1 MIME multipart/mixed message.

Types

type ConfigFileFunc

type ConfigFileFunc func(toData *t3cutil.ConfigData, fileName string, hdrCommentTxt string, cfg config.Cfg) (atscfg.Cfg, error)

type ConfigFileLiteralFunc

type ConfigFileLiteralFunc struct {
	Name string
	Func ConfigFileFunc
}

type ConfigFilePrefixSuffixFunc

type ConfigFilePrefixSuffixFunc struct {
	Prefix string
	Suffix string
	Func   ConfigFileFunc
}

Jump to

Keyboard shortcuts

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