Documentation ¶
Overview ¶
Package gensign contains the concrete functions to process user requests and to generate CSRs.
Index ¶
- func ExportGensignRunMetric(ctx context.Context, runErr error)
- func ExportPanicMetric(ctx context.Context, _ *csr.ReqParam, msg string)
- func IsErrorOfType(err interface{}, typ ErrorType) bool
- func Run(ctx context.Context, params *csr.ReqParam, handlers []Handler, ...) (err error)
- type CreateHandler
- type Error
- type ErrorType
- type Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportGensignRunMetric ¶ added in v0.0.17
ExportGensignRunMetric exports a gensign run metric to the oTel meter.
func ExportPanicMetric ¶ added in v0.0.17
ExportPanicMetric exports a panic metric to the oTel meter.
func IsErrorOfType ¶
IsErrorOfType returns true if the error matches to the given error type.
Types ¶
type CreateHandler ¶
CreateHandler is the interface function to initialize Handler.
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error defines the format of an error coming from gensign handlers.
func NewErrWithMsg ¶ added in v0.0.17
NewErrWithMsg returns a new Error with a message.
func NewErrorWithMsg ¶
NewErrorWithMsg returns a new Error with a message.
type ErrorType ¶
type ErrorType uint8
ErrorType specifies possible error types returned from CA.
const ( // Unknown indicates the type of the error is unknown. Unknown ErrorType // HandlerDisabled indicates the handler is disabled (by config). HandlerDisabled // HandlerAuthN indicates the handler fails with authentication. HandlerAuthN // InvalidParams indicates the request parameter is invalid. InvalidParams // HandlerGenCSRErr indicates the handler fails to generate a certificate request. HandlerGenCSRErr // HandlerConfErr indicates the handler fails to parse the handler config. HandlerConfErr // AllAuthFailed indicates all handler's authentications failed. AllAuthFailed // SignerSignErr indicates the signer fails to sign the certificate. SignerSignErr // AgentOpCertErr indicates the agent fails to operate the certificate. AgentOpCertErr // Panic indicates a panic raised from the handler. Panic )
Click to show internal directories.
Click to hide internal directories.