Documentation ¶
Index ¶
- func MinimumChargeableAmount(currency string) float64
- type Error
- type Portal
- func (p *Portal) Alerts() (crit, err, warn, info []modules.Alert)
- func (p *Portal) Close() error
- func (p *Portal) GetAnnouncement() (text string, expires uint64, err error)
- func (p *Portal) GetCredits() modules.CreditData
- func (p *Portal) ProcessConsensusChange(cc modules.ConsensusChange)
- func (p *Portal) SetAnnouncement(text string, expires uint64) error
- func (p *Portal) SetCredits(c modules.CreditData)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MinimumChargeableAmount ¶ added in v0.6.0
MinimumChargeableAmount is a helper function that returns the minimum amount chargeable by Stripe for the given currency.
Types ¶
type Error ¶
type Error struct { // Code identifies the error and enables an easier client-side error handling. Code int `json:"code"` // Message describes the error in English. Typically it is set to // `err.Error()`. This field is required. Message string `json:"message"` }
Error is a type that is encoded as JSON and returned in an API response in the event of an error.
type Portal ¶
type Portal struct {
// contains filtered or unexported fields
}
Portal contains the information related to the server.
func New ¶
func New(config *persist.SatdConfig, db *sql.DB, ms mail.MailSender, cs modules.ConsensusSet, w modules.Wallet, m modules.Manager, p modules.Provider, dir string, name string) (*Portal, error)
New returns an initialized portal server.
func (*Portal) GetAnnouncement ¶ added in v0.7.0
GetAnnouncement returns the current portal announcement.
func (*Portal) GetCredits ¶
func (p *Portal) GetCredits() modules.CreditData
GetCredits retrieves the credit data.
func (*Portal) ProcessConsensusChange ¶ added in v0.6.0
func (p *Portal) ProcessConsensusChange(cc modules.ConsensusChange)
ProcessConsensusChange gets called to inform Portal about the changes in the consensus set.
func (*Portal) SetAnnouncement ¶ added in v0.7.0
SetAnnouncement sets a new portal announcement.
func (*Portal) SetCredits ¶
func (p *Portal) SetCredits(c modules.CreditData)
SetCredits updates the credit data.
Click to show internal directories.
Click to hide internal directories.