2023-07-12 16:55:09 +01:00
|
|
|
package conf
|
2023-04-22 18:11:21 +01:00
|
|
|
|
|
|
|
import (
|
|
|
|
"database/sql"
|
2023-10-29 12:55:19 +00:00
|
|
|
"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
|
|
|
)
|
|
|
|
|
2023-04-24 15:36: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 {
|
2023-04-24 15:36:21 +01:00
|
|
|
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
|
2023-07-12 16:55:09 +01:00
|
|
|
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
|
2023-04-24 15:36:21 +01:00
|
|
|
Router *router.Manager
|
2023-04-22 18:11:21 +01:00
|
|
|
}
|