fscr

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: 12 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 ErrInvalidCertificate = errors.New("invalid certificate or private key")

ErrInvalidCertificate is returned if a given certificate or 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 of a certificate is invalid.

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

ErrNotCACertificate is returned if a non-CA's certificate is provided where the one is being expected.

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

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

Functions

This section is empty.

Types

type CAService added in v0.3.0

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

CAService verifies certificates signed off by trusted CAs.

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 {
	Ping() error
	Do(ctx context.Context, reqBody []byte) ([]byte, error)
}

Client represents a client to communicate with the FSCR servers.

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