Skip to content
On this page

Go SDK

Official Go client for the Aegis API. Supports Go 1.18+.

Installation

bash
go get github.com/aegis-tech/go-sdk

Quick Start

go
import aegis "github.com/aegis-tech/go-sdk"

func main() {
    client := aegis.New(aegis.Config{
        APIKey: os.Getenv("AEGIS_API_KEY"),
        Env:    aegis.Production,
    })

    result, err := client.Verify.CPF(context.Background(), &aegis.CPFRequest{
        CPF:  "12345678901",
        Name: "JOAO SILVA SANTOS",
    })
    if err != nil {
        panic(err)
    }

    fmt.Printf("Status: %s, Score: %d\\n", result.Status, result.Score)
}

Configuration

go
client := aegis.New(aegis.Config{
    APIKey:     os.Getenv("AEGIS_API_KEY"),
    Env:        aegis.Sandbox,
    Timeout:    10 * time.Second,
    MaxRetries: 3,
})

GitHub

github.com/aegis-tech/go-sdk

Released under the MIT License.