Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/booscaaa/juno-go-sdk

SDK to provide access to JUNO API (Open Banking) (2.0.0)
https://github.com/booscaaa/juno-go-sdk

api brazil go golang sdk

Last synced: about 2 months ago
JSON representation

SDK to provide access to JUNO API (Open Banking) (2.0.0)

Awesome Lists containing this project

README

        


Juno API - Golang SDK


Juno API (Open Banking) (2.0.0)



Reference
Release
Software License
Test status
Coverage


## Why?

This project is part of my personal portfolio, so, I'll be happy if you could provide me any feedback about the project, code, structure or anything that you can report that could make me a better developer!

Email-me: [email protected]

Connect with me at [LinkedIn](https://www.linkedin.com/in/booscaaa/).


## Functionalities

- Get authentication token
- Create tokenized card
- Get plans for signatures
- Get plan by ID
- Create plan
- Disable plan by ID
- Enable plan by ID


## Getting Started

### Prerequisites

To run this project in the development mode, you'll need to have a basic environment to run:

- A Golang SDK, that can be found [here](https://golang.org/).


### Installing

```bash
$ go get github.com/booscaaa/juno-go-sdk
```


### Create a config.json file inside your project like this
**The access client_id, client_secret and resource_token can be found into Juno account**
```json
{
"juno": {
"client_id": "cliend id",
"client_secret": "client secret",
"resource_token": "resource token"
}
}
```



### Create main.go file
```go
package main

import (
"fmt"

"github.com/booscaaa/juno-go-sdk/juno"
"github.com/spf13/viper"
)

func init() {
viper.SetConfigFile(`config.json`)
err := viper.ReadInConfig()
if err != nil {
panic(err)
}
}

func main() {
// Get configuration variavables
clientID := viper.GetString("juno.client_id")
clientSecret := viper.GetString("juno.client_secret")
resourceToken := viper.GetString("juno.resource_token")

// Configure Sandbox access into Juno api
junoAccess := juno.JunoConfig().
ClientID(clientID).
ClientSecret(clientSecret).
ResourceToken(resourceToken).
Sandbox()

junoSdk := juno.Instance(junoAccess)

// Get authentication token from juno api
accessToken, err := junoSdk.GetAuthToken()

if err != nil {
fmt.Println(err)
}

//Get list plans from juno api
plans, err := junoSdk.GetPlans(*accessToken)

if err != nil {
fmt.Println(err)
}

//see more examples into examples folder
}
```

# Running local

```bash
go run main.go
```






## Api application built With

- [Viper](https://github.com/spf13/viper)






## Contributing

You can send how many PR's do you want, I'll be glad to analyze and accept them! And if you have any question about the project...

Email-me: [email protected]

Connect with me at [LinkedIn](https://www.linkedin.com/in/booscaaa/)

Thank you!

## License

This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/booscaaa/juno-go-sdk/blob/master/LICENSE) file for details