mirror of
https://github.com/usual2970/certimate.git
synced 2025-07-25 23:18:33 +00:00
refactor: clean code
This commit is contained in:
@@ -15,14 +15,14 @@ type DeployerOption struct {
|
||||
AccessConfig string `json:"accessConfig"`
|
||||
AccessRecord *domain.Access `json:"-"`
|
||||
DeployConfig domain.DeployConfig `json:"deployConfig"`
|
||||
Certificate applicant.Certificate `json:"certificate"`
|
||||
Certificate applicant.ApplyResult `json:"certificate"`
|
||||
}
|
||||
|
||||
type Deployer interface {
|
||||
Deploy(ctx context.Context) error
|
||||
}
|
||||
|
||||
func GetWithProviderAndOption(provider string, option *DeployerOption) (Deployer, error) {
|
||||
func NewWithProviderAndOption(provider string, option *DeployerOption) (Deployer, error) {
|
||||
deployer, logger, err := createDeployer(domain.DeployProviderType(provider), option.AccessRecord.Config, option.DeployConfig.NodeConfig)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Reference in New Issue
Block a user