violet/servers/conf/conf.go

27 lines
765 B
Go
Raw Normal View History

package conf
2023-04-22 18:11:21 +01:00
import (
"database/sql"
"github.com/1f349/mjwt"
2023-07-22 01:11:47 +01:00
errorPages "github.com/1f349/violet/error-pages"
"github.com/1f349/violet/favicons"
"github.com/1f349/violet/router"
"github.com/1f349/violet/utils"
2023-04-22 18:11:21 +01:00
)
// Conf stores the shared configuration for the API, HTTP and HTTPS servers.
2023-04-22 18:11:21 +01:00
type Conf struct {
ApiListen string // api server listen address
HttpListen string // http server listen address
HttpsListen string // https server listen address
2023-06-04 22:28:48 +01:00
RateLimit uint64 // rate limit per minute
2023-04-22 18:11:21 +01:00
DB *sql.DB
Domains utils.DomainProvider
Acme utils.AcmeChallengeProvider
Certs utils.CertProvider
2023-04-22 18:11:21 +01:00
Favicons *favicons.Favicons
2023-07-01 12:14:44 +01:00
Signer mjwt.Verifier
2023-04-22 18:11:21 +01:00
ErrorPages *errorPages.ErrorPages
Router *router.Manager
2023-04-22 18:11:21 +01:00
}