fix formatting
This commit is contained in:
parent
f3949b1b59
commit
b4494c7ed3
11 changed files with 34 additions and 34 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
14
db/db.go
14
db/db.go
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
6
main.go
6
main.go
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
)
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue