Versions in this module Expand all Collapse all v0 v0.0.1 Oct 15, 2026 Changes in this version + const DefaultTimeout + const ErrCodeEIC + const ErrCodeEncoding + const ErrCodeProcessing + const ErrCodeSchema + const ErrCodeSignature + const ErrCodeTemporary + const ErrCodeTooLarge + const ErrCodeVerifiedOK + const MinTimeout + var ErrIncorrectPassword = pkcs12.ErrIncorrectPassword + func CheckP12(p12 []byte, password string) (*x509.Certificate, error) + func IsRetryable(err error) bool + func NewUUID() string + type CAError struct + AdditionalInfo string + Code int + Message string + RetryAfter time.Duration + StatusCode int + func (e *CAError) Error() string + func (e *CAError) Temporary() bool + type CAService string + const CAProductionService + const CATestService + const CATrialService + type Dispatcher struct + func NewDispatcher(service Service, p12File, password string, opts ...Option) (*Dispatcher, error) + func NewDispatcherFromP12(service Service, p12 []byte, password string, opts ...Option) (*Dispatcher, error) + func NewDispatcherFromPEM(service Service, certPEM, keyPEM []byte, opts ...Option) (*Dispatcher, error) + func NewDispatcherWithSigner(service Service, cert *x509.Certificate, key crypto.Signer, opts ...Option) (*Dispatcher, error) + func (d *Dispatcher) BuildRequest(r Receipt) (xml []byte, uuid string, err error) + func (d *Dispatcher) Certificate() *x509.Certificate + func (d *Dispatcher) RenewCertificate(ctx context.Context) (*Renewal, error) + func (d *Dispatcher) SendPayment(r Receipt) (*Response, error) + func (d *Dispatcher) SendPaymentContext(ctx context.Context, r Receipt) (*Response, error) + func (d *Dispatcher) UpdateCertificate(cert *x509.Certificate, key crypto.Signer) error + func (d *Dispatcher) UpdateCertificateFromP12(p12 []byte, password string) error + type Error struct + Code int + DatOdmit time.Time + GlobalTransactionID string + Test bool + Text string + UuidZpravy string + func (e *Error) Error() string + func (e *Error) Temporary() bool + type Option func(*Dispatcher) + func WithCAService(s CAService) Option + func WithHTTPClient(c *http.Client) Option + func WithTimeout(t time.Duration) Option + type Receipt struct + CelkTrzba decimal.Decimal + CerpZuct decimal.NullDecimal + DatTrzby time.Time + EicPopl string + EicPoverujiciho string + IdJednotky int + IdPokl string + Opakovane bool + Overeni bool + PoradCis string + PovereniVicePopl bool + UrcenoCerpZuct decimal.NullDecimal + UuidZpravy string + func (r Receipt) RegisterKey() (string, error) + func (r Receipt) UniqueKey() (string, error) + func (r Receipt) Validate() error + type RejectedError struct + Reason string + ReqID string + func (e *RejectedError) Error() string + type Renewal struct + Certificate *x509.Certificate + P12 []byte + Password string + ReqID string + func (r *Renewal) Confirm(ctx context.Context) error + func (r *Renewal) GoString() string + func (r *Renewal) String() string + type Response struct + DatPrij time.Time + GlobalTransactionID string + Pok string + Test bool + UuidZpravy string + Verified bool + Warnings []Warning + type Service string + const PlaygroundService + const ProductionService + type UnexpectedResponseError struct + GlobalTransactionID string + Msg string + StatusCode int + func (e *UnexpectedResponseError) Error() string + type ValidationError struct + Field string + Msg string + Value string + func (e *ValidationError) Error() string + type Warning struct + Code int + Text string