Go API Documentation

No package summary is available.

Package


Tests

Files: 15. Third party imports: 8. Imports from organisation: 1. Tests: 61. Benchmarks: 0.

Constants

const acmeChallengePort = 9081

Vars

Interface guard

var _ caddyfile.Unmarshaler = (*MockDNSProvider)(nil)

Types

MockDNSProvider

MockDNSProvider is a mock DNS provider, for testing config with DNS modules.

type MockDNSProvider struct{}

naiveHTTPSolver

naiveHTTPSolver is a no-op acmez.Solver for example purposes only.

type naiveHTTPSolver struct {
	srv	*http.Server
	logger	*zap.Logger
}

Test functions

TestACMEServerAllowPolicy

References: acme.Account, acme.ChallengeTypeHTTP01, acme.Client, caddytest.NewTester, context.Background, ecdsa.GenerateKey, elliptic.P256, rand.Reader, slog.New, strings.Contains, zap.NewDevelopment, zapslog.NewHandler.

TestACMEServerDenyPolicy

References: acme.Account, acme.ChallengeTypeHTTP01, acme.Client, caddytest.NewTester, context.Background, ecdsa.GenerateKey, elliptic.P256, rand.Reader, slog.New, strings.Contains, zap.NewDevelopment, zapslog.NewHandler.

TestACMEServerDirectory

References: caddytest.NewTester.

TestACMEServerWithDefaults

References: acme.Account, acme.ChallengeTypeHTTP01, acme.Client, caddytest.NewTester, context.Background, ecdsa.GenerateKey, elliptic.P256, rand.Reader, slog.New, zap.NewDevelopment, zapslog.NewHandler.

TestACMEServerWithMismatchedChallenges

References: acme.Account, acme.ChallengeTypeHTTP01, acme.Client, caddytest.NewTester, context.Background, ecdsa.GenerateKey, elliptic.P256, rand.Reader, slog.New, strings.Contains, zapslog.NewHandler.

TestAutoHTTPRedirectsInsertedBeforeUserDefinedCatchAll

References: caddytest.NewTester, http.StatusPermanentRedirect.

TestAutoHTTPRedirectsInsertedBeforeUserDefinedCatchAllWithNoExplicitHTTPSite

References: caddytest.NewTester, http.StatusPermanentRedirect.

TestAutoHTTPRedirectsWithHTTPListenerFirstInAddresses

References: caddytest.NewTester, http.StatusPermanentRedirect.

TestAutoHTTPtoHTTPSRedirectsExplicitPortDifferentFromHTTPSPort

References: caddytest.NewTester, http.StatusPermanentRedirect.

TestAutoHTTPtoHTTPSRedirectsExplicitPortSameAsHTTPSPort

References: caddytest.NewTester, http.StatusPermanentRedirect.

TestAutoHTTPtoHTTPSRedirectsImplicitPort

References: caddytest.NewTester, http.StatusPermanentRedirect.

TestBrowse

References: caddytest.NewTester, http.MethodGet, http.NewRequest.

TestCaddyfileAdaptToJSON

References: caddytest.CompareAdapt, filepath.Separator, fmt.Sprint, os.ReadDir, os.ReadFile, regexp.MustCompile, strings.ReplaceAll, strings.Split, strings.TrimSpace.

TestDefaultSNI

References: caddytest.NewTester.

TestDefaultSNIWithNamedHostAndExplicitIP

References: caddytest.NewTester.

TestDefaultSNIWithPortMappingOnly

References: caddytest.NewTester.

TestDialWithPlaceholderUnix

References: caddytest.NewTester, http.HandlerFunc, http.MethodGet, http.NewRequest, http.Request, http.ResponseWriter, http.Server, net.Listen, os.CreateTemp, os.Remove, runtime.GOOS, runtime.Gosched.

TestDuplicateHosts

References: caddytest.AssertLoadError.

TestH2ToH1ChunkedResponse

References: caddytest.NewTester, context.Background, context.WithTimeout, fmt.Fprint, http.Header, http.Request, http.StatusOK, io.NopCloser, io.Pipe, io.ReadAll, time.Nanosecond, url.URL.

