api

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package api provides the external API.

Index

Constants

View Source
const FormKeyPaymentID = "id"

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorReason

type ErrorReason string
const (
	ErrorNone         ErrorReason = "" // Internal, not sent.
	ErrorInternal     ErrorReason = "internal"
	ErrorNotFound     ErrorReason = "not_found"
	ErrorUnauthorized ErrorReason = "unauthorized"
	ErrorOBSDisabled  ErrorReason = "obs_disabled"
	ErrorViewDisabled ErrorReason = "view_disabled"
	ErrorPayCaptcha   ErrorReason = "pay_captcha"
	ErrorPayWallet    ErrorReason = "pay_wallet"
)

type PendingPayment

type PendingPayment struct {
	Entry      Superchat `json:"entry"`
	Address    string    `json:"payment_address"`
	PaymentID  string    `json:"payment_id"`
	ShowAmount bool      `json:"show_amount"`
}

PendingPayment is a new pending payment.

type Receipt

type Receipt struct {
	State     ReceiptState  `json:"state"`
	Finalized bool          `json:"is_finalized"`
	Amount    *xmr.Quantity `json:"amount,omitempty"`
	PaymentID string        `json:"payment_id,omitempty"`
}

Receipt is status of a superchat.

type ReceiptState

type ReceiptState string
const (
	ReceiptStatePaid              ReceiptState = "paid"
	ReceiptStateInsufficientFunds ReceiptState = "nsf"
	ReceiptStateUnknownID         ReceiptState = "unknown_id"
	ReceiptStateWaiting           ReceiptState = "waiting"
)

type Superchat

type Superchat struct {
	ID      uint64        `json:"id,omitempty"`
	Name    string        `json:"name"`
	Message string        `json:"message"`
	Amount  *xmr.Quantity `json:"amount,omitempty"`
}

Superchat is a superchat entry.

func (*Superchat) Set

func (sc *Superchat) Set(other *Superchat)

Jump to

Keyboard shortcuts

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