mirror of
https://github.com/certimate-go/certimate.git
synced 2026-07-20 21:01:41 +08:00
chore: update command descriptions and comments
This commit is contained in:
parent
15b29a2292
commit
7f6c29da4e
@ -20,7 +20,7 @@ import (
|
||||
func NewInternalCommand(app core.App) *cobra.Command {
|
||||
command := &cobra.Command{
|
||||
Use: "intercmd",
|
||||
Short: "[INTERNAL] Internal dedicated for Certimate",
|
||||
Short: "[RESERVED] PLEASE DO NOT USE!",
|
||||
}
|
||||
|
||||
command.AddCommand(internalCertApplyCommand(app))
|
||||
|
||||
@ -13,7 +13,7 @@ import (
|
||||
func NewVersionCommand(_ core.App) *cobra.Command {
|
||||
command := &cobra.Command{
|
||||
Use: "version",
|
||||
Short: "Print the version information",
|
||||
Short: "Prints version information",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
fmt.Printf("Certimate v%s\n", app.AppVersion)
|
||||
fmt.Printf("Build with %s on %s_%s\n", runtime.Version(), runtime.GOOS, runtime.GOARCH)
|
||||
|
||||
@ -11,7 +11,7 @@ import (
|
||||
func NewWinscCommand(app core.App) *cobra.Command {
|
||||
command := &cobra.Command{
|
||||
Use: "winsc",
|
||||
Short: "Install/Uninstall Windows service (Not supported on non-Windows OS)",
|
||||
Short: "Manages Windows service (Not supported on non-Windows OS)",
|
||||
}
|
||||
|
||||
return command
|
||||
|
||||
@ -23,7 +23,7 @@ const winscName = "certimate"
|
||||
func NewWinscCommand(app core.App) *cobra.Command {
|
||||
command := &cobra.Command{
|
||||
Use: "winsc",
|
||||
Short: "Install/Uninstall Windows service",
|
||||
Short: "Manages Windows service",
|
||||
}
|
||||
|
||||
command.AddCommand(winscInstallCommand(app))
|
||||
|
||||
@ -11,6 +11,7 @@ import (
|
||||
awscfg "github.com/aws/aws-sdk-go-v2/config"
|
||||
awscred "github.com/aws/aws-sdk-go-v2/credentials"
|
||||
awsiam "github.com/aws/aws-sdk-go-v2/service/iam"
|
||||
"github.com/samber/lo"
|
||||
|
||||
"github.com/certimate-go/certimate/pkg/core"
|
||||
xcert "github.com/certimate-go/certimate/pkg/utils/cert"
|
||||
@ -92,11 +93,9 @@ func (c *Certmgr) Upload(ctx context.Context, certPEM, privkeyPEM string) (*Uplo
|
||||
}
|
||||
|
||||
listServerCertificatesReq := &awsiam.ListServerCertificatesInput{
|
||||
Marker: listServerCertificatesMarker,
|
||||
MaxItems: aws.Int32(1000),
|
||||
}
|
||||
if c.config.CertificatePath != "" {
|
||||
listServerCertificatesReq.PathPrefix = aws.String(c.config.CertificatePath)
|
||||
PathPrefix: lo.EmptyableToPtr(c.config.CertificatePath),
|
||||
Marker: listServerCertificatesMarker,
|
||||
MaxItems: aws.Int32(1000),
|
||||
}
|
||||
listServerCertificatesResp, err := c.sdkClient.ListServerCertificates(ctx, listServerCertificatesReq)
|
||||
c.logger.Debug("sdk request 'iam.ListServerCertificates'", slog.Any("request", listServerCertificatesReq), slog.Any("response", listServerCertificatesResp))
|
||||
|
||||
@ -180,9 +180,7 @@ func (d *Deployer) Deploy(ctx context.Context, certPEM, privkeyPEM string) (*Dep
|
||||
Version: lo.ToPtr(wangsuCertVer),
|
||||
},
|
||||
},
|
||||
}
|
||||
if d.config.WebhookId != "" {
|
||||
createDeploymentTaskReq.Webhook = lo.ToPtr(d.config.WebhookId)
|
||||
Webhook: lo.EmptyableToPtr(d.config.WebhookId),
|
||||
}
|
||||
createDeploymentTaskResp, err := d.sdkClient.CreateDeploymentTaskWithContext(ctx, createDeploymentTaskReq)
|
||||
d.logger.Debug("sdk request 'cdnpro.CreateCertificate'", slog.Any("request", createDeploymentTaskReq), slog.Any("response", createDeploymentTaskResp))
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
// A simple SDK client for Matrix (ElementX).
|
||||
// API documentation: https://spec.matrix.org/latest/client-server-api/
|
||||
package matrix
|
||||
|
||||
import (
|
||||
|
||||
Loading…
Reference in New Issue
Block a user