daemon

package
v0.0.0-...-914e618 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2022 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "0.0.0"

Variables

View Source
var Config config
View Source
var CreatePaymentPage *template.Template
View Source
var FailPage *template.Template
View Source
var Homepage *template.Template
View Source
var LoginPage *template.Template
View Source
var MerchantPanel *template.Template
View Source
var RegisterPage *template.Template
View Source
var SuccessPage *template.Template

Functions

func CreateSecret

func CreateSecret(username string) (secret string, err error)

func DoWithdrawals

func DoWithdrawals(ctx context.Context, username string) error

func PaymentCallbackUrl

func PaymentCallbackUrl(ctx context.Context, paymentId string) (string, error)

func PaymentComplete

func PaymentComplete(ctx context.Context, paymentId string) error

func PaymentCreateProcess

func PaymentCreateProcess(ctx context.Context, username string, amount uint64, cancelUrl, acceptUrl, callbackUrl string) (string, error)

func PaymentPageDetails

func PaymentPageDetails(ctx context.Context, paymentId string) (t *template.Template, amount uint64,
	acceptUrl, cancelUrl string, received, completed bool, address string, err error)

func PaymentReceived

func PaymentReceived(ctx context.Context, paymentId string) error

func Run

func Run()

func TemplateFetch

func TemplateFetch(ctx context.Context, username string) (templateStr string, err error)

func TemplateUpdate

func TemplateUpdate(ctx context.Context, username, templateStr string) error

func UserLogin

func UserLogin(ctx context.Context, username, password string) error

func UserRegister

func UserRegister(ctx context.Context, username, password, walletAddress string) error

Types

type HealthStatus

type HealthStatus struct {
	Status   int `json:"status"`
	Services struct {
		PostgreSQL bool `json:"postgresql"`
		MoneroPay  bool `json:"moneropay"`
	} `json:"services"`
}

func Health

func Health(ctx context.Context) HealthStatus

type Payment

type Payment struct {
	Uuid     string
	Amount   string
	Complete bool
}

func PaymentsByMerchant

func PaymentsByMerchant(ctx context.Context, username string) ([]Payment, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL