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 ( import (
"crypto/rand" "crypto/rand"
"encoding/hex" "encoding/hex"
"github.com/boltcard/boltcard/db"
"github.com/boltcard/boltcard/resp_err"
log "github.com/sirupsen/logrus" log "github.com/sirupsen/logrus"
"net/http" "net/http"
"strconv" "strconv"
"strings" "strings"
"github.com/boltcard/boltcard/db"
"github.com/boltcard/boltcard/resp_err"
) )
func random_hex() string { func random_hex() string {

View file

@ -47,13 +47,13 @@ type Transaction struct {
} }
type Card_wipe_info struct { type Card_wipe_info struct {
Id int Id int
K0 string K0 string
K1 string K1 string
K2 string K2 string
K3 string K3 string
K4 string K4 string
Uid string Uid string
} }
func open() (*sql.DB, error) { 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/credentials"
"github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/ses" "github.com/aws/aws-sdk-go/service/ses"
"github.com/boltcard/boltcard/db"
log "github.com/sirupsen/logrus" log "github.com/sirupsen/logrus"
"strconv" "strconv"
"strings" "strings"
"github.com/boltcard/boltcard/db"
) )
func Send_balance_email(recipient_email string, card_id int) { func Send_balance_email(recipient_email string, card_id int) {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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