mirror of
https://github.com/certimate-go/certimate.git
synced 2026-09-24 23:10:13 +08:00
chore: 调整目录结构
This commit is contained in:
+5
-5
@@ -12,7 +12,7 @@ import (
|
||||
"github.com/pocketbase/pocketbase/core"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/certimate-go/certimate/internal/certapply"
|
||||
"github.com/certimate-go/certimate/internal/certacme"
|
||||
"github.com/certimate-go/certimate/internal/tools/mproc"
|
||||
)
|
||||
|
||||
@@ -39,12 +39,12 @@ func internalCertApplyCommand(app core.App) *cobra.Command {
|
||||
SilenceUsage: true,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
type InData struct {
|
||||
Account *certapply.ACMEAccount `json:"account,omitempty"`
|
||||
Request *certapply.ObtainCertificateRequest `json:"request,omitempty"`
|
||||
Account *certacme.ACMEAccount `json:"account,omitempty"`
|
||||
Request *certacme.ObtainCertificateRequest `json:"request,omitempty"`
|
||||
}
|
||||
|
||||
type OutData struct {
|
||||
Response *certapply.ObtainCertificateResponse `json:"response"`
|
||||
Response *certacme.ObtainCertificateResponse `json:"response"`
|
||||
}
|
||||
|
||||
mreceiver := mproc.NewReceiver(func(ctx context.Context, params *InData) (*OutData, error) {
|
||||
@@ -60,7 +60,7 @@ func internalCertApplyCommand(app core.App) *cobra.Command {
|
||||
// see: /internal/tools/mproc/sender.go
|
||||
legolog.Logger = log.New(os.Stdout, "", 0)
|
||||
|
||||
client, err := certapply.NewACMEClientWithAccount(params.Account, func(c *lego.Config) error {
|
||||
client, err := certacme.NewACMEClientWithAccount(params.Account, func(c *lego.Config) error {
|
||||
c.UserAgent = "certimate"
|
||||
c.Certificate.KeyType = params.Request.PrivateKeyType
|
||||
return nil
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build !windows
|
||||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package cmd
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build windows
|
||||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
package cmd
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build !windows
|
||||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package cmd
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build windows
|
||||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
package cmd
|
||||
|
||||
Reference in New Issue
Block a user