client

package
v0.0.0-...-2119b44 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const FileServerEndpoint = "/pdf/"

Variables

View Source
var ErrInvoicePDFNotFound = errors.New("invoice PDF file not found")

Functions

func NewInvoiceClient

func NewInvoiceClient(invoiceHost string, timeout time.Duration) *invoice

func NewInvoiceFromClient

func NewInvoiceFromClient(invoiceClient pb.InvoiceServiceClient) *invoice

func NewPdfClient

func NewPdfClient(fileHost string, debug bool) *pdf

Types

type Invoice

type Invoice interface {
	Add(rawInvoice string) (*pb.AddResponse, error)
	Get(invoiceId string, asPDF bool) (*pb.GetResponse, error)
	List(invoiceeId, invoiceeType, networkId string,
		isPaid bool, count uint32, sort bool) (*pb.ListResponse, error)
	Remove(invoiceId string) error
}

type Pdf

type Pdf interface {
	GetPdf(invoiceId string) ([]byte, error)
}

Jump to

Keyboard shortcuts

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