Release v2.2.0

This commit is contained in:
Santiago Lezica
2021-11-12 19:06:13 -03:00
parent 64a820d429
commit 58d843ad79
249 changed files with 73797 additions and 1145 deletions

37
vendor/github.com/fiatjaf/go-lnurl/base.go generated vendored Normal file
View File

@@ -0,0 +1,37 @@
package lnurl
import (
"net/url"
)
// The base response for all lnurl calls.
type LNURLResponse struct {
Status string `json:"status,omitempty"`
Reason string `json:"reason,omitempty"`
}
type LNURLErrorResponse struct {
Status string `json:"status,omitempty"`
Reason string `json:"reason,omitempty"`
URL *url.URL `json:"-"`
}
func (r LNURLErrorResponse) Error() string {
return r.Reason
}
func OkResponse() LNURLResponse {
return LNURLResponse{Status: "OK"}
}
func ErrorResponse(reason string) LNURLErrorResponse {
return LNURLErrorResponse{
URL: nil,
Status: "ERROR",
Reason: reason,
}
}
type LNURLParams interface {
LNURLKind() string
}