types

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Email

type Email string

Email is a validated email type

type Money

type Money int64

Money represents monetary values in cents (INTEGER in SQLite)

func FromDollars

func FromDollars(d float64) Money

FromDollars creates Money from dollar amount

func (Money) Dollars

func (m Money) Dollars() float64

Dollars converts Money to dollar amount

type OrderID

type OrderID int64

OrderID is a strongly-typed order identifier

type ProductID

type ProductID int64

ProductID is a strongly-typed product identifier

type SKU

type SKU string

SKU is a product stock keeping unit

type Status

type Status string

Status represents an order status

const (
	// StatusPending is the pending order status.
	StatusPending Status = "pending"
	// StatusProcessing is the processing order status.
	StatusProcessing Status = "processing"
	// StatusShipped is the shipped order status.
	StatusShipped Status = "shipped"
	// StatusDelivered is the delivered order status.
	StatusDelivered Status = "delivered"
	// StatusCancelled is the cancelled order status.
	StatusCancelled Status = "cancelled"
)

type UserID

type UserID int64

UserID is a strongly-typed user identifier

Jump to

Keyboard shortcuts

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