fix formatting

This commit is contained in:
Peter Rounce 2023-02-19 06:52:12 +00:00
parent f3949b1b59
commit b4494c7ed3
11 changed files with 34 additions and 34 deletions

View file

@ -3,12 +3,12 @@ package main
import (
"crypto/rand"
"encoding/hex"
"github.com/boltcard/boltcard/db"
"github.com/boltcard/boltcard/resp_err"
log "github.com/sirupsen/logrus"
"net/http"
"strconv"
"strings"
"github.com/boltcard/boltcard/db"
"github.com/boltcard/boltcard/resp_err"
)
func random_hex() string {

View file

@ -47,13 +47,13 @@ type Transaction struct {
}
type Card_wipe_info struct {
Id int
K0 string
K1 string
K2 string
K3 string
K4 string
Uid string
Id int
K0 string
K1 string
K2 string
K3 string
K4 string
Uid string
}
func open() (*sql.DB, error) {

View file

@ -6,10 +6,10 @@ import (
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/ses"
"github.com/boltcard/boltcard/db"
log "github.com/sirupsen/logrus"
"strconv"
"strings"
"github.com/boltcard/boltcard/db"
)
func Send_balance_email(recipient_email string, card_id int) {

View file

@ -1,10 +1,10 @@
package lndhub
import (
log "github.com/sirupsen/logrus"
log "github.com/sirupsen/logrus"
"github.com/boltcard/boltcard/db"
"github.com/boltcard/boltcard/email"
"github.com/boltcard/boltcard/db"
"github.com/boltcard/boltcard/email"
)
func Pay_invoice(card_payment_id int, invoice string) {

View file

@ -2,13 +2,13 @@ package lnurlp
import (
"encoding/hex"
"github.com/boltcard/boltcard/db"
"github.com/boltcard/boltcard/lnd"
"github.com/boltcard/boltcard/resp_err"
"github.com/gorilla/mux"
log "github.com/sirupsen/logrus"
"net/http"
"strconv"
"github.com/boltcard/boltcard/lnd"
"github.com/boltcard/boltcard/db"
"github.com/boltcard/boltcard/resp_err"
)
func Callback(w http.ResponseWriter, r *http.Request) {

View file

@ -1,11 +1,11 @@
package lnurlp
import (
"github.com/boltcard/boltcard/db"
"github.com/boltcard/boltcard/resp_err"
"github.com/gorilla/mux"
log "github.com/sirupsen/logrus"
"net/http"
"github.com/boltcard/boltcard/db"
"github.com/boltcard/boltcard/resp_err"
)
func Response(w http.ResponseWriter, r *http.Request) {

View file

@ -1,14 +1,14 @@
package lnurlw
import (
decodepay "github.com/fiatjaf/ln-decodepay"
log "github.com/sirupsen/logrus"
"net/http"
"bytes"
"io"
"github.com/boltcard/boltcard/db"
"github.com/boltcard/boltcard/lnd"
"github.com/boltcard/boltcard/resp_err"
decodepay "github.com/fiatjaf/ln-decodepay"
log "github.com/sirupsen/logrus"
"io"
"net/http"
)
func lndhub_payment(w http.ResponseWriter, p *db.Payment) {
@ -28,7 +28,7 @@ func lndhub_payment(w http.ResponseWriter, p *db.Payment) {
//the login JSON is held in the Card_name field
body := []byte(c.Card_name)
r, err := http.NewRequest("POST", lndhub_url + "/auth", bytes.NewBuffer(body))
r, err := http.NewRequest("POST", lndhub_url+"/auth", bytes.NewBuffer(body))
if err != nil {
log.WithFields(log.Fields{"card_payment_id": p.Card_payment_id}).Warn(err)
resp_err.Write(w)
@ -57,7 +57,7 @@ func lndhub_payment(w http.ResponseWriter, p *db.Payment) {
log.Info(string(b))
// fmt.Println(string(b))
// fmt.Println(string(b))
//lndhub.payinvoice API call
}

View file

@ -4,14 +4,14 @@ import (
"encoding/hex"
"encoding/json"
"errors"
"github.com/boltcard/boltcard/crypto"
"github.com/boltcard/boltcard/db"
"github.com/boltcard/boltcard/resp_err"
log "github.com/sirupsen/logrus"
"net/http"
"os"
"strconv"
"strings"
"github.com/boltcard/boltcard/db"
"github.com/boltcard/boltcard/crypto"
"github.com/boltcard/boltcard/resp_err"
)
type ResponseData struct {

View file

@ -1,13 +1,13 @@
package main
import (
"github.com/boltcard/boltcard/db"
"github.com/boltcard/boltcard/lnurlp"
"github.com/boltcard/boltcard/lnurlw"
"github.com/gorilla/mux"
log "github.com/sirupsen/logrus"
"net/http"
"time"
"github.com/boltcard/boltcard/db"
"github.com/boltcard/boltcard/lnurlw"
"github.com/boltcard/boltcard/lnurlp"
)
var router = mux.NewRouter()

View file

@ -3,10 +3,10 @@ package main
import (
"database/sql"
"encoding/json"
log "github.com/sirupsen/logrus"
"net/http"
"github.com/boltcard/boltcard/db"
"github.com/boltcard/boltcard/resp_err"
log "github.com/sirupsen/logrus"
"net/http"
)
/**

View file

@ -1,11 +1,11 @@
package main
import (
"github.com/boltcard/boltcard/db"
"github.com/boltcard/boltcard/resp_err"
log "github.com/sirupsen/logrus"
"net/http"
"strconv"
"github.com/boltcard/boltcard/db"
"github.com/boltcard/boltcard/resp_err"
)
func wipeboltcard(w http.ResponseWriter, r *http.Request) {