paymentsconfig

package
v1.70.0-rc Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Error = errs.Class("payments config")

Error is payments config err class.

Functions

This section is empty.

Types

type Config

type Config struct {
	Provider                 string `help:"payments provider to use" default:""`
	BillingConfig            billing.Config
	StripeCoinPayments       stripecoinpayments.Config
	Storjscan                storjscan.Config
	UsagePrice               ProjectUsagePrice
	BonusRate                int64                      `help:"amount of percents that user will earn as bonus credits by depositing in STORJ tokens" default:"10"`
	NodeEgressBandwidthPrice int64                      `help:"price node receive for storing TB of egress in cents" default:"2000"`
	NodeRepairBandwidthPrice int64                      `help:"price node receive for storing TB of repair in cents" default:"1000"`
	NodeAuditBandwidthPrice  int64                      `help:"price node receive for storing TB of audit in cents" default:"1000"`
	NodeDiskSpacePrice       int64                      `help:"price node receive for storing disk space in cents/TB" default:"150"`
	UsagePriceOverrides      ProjectUsagePriceOverrides `help:"semicolon-separated usage price overrides in the format partner:storage,egress,segment"`
}

Config defines global payments config.

type ProjectUsagePrice added in v1.70.1

type ProjectUsagePrice struct {
	StorageTB string `help:"price user should pay for storage per month in dollars/TB" default:"4" testDefault:"10"`
	EgressTB  string `help:"price user should pay for egress in dollars/TB" default:"7" testDefault:"45"`
	Segment   string `` /* 132-byte string literal not displayed */
}

ProjectUsagePrice holds the configuration for the satellite's project usage price model.

func (ProjectUsagePrice) ToModel added in v1.70.1

ToModel returns the stripecoinpayments.ProjectUsagePriceModel representation of the project usage price.

type ProjectUsagePriceOverrides added in v1.70.1

type ProjectUsagePriceOverrides struct {
	// contains filtered or unexported fields
}

ProjectUsagePriceOverrides represents a mapping between partners and project usage price overrides.

func (*ProjectUsagePriceOverrides) Set added in v1.70.1

Set sets the list of price overrides to the parsed string.

func (*ProjectUsagePriceOverrides) String added in v1.70.1

func (p *ProjectUsagePriceOverrides) String() string

String returns the string representation of the price overrides.

func (ProjectUsagePriceOverrides) ToModels added in v1.70.1

ToModels returns the price overrides represented as a mapping between partners and project usage price models.

func (ProjectUsagePriceOverrides) Type added in v1.70.1

Type returns the type of the pflag.Value.

Jump to

Keyboard shortcuts

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