Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BB ¶
BB - Banco do Brasil Source: (http://www.bb.com.br/docs/pub/emp/mpe/espeboletobb.pdf)
func (BB) Layout ¶
func (b BB) Layout(w http.ResponseWriter, d Document)
Layout return a HTML template using a document
func (BB) Transference ¶
Transference Return the transference file (arquivo de remessa)
type Bank ¶
type Bank interface { Barcode(Document) Barcode Transference(Document) Layout(http.ResponseWriter, Document) }
Bank is defined as an interface, then we force to implement these functions: @Barcode Get the BarcodeNumber @Transference Return the transference file (arquivo de remessa) @Layout return a HTML template using a document
type Barcode ¶
type Barcode interface { Image() image.Image Digitable() string // contains filtered or unexported methods }
Barcode is defined as an interface, then we force to implement these functions: @Image Return a image, using a BarcodeNumber @Digitable Get the barcode digitable, it may contain dots and spaces
type BarcodeNumber ¶
type BarcodeNumber struct { // Codigo do banco int(3) BankId int // Codigo da moeda int(1) CurrencyId int // Fator de vencimento int(4) DateDueFactor int // Valor formatado int(10) Value int // Campo livre, numeros do banco com nosso numero string(25) BankNumbers string // Digito verificador do codigo de barras int(1) Dv int }
Defines a barcode number type, holds numbers of the barcode
func (BarcodeNumber) Digitable ¶
func (n BarcodeNumber) Digitable() string
Digitable mount the barcode digitable number, taking all BarcodeNumber fields together: Field 1: AAABC.CCCCX A = FEBRABAN Bank identifier B = the currency identifier C = 20-24 barcode numbers X = DV, using module10
Field 2: DDDDD.DDDDDX D = 25-34 barcode numbers X = DV, using module10
Field 3: EEEEE.EEEEEX E = 35-44 barcode numbers X = DV, using module10
Field 4: X X = DV, BarcodeNumber.Dv
Field 5: UUUUVVVVVVVVVV U = Due date factor V = Value
return AAABC.CCCCX DDDDD.DDDDDX EEEEE.EEEEEX X UUUUVVVVVVVVVV
func (BarcodeNumber) Image ¶
func (n BarcodeNumber) Image() image.Image
Image return a image.Image, using a BarcodeNumber
type Bradesco ¶
Bradesco Source: (https://banco.bradesco/assets/pessoajuridica/pdf/4008-524-0121-08-layout-cobranca-versao-portuguesSS28785.pdf)
func (Bradesco) Layout ¶
func (b Bradesco) Layout(w http.ResponseWriter, d Document)
Layout return a HTML template using a document
func (Bradesco) Transference ¶
Transference Return the transference file (arquivo de remessa)
type Caixa ¶
CEF - Caixa econômica federal - Modelo SIGCB Source: (http://www.caixa.gov.br/Downloads/cobranca-caixa/ESP_COD_BARRAS_SIGCB_COBRANCA_CAIXA.pdf)
func (Caixa) Layout ¶
func (b Caixa) Layout(w http.ResponseWriter, d Document)
Layout return a HTML template using a document
func (Caixa) Transference ¶
Transference Return the transference file (arquivo de remessa)
type Company ¶
Defines a company type, holds the data of the emissor @LegalName the 'Razão social' of your company
type Document ¶
type Document struct { Id int Date time.Time DateDue time.Time Value int ValueTax int ValueDiscount int ValueForfeit int OurNumber int FebrabanType string Instructions [6]string Payer Payer }
Defines a document type, holds the data of the billet itself @Id identifier of your program orders/payments @FebrabanType is the document type according FEBRABAN, the default used is "DM" (Duplicata mercantil), Source: (http://www.bb.com.br/docs/pub/emp/empl/dwn/011DescrCampos.pdf) @Value valor do boleto @ValueTax taxa do boleto @ValueDiscount abatimento/desconto @ValueForfeit juros/multa @OurNumber Nosso numero
type Itau ¶
Itau Source: (http://download.itau.com.br/bankline/cobranca_cnab240.pdf)
func (Itau) Layout ¶
func (b Itau) Layout(w http.ResponseWriter, d Document)
Layout return a HTML template using a document
func (Itau) Transference ¶
Transference Return the transference file (arquivo de remessa)
type Santander ¶
Santander Source: (https://www.santander.com.br/document/wps/sl-tabela-de-tarifas-cobranca.pdf)
func (Santander) Layout ¶
func (b Santander) Layout(w http.ResponseWriter, d Document)
Layout return a HTML template using a document
func (Santander) Transference ¶
Transference Return the transference file (arquivo de remessa)