TestH2ToH2CStream

References: caddytest.NewTester, context.Background, context.WithTimeout, fmt.Fprint, http.Header, http.Request, http.StatusOK, io.NopCloser, io.Pipe, io.ReadAll, strings.Contains, time.Nanosecond, url.URL.

TestHTTPRedirectWrapperWithLargeUpload

References: bytes.Buffer, bytes.Equal, bytes.NewReader, http.Request, http.ResponseWriter, http.StatusNoContent, rand.New, rand.NewSource.

TestHandleErrorRange

References: caddytest.NewTester.

TestHandleErrorRangeAndCodes

References: caddytest.NewTester.

TestHandleErrorSimpleCodes

References: caddytest.NewTester.

TestHandleErrorSort

References: caddytest.NewTester.

TestHttpOnlyOnDomainWithSNI

References: caddytest.AssertAdapt.

TestHttpRequestLocalPortPlaceholder

References: caddytest.NewTester.

TestIntercept

References: caddytest.NewTester.

TestIntermediateLifetimeLessThanRoot

References: caddytest.AssertLoadError.

TestInvalidPrefix

References: caddytest.AssertLoadError.

TestInvalidSiteAddressesAsDirectives

References: caddytest.AssertLoadError.

TestLargeHttpRequest

References: http.NewRequest, http.Request, http.ResponseWriter, strings.Repeat.

TestLeafCertLifetimeLessThanIntermediate

References: caddytest.AssertLoadError.

TestLeafCertLoaders

References: caddytest.NewTester.

TestMap

References: bytes.NewBuffer, caddytest.NewTester.

TestMapAsJSON

References: bytes.NewBuffer, caddytest.NewTester.

TestMapRespondWithDefault

References: bytes.NewBuffer, caddytest.NewTester.

TestNonExistingSearch

References: caddytest.NewTester.

TestPartialReplacement

References: caddytest.NewTester.

TestReadCookie

References: caddytest.NewTester, http.Cookie, url.Parse.

TestRedirect

References: caddytest.NewTester.

TestRenameAndOtherOps

References: caddytest.NewTester.

TestReplIndex

References: caddytest.NewTester.

TestReplaceAllOps

References: caddytest.NewTester.

TestReplaceOps

References: caddytest.NewTester.

TestReplaceWithKeyPlaceholder

References: caddytest.NewTester.

TestReplaceWithReplacementPlaceholder

References: caddytest.NewTester.

TestRespond

References: caddytest.NewTester.

TestRespondWithJSON

References: bytes.NewBufferString, caddytest.NewTester.

TestReverseProxyHealthCheck

References: caddytest.NewTester, time.Millisecond, time.Sleep.

TestReverseProxyHealthCheckUnixSocket

References: caddytest.NewTester, fmt.Sprintf, http.HandlerFunc, http.Request, http.ResponseWriter, http.Server, net.Listen, os.CreateTemp, os.Remove, runtime.GOOS, runtime.Gosched, strings.HasPrefix.

TestReverseProxyHealthCheckUnixSocketWithoutPort

References: caddytest.NewTester, fmt.Sprintf, http.HandlerFunc, http.Request, http.ResponseWriter, http.Server, net.Listen, os.CreateTemp, os.Remove, runtime.GOOS, runtime.Gosched, strings.HasPrefix.

TestReverseProxyWithPlaceholderDialAddress

References: caddytest.NewTester, http.MethodGet, http.NewRequest.

TestReverseProxyWithPlaceholderTCPDialAddress

References: caddytest.NewTester, http.MethodGet, http.NewRequest.

TestSRVReverseProxy

References: caddytest.NewTester.

TestSetThenAddQueryParams

References: caddytest.NewTester.

TestSetThenDeleteParams

References: caddytest.NewTester.

TestUriOps

References: caddytest.NewTester.

TestUriOpsBlock

References: caddytest.NewTester.

TestUriReplace

References: caddytest.NewTester.

TestValidPrefix

References: caddytest.AssertAdapt.