Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterPluginServer(s grpc.ServiceRegistrar, srv PluginServer)
- type CloseRequest
- type CloseResponse
- type DehydratedConfig
- func (*DehydratedConfig) Descriptor() ([]byte, []int)deprecated
- func (x *DehydratedConfig) GetAcceptTerms() bool
- func (x *DehydratedConfig) GetAccountsDir() string
- func (x *DehydratedConfig) GetAlpnDir() string
- func (x *DehydratedConfig) GetApi() string
- func (x *DehydratedConfig) GetAutoCleanup() bool
- func (x *DehydratedConfig) GetBaseDir() string
- func (x *DehydratedConfig) GetCa() string
- func (x *DehydratedConfig) GetCertDir() string
- func (x *DehydratedConfig) GetChainCache() string
- func (x *DehydratedConfig) GetChallengeType() string
- func (x *DehydratedConfig) GetChallengesDir() string
- func (x *DehydratedConfig) GetConfigD() string
- func (x *DehydratedConfig) GetConfigFile() string
- func (x *DehydratedConfig) GetContactEmail() string
- func (x *DehydratedConfig) GetCurlOpts() string
- func (x *DehydratedConfig) GetDomainsDir() string
- func (x *DehydratedConfig) GetDomainsFile() string
- func (x *DehydratedConfig) GetForceRenew() bool
- func (x *DehydratedConfig) GetForceValidation() bool
- func (x *DehydratedConfig) GetFullChain() bool
- func (x *DehydratedConfig) GetGroup() string
- func (x *DehydratedConfig) GetHookChain() bool
- func (x *DehydratedConfig) GetHookScript() string
- func (x *DehydratedConfig) GetIpv4() bool
- func (x *DehydratedConfig) GetIpv6() bool
- func (x *DehydratedConfig) GetKeepGoing() bool
- func (x *DehydratedConfig) GetKeyAlgo() string
- func (x *DehydratedConfig) GetKeySize() int32
- func (x *DehydratedConfig) GetLockFile() string
- func (x *DehydratedConfig) GetNoLock() bool
- func (x *DehydratedConfig) GetOcsp() bool
- func (x *DehydratedConfig) GetOcspDays() int32
- func (x *DehydratedConfig) GetOcspFetch() bool
- func (x *DehydratedConfig) GetOcspMustStaple() bool
- func (x *DehydratedConfig) GetOldCa() string
- func (x *DehydratedConfig) GetOpenssl() string
- func (x *DehydratedConfig) GetOpensslConfig() string
- func (x *DehydratedConfig) GetPreferredChain() string
- func (x *DehydratedConfig) GetPrivateKeyRenew() bool
- func (x *DehydratedConfig) GetPrivateKeyRollover() bool
- func (x *DehydratedConfig) GetRenewDays() int32
- func (x *DehydratedConfig) GetUser() string
- func (x *DehydratedConfig) GetWellKnownDir() string
- func (*DehydratedConfig) ProtoMessage()
- func (x *DehydratedConfig) ProtoReflect() protoreflect.Message
- func (x *DehydratedConfig) Reset()
- func (x *DehydratedConfig) String() string
- type DomainEntry
- func (*DomainEntry) Descriptor() ([]byte, []int)deprecated
- func (x *DomainEntry) GetAlias() string
- func (x *DomainEntry) GetAlternativeNames() []string
- func (x *DomainEntry) GetComment() string
- func (x *DomainEntry) GetDomain() string
- func (x *DomainEntry) GetEnabled() bool
- func (*DomainEntry) ProtoMessage()
- func (x *DomainEntry) ProtoReflect() protoreflect.Message
- func (x *DomainEntry) Reset()
- func (x *DomainEntry) String() string
- type GetMetadataRequest
- func (*GetMetadataRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetMetadataRequest) GetDehydratedConfig() *DehydratedConfig
- func (x *GetMetadataRequest) GetDomainEntry() *DomainEntry
- func (*GetMetadataRequest) ProtoMessage()
- func (x *GetMetadataRequest) ProtoReflect() protoreflect.Message
- func (x *GetMetadataRequest) Reset()
- func (x *GetMetadataRequest) String() string
- type GetMetadataResponse
- func (*GetMetadataResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetMetadataResponse) GetError() string
- func (x *GetMetadataResponse) GetMetadata() map[string]*structpb.Value
- func (*GetMetadataResponse) ProtoMessage()
- func (x *GetMetadataResponse) ProtoReflect() protoreflect.Message
- func (x *GetMetadataResponse) Reset()
- func (x *GetMetadataResponse) String() string
- type InitializeRequest
- func (*InitializeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *InitializeRequest) GetConfig() map[string]*structpb.Value
- func (*InitializeRequest) ProtoMessage()
- func (x *InitializeRequest) ProtoReflect() protoreflect.Message
- func (x *InitializeRequest) Reset()
- func (x *InitializeRequest) String() string
- type InitializeResponse
- type Metadata
- func (mm *Metadata) FromProto(name string, m map[string]*structpb.Value)
- func (mm *Metadata) Get(key string) any
- func (mm *Metadata) GetError() string
- func (mm *Metadata) Set(key string, value any)
- func (mm *Metadata) SetError(err string)
- func (mm *Metadata) SetMap(key string, value any) error
- func (mm *Metadata) ToGetMetadataResponse() (*GetMetadataResponse, error)
- func (mm *Metadata) ToProto() (map[string]*structpb.Value, error)
- type PluginClient
- type PluginConfig
- func (cm *PluginConfig) FromProto(m map[string]*structpb.Value)
- func (cm *PluginConfig) Get(key string) *PluginConfigValue
- func (cm *PluginConfig) GetBool(key string) (bool, error)
- func (cm *PluginConfig) GetFloat(key string) (float64, error)
- func (cm *PluginConfig) GetInt(key string) (int, error)
- func (cm *PluginConfig) GetMap(key string) (map[string]any, error)
- func (cm *PluginConfig) GetString(key string) (string, error)
- func (cm *PluginConfig) GetStringSlice(key string) ([]string, error)
- func (cm *PluginConfig) GetStruct(key string, target any) error
- func (cm *PluginConfig) Set(key string, value any)
- func (cm *PluginConfig) ToProto() (map[string]*structpb.Value, error)
- type PluginConfigValue
- func (cv *PluginConfigValue) GetBool() (bool, error)
- func (cv *PluginConfigValue) GetFloat() (float64, error)
- func (cv *PluginConfigValue) GetInt() (int, error)
- func (cv *PluginConfigValue) GetMap() (map[string]any, error)
- func (cv *PluginConfigValue) GetString() (string, error)
- func (cv *PluginConfigValue) GetStringSlice() ([]string, error)
- func (cv *PluginConfigValue) GetStruct(target any) error
- func (cv *PluginConfigValue) ToProto() (*structpb.Value, error)
- type PluginServer
- type UnimplementedPluginServer
- func (UnimplementedPluginServer) Close(context.Context, *CloseRequest) (*CloseResponse, error)
- func (UnimplementedPluginServer) GetMetadata(context.Context, *GetMetadataRequest) (*GetMetadataResponse, error)
- func (UnimplementedPluginServer) Initialize(context.Context, *InitializeRequest) (*InitializeResponse, error)
- type UnsafePluginServer
Constants ¶
const ( Plugin_Initialize_FullMethodName = "/plugin.Plugin/Initialize" Plugin_GetMetadata_FullMethodName = "/plugin.Plugin/GetMetadata" Plugin_Close_FullMethodName = "/plugin.Plugin/Close" )
Variables ¶
var File_plugin_proto_plugin_proto protoreflect.FileDescriptor
var Plugin_ServiceDesc = grpc.ServiceDesc{ ServiceName: "plugin.Plugin", HandlerType: (*PluginServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Initialize", Handler: _Plugin_Initialize_Handler, }, { MethodName: "GetMetadata", Handler: _Plugin_GetMetadata_Handler, }, { MethodName: "Close", Handler: _Plugin_Close_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "plugin/proto/plugin.proto", }
Plugin_ServiceDesc is the grpc.ServiceDesc for Plugin service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPluginServer ¶
func RegisterPluginServer(s grpc.ServiceRegistrar, srv PluginServer)
Types ¶
type CloseRequest ¶
type CloseRequest struct {
// contains filtered or unexported fields
}
CloseRequest is empty as no data is needed. The plugin should perform cleanup when receiving this request.
func (*CloseRequest) Descriptor
deprecated
func (*CloseRequest) Descriptor() ([]byte, []int)
Deprecated: Use CloseRequest.ProtoReflect.Descriptor instead.
func (*CloseRequest) ProtoMessage ¶
func (*CloseRequest) ProtoMessage()
func (*CloseRequest) ProtoReflect ¶
func (x *CloseRequest) ProtoReflect() protoreflect.Message
func (*CloseRequest) Reset ¶
func (x *CloseRequest) Reset()
func (*CloseRequest) String ¶
func (x *CloseRequest) String() string
type CloseResponse ¶
type CloseResponse struct {
// contains filtered or unexported fields
}
CloseResponse is empty as no data is needed. The plugin should return an error if cleanup fails.
func (*CloseResponse) Descriptor
deprecated
func (*CloseResponse) Descriptor() ([]byte, []int)
Deprecated: Use CloseResponse.ProtoReflect.Descriptor instead.
func (*CloseResponse) ProtoMessage ¶
func (*CloseResponse) ProtoMessage()
func (*CloseResponse) ProtoReflect ¶
func (x *CloseResponse) ProtoReflect() protoreflect.Message
func (*CloseResponse) Reset ¶
func (x *CloseResponse) Reset()
func (*CloseResponse) String ¶
func (x *CloseResponse) String() string
type DehydratedConfig ¶
type DehydratedConfig struct {
// User and group settings for file permissions.
User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
Group string `protobuf:"bytes,2,opt,name=group,proto3" json:"group,omitempty"`
// Base directories for dehydrated operation.
BaseDir string `protobuf:"bytes,3,opt,name=base_dir,json=baseDir,proto3" json:"base_dir,omitempty"` // Root directory for dehydrated.
CertDir string `protobuf:"bytes,4,opt,name=cert_dir,json=certDir,proto3" json:"cert_dir,omitempty"` // Directory for certificates.
DomainsDir string `protobuf:"bytes,5,opt,name=domains_dir,json=domainsDir,proto3" json:"domains_dir,omitempty"` // Directory for domain configurations.
AccountsDir string `protobuf:"bytes,6,opt,name=accounts_dir,json=accountsDir,proto3" json:"accounts_dir,omitempty"` // Directory for ACME account data.
ChallengesDir string `protobuf:"bytes,7,opt,name=challenges_dir,json=challengesDir,proto3" json:"challenges_dir,omitempty"` // Directory for ACME challenges.
ChainCache string `protobuf:"bytes,8,opt,name=chain_cache,json=chainCache,proto3" json:"chain_cache,omitempty"` // Directory for certificate chain cache.
// File paths for dehydrated operation.
DomainsFile string `protobuf:"bytes,9,opt,name=domains_file,json=domainsFile,proto3" json:"domains_file,omitempty"` // Path to the domains.txt file.
ConfigFile string `protobuf:"bytes,10,opt,name=config_file,json=configFile,proto3" json:"config_file,omitempty"` // Path to the dehydrated config file.
HookScript string `protobuf:"bytes,11,opt,name=hook_script,json=hookScript,proto3" json:"hook_script,omitempty"` // Path to the hook script.
LockFile string `protobuf:"bytes,12,opt,name=lock_file,json=lockFile,proto3" json:"lock_file,omitempty"` // Path to the lock file.
// OpenSSL settings for certificate generation.
OpensslConfig string `protobuf:"bytes,13,opt,name=openssl_config,json=opensslConfig,proto3" json:"openssl_config,omitempty"` // Path to OpenSSL config file.
Openssl string `protobuf:"bytes,14,opt,name=openssl,proto3" json:"openssl,omitempty"` // Path to OpenSSL binary.
KeySize int32 `protobuf:"varint,15,opt,name=key_size,json=keySize,proto3" json:"key_size,omitempty"` // RSA key size in bits (e.g., 2048, 4096).
// ACME settings for Let's Encrypt integration.
Ca string `protobuf:"bytes,16,opt,name=ca,proto3" json:"ca,omitempty"` // Certificate Authority URL (e.g., https://acme-v02.api.letsencrypt.org/directory).
OldCa string `protobuf:"bytes,17,opt,name=old_ca,json=oldCa,proto3" json:"old_ca,omitempty"` // Old Certificate Authority URL for migration.
AcceptTerms bool `protobuf:"varint,18,opt,name=accept_terms,json=acceptTerms,proto3" json:"accept_terms,omitempty"` // Whether to accept Let's Encrypt terms of service.
Ipv4 bool `protobuf:"varint,19,opt,name=ipv4,proto3" json:"ipv4,omitempty"` // Whether to use IPv4 for challenges.
Ipv6 bool `protobuf:"varint,20,opt,name=ipv6,proto3" json:"ipv6,omitempty"` // Whether to use IPv6 for challenges.
PreferredChain string `protobuf:"bytes,21,opt,name=preferred_chain,json=preferredChain,proto3" json:"preferred_chain,omitempty"` // Preferred certificate chain (e.g., "ISRG Root X1").
Api string `protobuf:"bytes,22,opt,name=api,proto3" json:"api,omitempty"` // API version to use (e.g., "v2").
// Certificate settings for generation and renewal.
KeyAlgo string `protobuf:"bytes,23,opt,name=key_algo,json=keyAlgo,proto3" json:"key_algo,omitempty"` // Key algorithm (e.g., "rsa", "ecdsa").
RenewDays int32 `protobuf:"varint,24,opt,name=renew_days,json=renewDays,proto3" json:"renew_days,omitempty"` // Days before renewal (e.g., 30).
ForceRenew bool `protobuf:"varint,25,opt,name=force_renew,json=forceRenew,proto3" json:"force_renew,omitempty"` // Whether to force renewal regardless of expiration.
ForceValidation bool `protobuf:"varint,26,opt,name=force_validation,json=forceValidation,proto3" json:"force_validation,omitempty"` // Whether to force domain validation.
PrivateKeyRenew bool `protobuf:"varint,27,opt,name=private_key_renew,json=privateKeyRenew,proto3" json:"private_key_renew,omitempty"` // Whether to renew private keys with certificates.
PrivateKeyRollover bool `protobuf:"varint,28,opt,name=private_key_rollover,json=privateKeyRollover,proto3" json:"private_key_rollover,omitempty"` // Whether to use key rollover for smoother transitions.
// Challenge settings for domain validation.
ChallengeType string `protobuf:"bytes,29,opt,name=challenge_type,json=challengeType,proto3" json:"challenge_type,omitempty"` // Type of challenge to use (e.g., "http-01", "dns-01").
WellKnownDir string `protobuf:"bytes,30,opt,name=well_known_dir,json=wellKnownDir,proto3" json:"well_known_dir,omitempty"` // Directory for HTTP-01 challenges.
AlpnDir string `protobuf:"bytes,31,opt,name=alpn_dir,json=alpnDir,proto3" json:"alpn_dir,omitempty"` // Directory for TLS-ALPN-01 challenges.
HookChain bool `protobuf:"varint,32,opt,name=hook_chain,json=hookChain,proto3" json:"hook_chain,omitempty"` // Whether to chain hook calls for efficiency.
// OCSP settings for certificate status.
OcspMustStaple bool `protobuf:"varint,33,opt,name=ocsp_must_staple,json=ocspMustStaple,proto3" json:"ocsp_must_staple,omitempty"` // Whether to require OCSP stapling (improves security).
OcspFetch bool `protobuf:"varint,34,opt,name=ocsp_fetch,json=ocspFetch,proto3" json:"ocsp_fetch,omitempty"` // Whether to fetch OCSP responses.
OcspDays int32 `protobuf:"varint,35,opt,name=ocsp_days,json=ocspDays,proto3" json:"ocsp_days,omitempty"` // Days to keep OCSP responses (e.g., 7).
// Other settings.
NoLock bool `protobuf:"varint,36,opt,name=no_lock,json=noLock,proto3" json:"no_lock,omitempty"` // Whether to disable file locking (use with caution).
KeepGoing bool `protobuf:"varint,37,opt,name=keep_going,json=keepGoing,proto3" json:"keep_going,omitempty"` // Whether to continue processing on errors.
FullChain bool `protobuf:"varint,38,opt,name=full_chain,json=fullChain,proto3" json:"full_chain,omitempty"` // Whether to include full certificate chain.
Ocsp bool `protobuf:"varint,39,opt,name=ocsp,proto3" json:"ocsp,omitempty"` // Whether to enable OCSP stapling.
AutoCleanup bool `protobuf:"varint,40,opt,name=auto_cleanup,json=autoCleanup,proto3" json:"auto_cleanup,omitempty"` // Whether to automatically clean up old files.
ContactEmail string `protobuf:"bytes,41,opt,name=contact_email,json=contactEmail,proto3" json:"contact_email,omitempty"` // Contact email for Let's Encrypt notifications.
CurlOpts string `protobuf:"bytes,42,opt,name=curl_opts,json=curlOpts,proto3" json:"curl_opts,omitempty"` // Additional curl options for HTTP requests.
ConfigD string `protobuf:"bytes,43,opt,name=config_d,json=configD,proto3" json:"config_d,omitempty"` // Additional config directory for extensions.
// contains filtered or unexported fields
}
DehydratedConfig contains the complete configuration for the dehydrated ACME client. It includes all settings needed to operate the dehydrated script. This configuration is passed to plugins to provide context for their operations.
func (*DehydratedConfig) Descriptor
deprecated
func (*DehydratedConfig) Descriptor() ([]byte, []int)
Deprecated: Use DehydratedConfig.ProtoReflect.Descriptor instead.
func (*DehydratedConfig) GetAcceptTerms ¶
func (x *DehydratedConfig) GetAcceptTerms() bool
func (*DehydratedConfig) GetAccountsDir ¶
func (x *DehydratedConfig) GetAccountsDir() string
func (*DehydratedConfig) GetAlpnDir ¶
func (x *DehydratedConfig) GetAlpnDir() string
func (*DehydratedConfig) GetApi ¶
func (x *DehydratedConfig) GetApi() string
func (*DehydratedConfig) GetAutoCleanup ¶
func (x *DehydratedConfig) GetAutoCleanup() bool
func (*DehydratedConfig) GetBaseDir ¶
func (x *DehydratedConfig) GetBaseDir() string
func (*DehydratedConfig) GetCa ¶
func (x *DehydratedConfig) GetCa() string
func (*DehydratedConfig) GetCertDir ¶
func (x *DehydratedConfig) GetCertDir() string
func (*DehydratedConfig) GetChainCache ¶
func (x *DehydratedConfig) GetChainCache() string
func (*DehydratedConfig) GetChallengeType ¶
func (x *DehydratedConfig) GetChallengeType() string
func (*DehydratedConfig) GetChallengesDir ¶
func (x *DehydratedConfig) GetChallengesDir() string
func (*DehydratedConfig) GetConfigD ¶
func (x *DehydratedConfig) GetConfigD() string
func (*DehydratedConfig) GetConfigFile ¶
func (x *DehydratedConfig) GetConfigFile() string
func (*DehydratedConfig) GetContactEmail ¶
func (x *DehydratedConfig) GetContactEmail() string
func (*DehydratedConfig) GetCurlOpts ¶
func (x *DehydratedConfig) GetCurlOpts() string
func (*DehydratedConfig) GetDomainsDir ¶
func (x *DehydratedConfig) GetDomainsDir() string
func (*DehydratedConfig) GetDomainsFile ¶
func (x *DehydratedConfig) GetDomainsFile() string
func (*DehydratedConfig) GetForceRenew ¶
func (x *DehydratedConfig) GetForceRenew() bool
func (*DehydratedConfig) GetForceValidation ¶
func (x *DehydratedConfig) GetForceValidation() bool
func (*DehydratedConfig) GetFullChain ¶
func (x *DehydratedConfig) GetFullChain() bool
func (*DehydratedConfig) GetGroup ¶
func (x *DehydratedConfig) GetGroup() string
func (*DehydratedConfig) GetHookChain ¶
func (x *DehydratedConfig) GetHookChain() bool
func (*DehydratedConfig) GetHookScript ¶
func (x *DehydratedConfig) GetHookScript() string
func (*DehydratedConfig) GetIpv4 ¶
func (x *DehydratedConfig) GetIpv4() bool
func (*DehydratedConfig) GetIpv6 ¶
func (x *DehydratedConfig) GetIpv6() bool
func (*DehydratedConfig) GetKeepGoing ¶
func (x *DehydratedConfig) GetKeepGoing() bool
func (*DehydratedConfig) GetKeyAlgo ¶
func (x *DehydratedConfig) GetKeyAlgo() string
func (*DehydratedConfig) GetKeySize ¶
func (x *DehydratedConfig) GetKeySize() int32
func (*DehydratedConfig) GetLockFile ¶
func (x *DehydratedConfig) GetLockFile() string
func (*DehydratedConfig) GetNoLock ¶
func (x *DehydratedConfig) GetNoLock() bool
func (*DehydratedConfig) GetOcsp ¶
func (x *DehydratedConfig) GetOcsp() bool
func (*DehydratedConfig) GetOcspDays ¶
func (x *DehydratedConfig) GetOcspDays() int32
func (*DehydratedConfig) GetOcspFetch ¶
func (x *DehydratedConfig) GetOcspFetch() bool
func (*DehydratedConfig) GetOcspMustStaple ¶
func (x *DehydratedConfig) GetOcspMustStaple() bool
func (*DehydratedConfig) GetOldCa ¶
func (x *DehydratedConfig) GetOldCa() string
func (*DehydratedConfig) GetOpenssl ¶
func (x *DehydratedConfig) GetOpenssl() string
func (*DehydratedConfig) GetOpensslConfig ¶
func (x *DehydratedConfig) GetOpensslConfig() string
func (*DehydratedConfig) GetPreferredChain ¶
func (x *DehydratedConfig) GetPreferredChain() string
func (*DehydratedConfig) GetPrivateKeyRenew ¶
func (x *DehydratedConfig) GetPrivateKeyRenew() bool
func (*DehydratedConfig) GetPrivateKeyRollover ¶
func (x *DehydratedConfig) GetPrivateKeyRollover() bool
func (*DehydratedConfig) GetRenewDays ¶
func (x *DehydratedConfig) GetRenewDays() int32
func (*DehydratedConfig) GetUser ¶
func (x *DehydratedConfig) GetUser() string
func (*DehydratedConfig) GetWellKnownDir ¶
func (x *DehydratedConfig) GetWellKnownDir() string
func (*DehydratedConfig) ProtoMessage ¶
func (*DehydratedConfig) ProtoMessage()
func (*DehydratedConfig) ProtoReflect ¶
func (x *DehydratedConfig) ProtoReflect() protoreflect.Message
func (*DehydratedConfig) Reset ¶
func (x *DehydratedConfig) Reset()
func (*DehydratedConfig) String ¶
func (x *DehydratedConfig) String() string
type DomainEntry ¶
type DomainEntry struct {
Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` // Primary domain name (e.g., "example.com").
AlternativeNames []string `protobuf:"bytes,2,rep,name=alternative_names,json=alternativeNames,proto3" json:"alternative_names,omitempty"` // Alternative domain names (e.g., "www.example.com").
Alias string `protobuf:"bytes,3,opt,name=alias,proto3" json:"alias,omitempty"` // Certificate alias for reference.
Enabled bool `protobuf:"varint,4,opt,name=enabled,proto3" json:"enabled,omitempty"` // Whether the domain is enabled for certificate issuance.
Comment string `protobuf:"bytes,5,opt,name=comment,proto3" json:"comment,omitempty"` // Domain comment for documentation.
// contains filtered or unexported fields
}
DomainEntry represents a domain configuration in the dehydrated system. It contains all information about a domain, including its names and metadata.
func (*DomainEntry) Descriptor
deprecated
func (*DomainEntry) Descriptor() ([]byte, []int)
Deprecated: Use DomainEntry.ProtoReflect.Descriptor instead.
func (*DomainEntry) GetAlias ¶
func (x *DomainEntry) GetAlias() string
func (*DomainEntry) GetAlternativeNames ¶
func (x *DomainEntry) GetAlternativeNames() []string
func (*DomainEntry) GetComment ¶
func (x *DomainEntry) GetComment() string
func (*DomainEntry) GetDomain ¶
func (x *DomainEntry) GetDomain() string
func (*DomainEntry) GetEnabled ¶
func (x *DomainEntry) GetEnabled() bool
func (*DomainEntry) ProtoMessage ¶
func (*DomainEntry) ProtoMessage()
func (*DomainEntry) ProtoReflect ¶
func (x *DomainEntry) ProtoReflect() protoreflect.Message
func (*DomainEntry) Reset ¶
func (x *DomainEntry) Reset()
func (*DomainEntry) String ¶
func (x *DomainEntry) String() string
type GetMetadataRequest ¶
type GetMetadataRequest struct {
// The domain object containing all domain information.
DomainEntry *DomainEntry `protobuf:"bytes,1,opt,name=domain_entry,json=domainEntry,proto3" json:"domain_entry,omitempty"`
// Dehydrated configuration for ACME client operation.
// This provides context for the plugin about the dehydrated environment.
DehydratedConfig *DehydratedConfig `protobuf:"bytes,2,opt,name=dehydrated_config,json=dehydratedConfig,proto3" json:"dehydrated_config,omitempty"`
// contains filtered or unexported fields
}
GetMetadataRequest contains the domain entry to get metadata for. It includes all fields from the domain entry that the plugin can use to generate or retrieve metadata.
func (*GetMetadataRequest) Descriptor
deprecated
func (*GetMetadataRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetMetadataRequest.ProtoReflect.Descriptor instead.
func (*GetMetadataRequest) GetDehydratedConfig ¶
func (x *GetMetadataRequest) GetDehydratedConfig() *DehydratedConfig
func (*GetMetadataRequest) GetDomainEntry ¶
func (x *GetMetadataRequest) GetDomainEntry() *DomainEntry
func (*GetMetadataRequest) ProtoMessage ¶
func (*GetMetadataRequest) ProtoMessage()
func (*GetMetadataRequest) ProtoReflect ¶
func (x *GetMetadataRequest) ProtoReflect() protoreflect.Message
func (*GetMetadataRequest) Reset ¶
func (x *GetMetadataRequest) Reset()
func (*GetMetadataRequest) String ¶
func (x *GetMetadataRequest) String() string
type GetMetadataResponse ¶
type GetMetadataResponse struct {
// Metadata key-value pairs to be added to the domain entry.
// Values should be of appropriate types (string, number, boolean, etc.).
Metadata map[string]*structpb.Value `` /* 143-byte string literal not displayed */
// Optional error message if the plugin encountered issues
// but still wants to return partial metadata.
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
// contains filtered or unexported fields
}
GetMetadataResponse contains the metadata for the domain entry. The plugin should return a map of metadata values that will be merged with the existing metadata.
func (*GetMetadataResponse) Descriptor
deprecated
func (*GetMetadataResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetMetadataResponse.ProtoReflect.Descriptor instead.
func (*GetMetadataResponse) GetError ¶
func (x *GetMetadataResponse) GetError() string
func (*GetMetadataResponse) GetMetadata ¶
func (x *GetMetadataResponse) GetMetadata() map[string]*structpb.Value
func (*GetMetadataResponse) ProtoMessage ¶
func (*GetMetadataResponse) ProtoMessage()
func (*GetMetadataResponse) ProtoReflect ¶
func (x *GetMetadataResponse) ProtoReflect() protoreflect.Message
func (*GetMetadataResponse) Reset ¶
func (x *GetMetadataResponse) Reset()
func (*GetMetadataResponse) String ¶
func (x *GetMetadataResponse) String() string
type InitializeRequest ¶
type InitializeRequest struct {
// Plugin-specific configuration as a map of values.
// The structure depends on the plugin implementation.
Config map[string]*structpb.Value `` /* 139-byte string literal not displayed */
// contains filtered or unexported fields
}
InitializeRequest contains the configuration for the plugin. It includes both plugin-specific configuration and dehydrated configuration.
func (*InitializeRequest) Descriptor
deprecated
func (*InitializeRequest) Descriptor() ([]byte, []int)
Deprecated: Use InitializeRequest.ProtoReflect.Descriptor instead.
func (*InitializeRequest) GetConfig ¶
func (x *InitializeRequest) GetConfig() map[string]*structpb.Value
func (*InitializeRequest) ProtoMessage ¶
func (*InitializeRequest) ProtoMessage()
func (*InitializeRequest) ProtoReflect ¶
func (x *InitializeRequest) ProtoReflect() protoreflect.Message
func (*InitializeRequest) Reset ¶
func (x *InitializeRequest) Reset()
func (*InitializeRequest) String ¶
func (x *InitializeRequest) String() string
type InitializeResponse ¶
type InitializeResponse struct {
// contains filtered or unexported fields
}
InitializeResponse is empty as no data is needed. The plugin should return an error if initialization fails.
func (*InitializeResponse) Descriptor
deprecated
func (*InitializeResponse) Descriptor() ([]byte, []int)
Deprecated: Use InitializeResponse.ProtoReflect.Descriptor instead.
func (*InitializeResponse) ProtoMessage ¶
func (*InitializeResponse) ProtoMessage()
func (*InitializeResponse) ProtoReflect ¶
func (x *InitializeResponse) ProtoReflect() protoreflect.Message
func (*InitializeResponse) Reset ¶
func (x *InitializeResponse) Reset()
func (*InitializeResponse) String ¶
func (x *InitializeResponse) String() string
type Metadata ¶
type Metadata struct {
// contains filtered or unexported fields
}
Metadata represents a map of metadata values that can be converted to and from proto values
func (*Metadata) SetMap ¶ added in v0.0.15
SetMap converts the parameter value to a map[string]interface{} using JSON marshaling and sets the result as the value for the given key. If the conversion fails, an error is returned.
func (*Metadata) ToGetMetadataResponse ¶
func (mm *Metadata) ToGetMetadataResponse() (*GetMetadataResponse, error)
ToGetMetadataResponse converts the Metadata to a GetMetadataResponse
type PluginClient ¶
type PluginClient interface {
// Initialize is called when the plugin is loaded.
// It receives the plugin configuration and dehydrated configuration.
// The plugin should perform any necessary setup and validation.
// Returns an error if initialization fails.
Initialize(ctx context.Context, in *InitializeRequest, opts ...grpc.CallOption) (*InitializeResponse, error)
// GetMetadata returns metadata for a domain entry.
// The plugin can enrich the domain entry with additional information
// based on its configuration and capabilities.
// The metadata returned will be merged with the existing metadata.
GetMetadata(ctx context.Context, in *GetMetadataRequest, opts ...grpc.CallOption) (*GetMetadataResponse, error)
// Close is called when the plugin is being unloaded.
// The plugin should perform any necessary cleanup and resource release.
// Returns an error if cleanup fails.
Close(ctx context.Context, in *CloseRequest, opts ...grpc.CallOption) (*CloseResponse, error)
}
PluginClient is the client API for Plugin service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
Plugin service defines the interface for dehydrated-api-go plugins. Plugins can provide additional functionality and metadata for domain entries. This service is implemented by external plugins that communicate via gRPC.
func NewPluginClient ¶
func NewPluginClient(cc grpc.ClientConnInterface) PluginClient
type PluginConfig ¶
type PluginConfig struct {
// contains filtered or unexported fields
}
PluginConfig represents a map of configuration values that can be converted to and from proto values
func NewPluginConfig ¶
func NewPluginConfig() *PluginConfig
NewPluginConfig creates a new PluginConfig
func (*PluginConfig) FromProto ¶
func (cm *PluginConfig) FromProto(m map[string]*structpb.Value)
FromProto populates the PluginConfig from a map of proto.Values, converting each entry to a PluginConfigValue.
func (*PluginConfig) Get ¶
func (cm *PluginConfig) Get(key string) *PluginConfigValue
Get returns a PluginConfigValue for the given key
func (*PluginConfig) GetBool ¶
func (cm *PluginConfig) GetBool(key string) (bool, error)
GetBool returns the value for the given key as a bool
func (*PluginConfig) GetFloat ¶
func (cm *PluginConfig) GetFloat(key string) (float64, error)
GetFloat returns the value for the given key as a float64
func (*PluginConfig) GetInt ¶
func (cm *PluginConfig) GetInt(key string) (int, error)
GetInt returns the value for the given key as an int
func (*PluginConfig) GetMap ¶
func (cm *PluginConfig) GetMap(key string) (map[string]any, error)
GetMap returns the value for the given key as a map[string]interface{}
func (*PluginConfig) GetString ¶
func (cm *PluginConfig) GetString(key string) (string, error)
GetString returns the value for the given key as a string
func (*PluginConfig) GetStringSlice ¶
func (cm *PluginConfig) GetStringSlice(key string) ([]string, error)
GetStringSlice returns the value for the given key as a []string
func (*PluginConfig) GetStruct ¶
func (cm *PluginConfig) GetStruct(key string, target any) error
GetStruct converts the value for the given key to the given struct type
func (*PluginConfig) Set ¶
func (cm *PluginConfig) Set(key string, value any)
Set sets a value for the given key
type PluginConfigValue ¶
type PluginConfigValue struct {
// contains filtered or unexported fields
}
PluginConfigValue represents a configuration value that can be converted to and from proto values
func FromProto ¶
func FromProto(v *structpb.Value) *PluginConfigValue
FromProto converts a proto Value to a PluginConfigValue
func NewConfigValue ¶
func NewConfigValue(v any) *PluginConfigValue
NewConfigValue creates a new PluginConfigValue from a Go value
func (*PluginConfigValue) GetBool ¶
func (cv *PluginConfigValue) GetBool() (bool, error)
GetBool returns the value as a bool
func (*PluginConfigValue) GetFloat ¶
func (cv *PluginConfigValue) GetFloat() (float64, error)
GetFloat returns the value as a float64
func (*PluginConfigValue) GetInt ¶
func (cv *PluginConfigValue) GetInt() (int, error)
GetInt returns the value as an int
func (*PluginConfigValue) GetMap ¶
func (cv *PluginConfigValue) GetMap() (map[string]any, error)
GetMap returns the value as a map[string]interface{}
func (*PluginConfigValue) GetString ¶
func (cv *PluginConfigValue) GetString() (string, error)
GetString returns the value as a string
func (*PluginConfigValue) GetStringSlice ¶
func (cv *PluginConfigValue) GetStringSlice() ([]string, error)
GetStringSlice returns the value as a []string
func (*PluginConfigValue) GetStruct ¶
func (cv *PluginConfigValue) GetStruct(target any) error
GetStruct converts the value to the given struct type
type PluginServer ¶
type PluginServer interface {
// Initialize is called when the plugin is loaded.
// It receives the plugin configuration and dehydrated configuration.
// The plugin should perform any necessary setup and validation.
// Returns an error if initialization fails.
Initialize(context.Context, *InitializeRequest) (*InitializeResponse, error)
// GetMetadata returns metadata for a domain entry.
// The plugin can enrich the domain entry with additional information
// based on its configuration and capabilities.
// The metadata returned will be merged with the existing metadata.
GetMetadata(context.Context, *GetMetadataRequest) (*GetMetadataResponse, error)
// Close is called when the plugin is being unloaded.
// The plugin should perform any necessary cleanup and resource release.
// Returns an error if cleanup fails.
Close(context.Context, *CloseRequest) (*CloseResponse, error)
// contains filtered or unexported methods
}
PluginServer is the server API for Plugin service. All implementations must embed UnimplementedPluginServer for forward compatibility.
Plugin service defines the interface for dehydrated-api-go plugins. Plugins can provide additional functionality and metadata for domain entries. This service is implemented by external plugins that communicate via gRPC.
type UnimplementedPluginServer ¶
type UnimplementedPluginServer struct{}
UnimplementedPluginServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedPluginServer) Close ¶
func (UnimplementedPluginServer) Close(context.Context, *CloseRequest) (*CloseResponse, error)
func (UnimplementedPluginServer) GetMetadata ¶
func (UnimplementedPluginServer) GetMetadata(context.Context, *GetMetadataRequest) (*GetMetadataResponse, error)
func (UnimplementedPluginServer) Initialize ¶
func (UnimplementedPluginServer) Initialize(context.Context, *InitializeRequest) (*InitializeResponse, error)
type UnsafePluginServer ¶
type UnsafePluginServer interface {
// contains filtered or unexported methods
}
UnsafePluginServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PluginServer will result in compilation errors.