{"modulePath":"github.com/https-cert/deploy","version":"v0.5.0","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package server\n\n## Types\n\n```go\ntype ChallengeCache struct {\n\t// contains filtered or unexported fields\n}\n```\nChallengeCache 存储 ACME challenge token 和 response 的映射\n\n```go\nfunc (c *ChallengeCache) CleanExpired()\n```\nCleanExpired 清理所有过期的 challenge\n\n```go\nfunc (c *ChallengeCache) Delete(token string)\n```\nDelete 删除 challenge\n\n```go\nfunc (c *ChallengeCache) Get(token string) (string, bool)\n```\nGet 获取 challenge response\n\n```go\nfunc (c *ChallengeCache) GetDomain(token string) (string, bool)\n```\nGetDomain 获取 token 对应的域名\n\n```go\nfunc (c *ChallengeCache) Set(token, response, domain string, ttl time.Duration)\n```\nSet 设置 challenge，带过期时间\n\n```go\ntype HTTPServer struct {\n\t// contains filtered or unexported fields\n}\n```\nHTTPServer HTTP-01 验证服务器\n\n```go\nfunc NewHTTPServer() *HTTPServer\n```\nNewHTTPServer 创建新的 HTTP 服务器\n\n```go\nfunc (s *HTTPServer) RemoveChallenge(token string)\n```\nRemoveChallenge 移除 challenge\n\n```go\nfunc (s *HTTPServer) SetChallenge(token, response, domain string)\n```\nSetChallenge 设置 challenge token 和 response，10 分钟后过期\n\n```go\nfunc (s *HTTPServer) Start() error\n```\nStart 启动 HTTP 服务器\n\n```go\nfunc (s *HTTPServer) Stop(ctx context.Context) error\n```\nStop 停止 HTTP 服务器\n\n","path":"github.com/https-cert/deploy/internal/server","name":"server","synopsis":"","isRedistributable":true}
