diff --git a/migrations/1739462400_collections_snapshot.go b/migrations/1739462400_collections_snapshot.go index 2768763c..1ec20348 100644 --- a/migrations/1739462400_collections_snapshot.go +++ b/migrations/1739462400_collections_snapshot.go @@ -6,6 +6,7 @@ import ( "github.com/pocketbase/pocketbase/core" m "github.com/pocketbase/pocketbase/migrations" + xcert "github.com/certimate-go/certimate/pkg/utils/cert" ) diff --git a/migrations/tracer.go b/migrations/tracer.go index 04f58e54..113ed08c 100644 --- a/migrations/tracer.go +++ b/migrations/tracer.go @@ -1,4 +1,4 @@ -package migrations +package migrations import ( "fmt" diff --git a/pkg/core/ssl-deployer/providers/jdcloud-live/jdcloud_live.go b/pkg/core/ssl-deployer/providers/jdcloud-live/jdcloud_live.go index 2c24de0f..19e22df0 100644 --- a/pkg/core/ssl-deployer/providers/jdcloud-live/jdcloud_live.go +++ b/pkg/core/ssl-deployer/providers/jdcloud-live/jdcloud_live.go @@ -6,10 +6,10 @@ import ( "fmt" "log/slog" + "github.com/certimate-go/certimate/pkg/core" jdcore "github.com/jdcloud-api/jdcloud-sdk-go/core" jdliveapi "github.com/jdcloud-api/jdcloud-sdk-go/services/live/apis" jdliveclient "github.com/jdcloud-api/jdcloud-sdk-go/services/live/client" - "github.com/certimate-go/certimate/pkg/core" ) type SSLDeployerProviderConfig struct { diff --git a/pkg/core/ssl-deployer/providers/jdcloud-vod/jdcloud_vod.go b/pkg/core/ssl-deployer/providers/jdcloud-vod/jdcloud_vod.go index b82ff15f..c244492f 100644 --- a/pkg/core/ssl-deployer/providers/jdcloud-vod/jdcloud_vod.go +++ b/pkg/core/ssl-deployer/providers/jdcloud-vod/jdcloud_vod.go @@ -8,10 +8,10 @@ import ( "strconv" "time" + "github.com/certimate-go/certimate/pkg/core" jdcore "github.com/jdcloud-api/jdcloud-sdk-go/core" jdvodapi "github.com/jdcloud-api/jdcloud-sdk-go/services/vod/apis" jdvodclient "github.com/jdcloud-api/jdcloud-sdk-go/services/vod/client" - "github.com/certimate-go/certimate/pkg/core" ) type SSLDeployerProviderConfig struct { diff --git a/pkg/core/ssl-manager/providers/tencentcloud-ssl/tencentcloud_ssl.go b/pkg/core/ssl-manager/providers/tencentcloud-ssl/tencentcloud_ssl.go index 78f37d8c..11724028 100644 --- a/pkg/core/ssl-manager/providers/tencentcloud-ssl/tencentcloud_ssl.go +++ b/pkg/core/ssl-manager/providers/tencentcloud-ssl/tencentcloud_ssl.go @@ -6,10 +6,10 @@ import ( "fmt" "log/slog" + "github.com/certimate-go/certimate/pkg/core" "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile" tcssl "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssl/v20191205" - "github.com/certimate-go/certimate/pkg/core" ) type SSLManagerProviderConfig struct { @@ -65,10 +65,8 @@ func (m *SSLManagerProvider) Upload(ctx context.Context, certPEM string, privkey return nil, fmt.Errorf("failed to execute sdk request 'ssl.UploadCertificate': %w", err) } - certId := *uploadCertificateResp.Response.CertificateId return &core.SSLManageUploadResult{ - CertId: certId, - CertName: "", + CertId: *uploadCertificateResp.Response.CertificateId, }, nil } diff --git a/pkg/core/ssl_applicator.go b/pkg/core/ssl_applicator.go index 082167a4..092c28ad 100644 --- a/pkg/core/ssl_applicator.go +++ b/pkg/core/ssl_applicator.go @@ -1,4 +1,4 @@ -package core +package core import ( "github.com/go-acme/lego/v4/challenge" diff --git a/pkg/sdk3rd/ctyun/ao/client.go b/pkg/sdk3rd/ctyun/ao/client.go index 9c6e026d..6e63e531 100644 --- a/pkg/sdk3rd/ctyun/ao/client.go +++ b/pkg/sdk3rd/ctyun/ao/client.go @@ -4,8 +4,8 @@ import ( "fmt" "time" - "github.com/go-resty/resty/v2" "github.com/certimate-go/certimate/pkg/sdk3rd/ctyun/openapi" + "github.com/go-resty/resty/v2" ) const endpoint = "https://accessone-global.ctapi.ctyun.cn" diff --git a/pkg/sdk3rd/ctyun/cdn/client.go b/pkg/sdk3rd/ctyun/cdn/client.go index 88cb2cda..af147095 100644 --- a/pkg/sdk3rd/ctyun/cdn/client.go +++ b/pkg/sdk3rd/ctyun/cdn/client.go @@ -4,8 +4,8 @@ import ( "fmt" "time" - "github.com/go-resty/resty/v2" "github.com/certimate-go/certimate/pkg/sdk3rd/ctyun/openapi" + "github.com/go-resty/resty/v2" ) const endpoint = "https://ctcdn-global.ctapi.ctyun.cn" diff --git a/pkg/sdk3rd/ctyun/cms/client.go b/pkg/sdk3rd/ctyun/cms/client.go index b4994efb..d648c09c 100644 --- a/pkg/sdk3rd/ctyun/cms/client.go +++ b/pkg/sdk3rd/ctyun/cms/client.go @@ -4,8 +4,8 @@ import ( "fmt" "time" - "github.com/go-resty/resty/v2" "github.com/certimate-go/certimate/pkg/sdk3rd/ctyun/openapi" + "github.com/go-resty/resty/v2" ) const endpoint = "https://ccms-global.ctapi.ctyun.cn" diff --git a/pkg/sdk3rd/ctyun/dns/client.go b/pkg/sdk3rd/ctyun/dns/client.go index a9a26c97..def071b6 100644 --- a/pkg/sdk3rd/ctyun/dns/client.go +++ b/pkg/sdk3rd/ctyun/dns/client.go @@ -4,8 +4,8 @@ import ( "fmt" "time" - "github.com/go-resty/resty/v2" "github.com/certimate-go/certimate/pkg/sdk3rd/ctyun/openapi" + "github.com/go-resty/resty/v2" ) const endpoint = "https://smartdns-global.ctapi.ctyun.cn" diff --git a/pkg/sdk3rd/ctyun/elb/client.go b/pkg/sdk3rd/ctyun/elb/client.go index 82317822..f7743318 100644 --- a/pkg/sdk3rd/ctyun/elb/client.go +++ b/pkg/sdk3rd/ctyun/elb/client.go @@ -4,8 +4,8 @@ import ( "fmt" "time" - "github.com/go-resty/resty/v2" "github.com/certimate-go/certimate/pkg/sdk3rd/ctyun/openapi" + "github.com/go-resty/resty/v2" ) const endpoint = "https://ctelb-global.ctapi.ctyun.cn" diff --git a/pkg/sdk3rd/ctyun/icdn/client.go b/pkg/sdk3rd/ctyun/icdn/client.go index 6b427cb3..f8662904 100644 --- a/pkg/sdk3rd/ctyun/icdn/client.go +++ b/pkg/sdk3rd/ctyun/icdn/client.go @@ -4,8 +4,8 @@ import ( "fmt" "time" - "github.com/go-resty/resty/v2" "github.com/certimate-go/certimate/pkg/sdk3rd/ctyun/openapi" + "github.com/go-resty/resty/v2" ) const endpoint = "https://icdn-global.ctapi.ctyun.cn" diff --git a/pkg/sdk3rd/ctyun/lvdn/client.go b/pkg/sdk3rd/ctyun/lvdn/client.go index 606123cc..160e58d8 100644 --- a/pkg/sdk3rd/ctyun/lvdn/client.go +++ b/pkg/sdk3rd/ctyun/lvdn/client.go @@ -4,8 +4,8 @@ import ( "fmt" "time" - "github.com/go-resty/resty/v2" "github.com/certimate-go/certimate/pkg/sdk3rd/ctyun/openapi" + "github.com/go-resty/resty/v2" ) const endpoint = "https://ctlvdn-global.ctapi.ctyun.cn" diff --git a/pkg/utils/http/parser.go b/pkg/utils/http/parser.go index 47c2e693..a3eec9ef 100644 --- a/pkg/utils/http/parser.go +++ b/pkg/utils/http/parser.go @@ -1,4 +1,4 @@ -package http +package http import ( "bufio" diff --git a/pkg/utils/http/transport.go b/pkg/utils/http/transport.go index a36f2d4c..3274cbdf 100644 --- a/pkg/utils/http/transport.go +++ b/pkg/utils/http/transport.go @@ -1,4 +1,4 @@ -package http +package http import ( "net"