gateway

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCertificateNotFound = errors.New("taxpayer's certificate not found")

ErrCertificateNotFound is returned if a certificate with the given ID can't be found.

View Source
var ErrCertificateParse = errors.New("taxpayer's certificate not parsable")

ErrCertificateParse is returned if a certificate can't be parsed.

View Source
var ErrFSCRConnection = errors.New("bad FSCR connection")

ErrFSCRConnection is returned if an error occurs during the communication with the FSCR servers.

View Source
var ErrFSCRResponseParse = errors.New("invalid FSCR response structure")

ErrFSCRResponseParse is returned if an error occurs during the FSCR SOAP response parsing.

View Source
var ErrFSCRResponseVerify = errors.New("FSCR response not verified")

ErrFSCRResponseVerify is returned if the response doesn't pass security checks and verifications.

View Source
var ErrIDAlreadyExists = errors.New("taxpayer's certificate with the id already exists")

ErrIDAlreadyExists is returned if a certificate with the given ID already exists.

View Source
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.

View Source
var ErrInvalidTaxpayersCertificate = errors.New("invalid taxpayer's certificate")

ErrInvalidTaxpayersCertificate is returned if an invalid taxpayer's certificate is given.

View Source
var ErrKeystoreUnavailable = errors.New("keystore service unavailable")

ErrKeystoreUnavailable is returned if the keystore service can't be reached.

View Source
var ErrKeystoreUnexpected = errors.New("unexpected keystore error")

ErrKeystoreUnexpected is returned if an unexpected error occurs.

View Source
var ErrMaxTXAttempts = errors.New("request discarded caused by maximum transaction attempts")

ErrMaxTXAttempts is returned if the maximum number of transaction attempts is reached.

View Source
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.

func NewService

func NewService(fscrClient fscr.Client, eetCASvc fscr.CAService, keyStore keystore.Service) Service

NewService returns Service implementation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL