Skip to content

Commit 68ebf13

Browse files
committed
Translate README to Portuguese
- Translate repository README to Brazilian Portuguese (pt-BR) - Update headings, features, CLI/REST examples and quick start text - Preserve technical details (API, formats, build & Docker instructions) - Local URLs, roadmap, contributing and versioning sections updated to PT-BR
1 parent c321ecf commit 68ebf13

File tree

1 file changed

+56
-56
lines changed

1 file changed

+56
-56
lines changed

README.md

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,29 @@
22

33
<p align="center"><img alt="pix-utils" src="https://raw.githubusercontent.com/thiagozs/go-pixgen/main/assets/logo-pix.png" width="128px" /></p>
44

5-
Generate and validate payments of Brazil Instant Payment System (Pix), making fast and simple to handle charges and proccess then in your project. Além da lib, o repositório oferece CLI e serviço REST para gerar payloads Pix estáticos ou dinâmicos, incluindo QR Code.
5+
Gere e valide pagamentos do Sistema de Pagamentos Instantâneo (Pix) do Banco Central de forma simples. Além da biblioteca, este repositório inclui um CLI e um serviço REST para gerar payloads Pix estáticos ou dinâmicos, bem como seus códigos QR.
66

7-
## Features
7+
## Funcionalidades
88

9-
- Static (copy & paste) and dynamic (URL-based) Pix payload generation.
10-
- CLI `pixgen` (comandos `generate` e `serve`) para uso local ou como serviço.
11-
- REST service (`POST /pix`) retornando payload + QR Code (base64) e `GET /healthz`.
12-
- QR Code byte encoding built-in via `github.com/skip2/go-qrcode`.
13-
- EMV parsing helpers to inspect payload tags and metadata.
14-
- Field normalization (Pix keys, amount, TXID) with BACEN-aligned validation.
15-
- Dynamic Pix resolver with JSON/plain-text support, expiration awareness and mock friendly interface.
9+
- Geração de payloads Pix estáticos (copia e cola) e dinâmicos (com URL).
10+
- CLI `pixgen` com comandos `generate` e `serve` para uso local ou como serviço.
11+
- Serviço REST com `POST /pix` retornando payload + QR Code (base64) e `GET /healthz`.
12+
- Geração de QR Code via `github.com/skip2/go-qrcode`.
13+
- Utilitários de parsing EMV para inspeção de tags e metadados.
14+
- Normalização de dados (chave Pix, valor, TxID) seguindo regras do BACEN.
15+
- Resolução de Pix dinâmico suportando JSON, texto puro e tratamento de expiração.
1616

17-
## Installation
17+
## Instalação
1818

1919
```bash
2020
go get github.com/thiagozs/go-pixgen
2121
```
2222

23-
Go 1.17 or newer is required.
23+
Requer Go 1.17 ou superior.
2424

25-
## Quick Start
25+
## Guia rápido
2626

27-
### CLI – gerar payload no stdout
27+
### CLI – gerar payload no terminal
2828

2929
```bash
3030
make cli
@@ -39,9 +39,9 @@ bin/pixgen generate \
3939
--txid PEDIDO-123
4040
```
4141

42-
Saída inclui o código copia-e-cola, campos relevantes e o QR Code em base64.
42+
A saída inclui o código copia-e-cola, campos relevantes e o QR Code em base64.
4343

44-
### REST service
44+
### Serviço REST
4545

4646
```bash
4747
make run ARGS="serve --addr :8080"
@@ -68,9 +68,9 @@ curl -X POST http://localhost:8080/pix \
6868
}
6969
```
7070

71-
Endpoint `GET /healthz` retorna `200 OK` para checagens.
71+
O endpoint `GET /healthz` retorna `200 OK` para checagens.
7272

73-
Exemplo rápido com `curl` + `jq` para visualizar a resposta formatada:
73+
Exemplo com `curl` + `jq` para visualizar a resposta:
7474

7575
```bash
7676
curl -sS -X POST http://localhost:8080/pix \
@@ -85,9 +85,9 @@ curl -sS -X POST http://localhost:8080/pix \
8585
}' | jq
8686
```
8787

88-
## Usage
88+
## Uso em código
8989

90-
### Generate a Pix payload programaticamente
90+
### Gerar payload Pix programaticamente
9191

9292
```golang
9393
opts := []pix.Options{
@@ -154,35 +154,35 @@ if err != nil {
154154
fmt.Printf("Remote Pix expires at: %v\n", payload.ExpiresAt)
155155
```
156156

157-
## API Highlights
157+
## Destaques da API
158158

159-
- `pix.New(opts...) (*pix.Pix, error)` - build a Pix generator using functional options.
160-
- `(*Pix).GenPayload()` - returns the EMV string and caches it for `GenQRCode()`.
161-
- `pix.ParsePayload(string) (*ParsedPayload, error)` - converts an EMV payload back into structured fields and validates the CRC.
162-
- `(*Pix).FetchDynamicPayload(ctx, client)` - downloads a dynamic Pix payload, parses it and checks expiration. Works with `http.Client` stubs for tests.
163-
- `(*Pix).Validates()` - called automatically by `pix.New`, and can be invoked manually to re-check mutated parameters.
159+
- `pix.New(opts...) (*pix.Pix, error)` – cria um gerador Pix configurável.
160+
- `(*Pix).GenPayload()` – retorna o payload EMV e o mantém em cache para `GenQRCode()`.
161+
- `pix.ParsePayload(string) (*ParsedPayload, error)` – faz o parsing do payload e valida o CRC.
162+
- `(*Pix).FetchDynamicPayload(ctx, client)` – baixa, valida e parseia payloads dinâmicos remotos.
163+
- `(*Pix).Validates()` – valida os parâmetros (chaves, tamanho de campos, etc.).
164164

165-
### Supported Pix key formats
165+
### Formatos aceitos de chave Pix
166166

167-
- Random EVP UUID (case-normalized to lowercase).
168-
- Phone (`+55DDDUSER`), accepting raw digits with optional `+55` prefix.
169-
- CPF/CNPJ (digits only, validated with check digits).
170-
- Email addresses (validated using `net/mail`).
167+
- EVP (UUID) – normalizado para minúsculo.
168+
- Telefone (`+55DDDNÚMERO`) – aceita apenas dígitos com ou sem `+55`.
169+
- CPF/CNPJ – somente dígitos, com validação dos dígitos verificadores.
170+
- E-mail – validado via `net/mail`.
171171

172-
### Amount & TxID
172+
### Valor e TxID
173173

174-
- Amount accepts up to 13 digits before the separator and up to 2 decimals (`9999999999999.99` cap).
175-
- TxID allows uppercase/lowercase letters, digits, `.` and `-` up to 35 characters. Value is uppercased when stored.
174+
- Valor suporta até 13 dígitos antes da vírgula e 2 casas decimais (`9999999999999.99` limite).
175+
- TxID permite letras, números, `.` e `-` até 35 caracteres e é armazenado em maiúsculas.
176176

177-
### Dynamic payload fetching
177+
### Busca de payload dinâmico
178178

179-
`FetchDynamicPayload` understands responses as:
179+
`FetchDynamicPayload` entende:
180180

181-
- Raw EMV payload (any `text/*` content type).
182-
- JSON containing fields `pixCopyPaste`, `pix`, `payload`, `pixCopiaECola`, etc.
183-
- Optional expiration keys such as `expiresAt`, `expiration`, `expiry`. Parsed values support RFC3339 and similar layouts.
181+
- payload EMV bruto (`text/*`).
182+
- JSON com campos como `pixCopyPaste`, `pix`, `payload`, `pixCopiaECola` etc.
183+
- Campos de expiração (`expiresAt`, `expiration`, `expiry`) em formatos RFC3339.
184184

185-
Local testing (HTTP URLs) is accepted when targeting `localhost` or `127.*`. Production URLs must be HTTPS.
185+
Para testes locais, URLs HTTP são aceitas quando o host é `localhost` ou `127.*`; para produção exige HTTPS.
186186

187187
## Build & Docker
188188

@@ -193,26 +193,26 @@ Local testing (HTTP URLs) is accepted when targeting `localhost` or `127.*`. Pro
193193

194194
## Roadmap
195195

196-
- [x] Generate payments based on parameters
197-
- [x] Static
198-
- [x] Dynamic
199-
- [x] Parse and validate EMV Codes
200-
- [x] Export generated/parsed payment to Image
201-
- [x] Export generated/parsed payment to EMV Code
202-
- [x] Fetch, parse and validate remote payloads from dynamic payments
203-
- [x] Verify if has already expired
204-
- [x] Improve tests
205-
- [ ] Documentation with all methods, parameters and more examples
206-
- [x] Add dynamic payment tests
207-
- [x] CLI tooling for payload inspection
208-
- [ ] REST API hardening & auth helpers
196+
- [x] Gerar pagamentos a partir de parâmetros
197+
- [x] Estático
198+
- [x] Dinâmico
199+
- [x] Parse e validação de códigos EMV
200+
- [x] Exportar pagamento para imagem
201+
- [x] Exportar pagamento para código EMV
202+
- [x] Buscar, parsear e validar payloads dinâmicos remotos
203+
- [x] Verificar se já expirou
204+
- [x] Melhorar testes
205+
- [ ] Documentação completa (métodos, parâmetros, exemplos)
206+
- [x] Testes para pagamentos dinâmicos
207+
- [x] Ferramentas CLI para inspeção de payload
208+
- [ ] Endurecimento da API REST e opções de autenticação
209209

210-
## Contributing
210+
## Contribuindo
211211

212-
Please contribute using [GitHub Flow](https://guides.github.com/introduction/flow). Create a branch, add commits, and [open a pull request](https://github.com/thiagozs/go-genpix/compare).
212+
Siga o [GitHub Flow](https://guides.github.com/introduction/flow): crie uma branch, faça commits e abra um [pull request](https://github.com/thiagozs/go-genpix/compare).
213213

214-
## Versioning and license
214+
## Versionamento e licença
215215

216-
Our version numbers follow the [semantic versioning specification](http://semver.org/). You can see the available versions by checking the [tags on this repository](https://github.com/thiagozs/go-pixgen/tags). For more details about our license model, please take a look at the [LICENSE](LICENSE) file.
216+
Utilizamos [SemVer](http://semver.org/). Confira as versões em [tags](https://github.com/thiagozs/go-pixgen/tags). Licença em [LICENSE](LICENSE).
217217

218218
**2022**, Thiago Zilli Sarmento :heart:

0 commit comments

Comments
 (0)