package cert

import "github.com/uozi-tech/cosy"

var (
	e                                    = cosy.NewErrorScope("cert")
	ErrCertModelFilenameEmpty            = e.New(50001, "filename is empty")
	ErrCertPathIsNotUnderTheNginxConfDir = e.New(50002, "cert path is not under the nginx conf dir")
	ErrCertDecode                        = e.New(50003, "certificate decode error")
	ErrCertParse                         = e.New(50004, "certificate parse error")
	ErrPayloadResourceIsNil              = e.New(50005, "payload resource is nil")
	ErrPathIsNotUnderTheNginxConfDir     = e.New(50006, "path: {0} is not under the nginx conf dir: {1}")
	ErrCertPathIsEmpty                   = e.New(50007, "certificate path is empty")
	ErrGetACMEUser                       = e.New(50008, "get acme user error: {0}")
	ErrNewTransport                      = e.New(50009, "new transport error: {0}")
	ErrNewLegoClient                     = e.New(50010, "new lego client error: {0}")
	ErrGetDNSCredential                  = e.New(50011, "get dns credential error: {0}")
	ErrProviderNotFound                  = e.New(50012, "provider not found: {0}")
	ErrSetEnv                            = e.New(50013, "set env error: {0}")
	ErrNewDNSChallengeProvider           = e.New(50014, "new dns challenge provider error: {0}")
	ErrEnvironmentConfigurationIsEmpty   = e.New(50015, "environment configuration is empty")
	ErrChallengeError                    = e.New(50016, "challenge error: {0}")
	ErrSetEnvFlagToDisableLegoCNAME      = e.New(50017, "set env flag to disable lego CNAME support error: {0}")
	ErrRenewCert                         = e.New(50018, "renew cert error: {0}")
	ErrMakeCertificateDir                = e.New(50019, "make certificate dir error: {0}")
	ErrWriteFullchainCer                 = e.New(50020, "write fullchain.cer error: {0}")
	ErrWritePrivateKey                   = e.New(50021, "write private.key error: {0}")
	ErrObtainCert                        = e.New(50022, "obtain cert error: {0}")
	ErrRevokeCert                        = e.New(50023, "revoke cert error: {0}")
	ErrNoCertificateAvailable            = e.New(50031, "no certificate available")
)
