fscr

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const OrganizationName = "Česká republika - Generální finanční ředitelství"

OrganizationName is the legal name that the organization is registered with authority at the national level.

View Source
const PlaygroundURL = "https://pg.eet.cz/eet/services/EETServiceSOAP/v3"

PlaygroundURL is the URL of the playground EET system.

View Source
const ProductionURL = "https://prod.eet.cz/eet/services/EETServiceSOAP/v3"

ProductionURL is the URL of the production EET system.

Variables

View Source
var ErrInsecureCertificate = errors.New("certificate issued or signed by an unknown authority")

ErrInsecureCertificate is returned if a certificate is issued or signed by an unknown authority and can't be verified.

View Source
var ErrInvalidCertificate = errors.New("invalid certificate/private key")

ErrInvalidCertificate is returned if a certificate/private key is invalid.

View Source
var ErrInvalidKeyPair = errors.New("invalid certificate/private key keypair")

ErrInvalidKeyPair is returned if a certificate/private key keypair is invalid.

View Source
var ErrInvalidOrganizationName = errors.New("invalid organization name")

ErrInvalidOrganizationName is returned if the organization name is invalid.

View Source
var ErrNotCACertificate = errors.New("not a certificate authority's certificate")

ErrNotCACertificate is returned if a non-CA's certificate is provided when CA's certificate is being expected.

Functions

This section is empty.

Types

type CAService added in v0.3.0

type CAService interface {
	VerifyDSig(cert *x509.Certificate) error
	VerifyEETCA(cert *x509.Certificate) error
	ParseTaxpayerCertificate(data []byte, password string) (*x509.Certificate, *rsa.PrivateKey, error)
}

CAService verifies certificates signed off by the CA.

func NewCAService added in v0.3.0

func NewCAService(eetRoots []*x509.Certificate, dsigPool *x509.CertPool) CAService

NewCAService returns a CAService implementation with the given certificate pools for verifying both issued taxpayers' certificates and digital signatures.

type Client

type Client interface {
	Do(ctx context.Context, reqBody []byte) ([]byte, error)
	Ping() error
}

Client represents a client that can communicate with the EET server.

func NewClient

func NewClient(c *http.Client, url string) Client

NewClient returns a Client implementation.

Jump to

Keyboard shortcuts

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