Alan Yeung 1 anno fa
parent
commit
42a19b2282
1 ha cambiato i file con 7 aggiunte e 1 eliminazioni
  1. 7 1
      mod/acme/acme.go

+ 7 - 1
mod/acme/acme.go

@@ -25,23 +25,29 @@ import (
 	"imuslab.com/zoraxy/mod/utils"
 	"imuslab.com/zoraxy/mod/utils"
 )
 )
 
 
-// You'll need a user or account type that implements acme.User
+// ACMEUser represents a user in the ACME system.
 type ACMEUser struct {
 type ACMEUser struct {
 	Email        string
 	Email        string
 	Registration *registration.Resource
 	Registration *registration.Resource
 	key          crypto.PrivateKey
 	key          crypto.PrivateKey
 }
 }
 
 
+// GetEmail returns the email of the ACMEUser.
 func (u *ACMEUser) GetEmail() string {
 func (u *ACMEUser) GetEmail() string {
 	return u.Email
 	return u.Email
 }
 }
+
+// GetRegistration returns the registration resource of the ACMEUser.
 func (u ACMEUser) GetRegistration() *registration.Resource {
 func (u ACMEUser) GetRegistration() *registration.Resource {
 	return u.Registration
 	return u.Registration
 }
 }
+
+// GetPrivateKey returns the private key of the ACMEUser.
 func (u *ACMEUser) GetPrivateKey() crypto.PrivateKey {
 func (u *ACMEUser) GetPrivateKey() crypto.PrivateKey {
 	return u.key
 	return u.key
 }
 }
 
 
+// ACMEHandler handles ACME-related operations.
 type ACMEHandler struct {
 type ACMEHandler struct {
 	email      string
 	email      string
 	acmeServer string
 	acmeServer string