2023-07-12 16:55:09 +01:00
|
|
|
package conf
|
2023-04-22 18:11:21 +01:00
|
|
|
|
|
|
|
import (
|
|
|
|
"database/sql"
|
2023-06-19 16:27:36 +01:00
|
|
|
"github.com/MrMelon54/mjwt"
|
2023-04-22 18:11:21 +01:00
|
|
|
errorPages "github.com/MrMelon54/violet/error-pages"
|
|
|
|
"github.com/MrMelon54/violet/favicons"
|
2023-04-24 15:36:21 +01:00
|
|
|
"github.com/MrMelon54/violet/router"
|
2023-07-12 16:55:09 +01:00
|
|
|
"github.com/MrMelon54/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
|
|
|
}
|