tip

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Region  currency_lib.Code
	Presets Presets
}

Entry pairs a currency with its presets.

func All

func All() []Entry

All returns every currency's presets, ordered by currency code.

type Presets

type Presets struct {
	Minimum float64
	Low     float64
	Medium  float64
	High    float64
}

Presets are the tip amounts offered for a currency, in major currency units. Minimum is the floor enforced on any tip; the remaining tiers are the amounts clients surface as one-tap presets.

func PresetsFor

func PresetsFor(region currency_lib.Code) (Presets, bool)

PresetsFor returns the presets for a currency, and whether it has any.

Jump to

Keyboard shortcuts

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