fix build
This commit is contained in:
parent
59151232dd
commit
0e3895a1f2
11 changed files with 43 additions and 8 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -6,6 +6,7 @@
|
||||||
*.dylib
|
*.dylib
|
||||||
boltcard
|
boltcard
|
||||||
createboltcard/createboltcard
|
createboltcard/createboltcard
|
||||||
|
wipeboltcard/wipeboltcard
|
||||||
|
|
||||||
# Test binary, built with `go test -c`
|
# Test binary, built with `go test -c`
|
||||||
*.test
|
*.test
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,27 @@ func db_open() (*sql.DB, error) {
|
||||||
return db, nil
|
return db, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func db_get_setting(setting_name string) (string) {
|
||||||
|
|
||||||
|
setting_value := ""
|
||||||
|
|
||||||
|
db, err := db_open()
|
||||||
|
if err != nil {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
defer db.Close()
|
||||||
|
|
||||||
|
sqlStatement := `select value from settings where name=$1;`
|
||||||
|
|
||||||
|
row := db.QueryRow(sqlStatement, setting_name)
|
||||||
|
err = row.Scan(&setting_value)
|
||||||
|
if err != nil {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
return setting_value
|
||||||
|
}
|
||||||
|
|
||||||
func db_get_card_name_count(card_name string) (card_count int, err error) {
|
func db_get_card_name_count(card_name string) (card_count int, err error) {
|
||||||
|
|
||||||
card_count = 0
|
card_count = 0
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
qrcode "github.com/skip2/go-qrcode"
|
qrcode "github.com/skip2/go-qrcode"
|
||||||
"os"
|
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
1
email.go
1
email.go
|
|
@ -7,7 +7,6 @@ import (
|
||||||
"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"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"os"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"os"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
"crypto/sha256"
|
"crypto/sha256"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import (
|
||||||
decodepay "github.com/fiatjaf/ln-decodepay"
|
decodepay "github.com/fiatjaf/ln-decodepay"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func lnurlw_callback(w http.ResponseWriter, req *http.Request) {
|
func lnurlw_callback(w http.ResponseWriter, req *http.Request) {
|
||||||
|
|
|
||||||
1
main.go
1
main.go
|
|
@ -5,7 +5,6 @@ import (
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
"os"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var router = mux.NewRouter()
|
var router = mux.NewRouter()
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,27 @@ func db_open() (*sql.DB, error) {
|
||||||
return db, nil
|
return db, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func db_get_setting(setting_name string) (string) {
|
||||||
|
|
||||||
|
setting_value := ""
|
||||||
|
|
||||||
|
db, err := db_open()
|
||||||
|
if err != nil {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
defer db.Close()
|
||||||
|
|
||||||
|
sqlStatement := `select value from settings where name=$1;`
|
||||||
|
|
||||||
|
row := db.QueryRow(sqlStatement, setting_name)
|
||||||
|
err = row.Scan(&setting_value)
|
||||||
|
if err != nil {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
return setting_value
|
||||||
|
}
|
||||||
|
|
||||||
func db_get_card_name_count(card_name string) (card_count int, err error) {
|
func db_get_card_name_count(card_name string) (card_count int, err error) {
|
||||||
|
|
||||||
card_count = 0
|
card_count = 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue