Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrCertificateNotFound = errors.New("taxpayer's certificate not found")
ErrCertificateNotFound is returned if a certificate with the given ID can't be found.
var ErrCertificateParse = errors.New("taxpayer's certificate not parsable")
ErrCertificateParse is returned if a certificate can't be parsed.
var ErrFSCRConnection = errors.New("bad FSCR connection")
ErrFSCRConnection is returned if an error occurs during the communication with the FSCR servers.
var ErrFSCRResponseParse = errors.New("invalid FSCR response structure")
ErrFSCRResponseParse is returned if an error occurs during the FSCR SOAP response parsing.
var ErrFSCRResponseVerify = errors.New("FSCR response not verified")
ErrFSCRResponseVerify is returned if the response doesn't pass security checks and verifications.
var ErrIDAlreadyExists = errors.New("taxpayer's certificate with the id already exists")
ErrIDAlreadyExists is returned if a certificate with the given ID already exists.
var ErrInvalidCertificatePassword = errors.New("invalid password for the decryption of the taxpayer's certificate")
ErrInvalidCertificatePassword is returned if the given password can't open sealed certificate and private key.
var ErrInvalidTaxpayersCertificate = errors.New("invalid taxpayer's certificate")
ErrInvalidTaxpayersCertificate is returned if an invalid taxpayer's certificate is given.
ErrKeystoreUnavailable is returned if the keystore service can't be reached.
var ErrKeystoreUnexpected = errors.New("unexpected keystore error")
ErrKeystoreUnexpected is returned if an unexpected error occurs.
var ErrMaxTXAttempts = errors.New("request discarded caused by maximum transaction attempts")
ErrMaxTXAttempts is returned if the maximum number of transaction attempts is reached.
var ErrRequestBuild = errors.New("SOAP request to FSCR not completed")
ErrRequestBuild is returned if a SOAP request envelope can't be built.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service interface { Ping(ctx context.Context) error SendSale(ctx context.Context, certID string, pk []byte, trzba *eet.TrzbaType) (*eet.OdpovedType, error) StoreCert(ctx context.Context, certID string, password []byte, pkcsData []byte, pkcsPassword string) error ListCertIDs(ctx context.Context, start, end int64) ([]string, error) UpdateCertID(ctx context.Context, oldID, newID string) error UpdateCertPassword(ctx context.Context, id string, oldPassword, newPassword []byte) error DeleteID(ctx context.Context, id string) error }
Service handles all functionalities provided by the EET Gateway.