currency

package
v1.49.23 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package currency is the HTTP surface for the currency reference table: admin CRUD (generic REST) plus a public GET list. Currencies are a GLOBAL reference (default namespace, like token/user/organization) — one shared set the store/settings and product/price pickers read, replacing a hardcoded array.

Two audiences:

  • PUBLIC read: GET /v1/commerce/currencies returns the whole list, no auth (it is presentation/reference data). Wired on the commerce public group.
  • ADMIN write: create/update/delete mutate the reference set and are gated by the /v1 bundle's adminRequired. Wired in api/api.go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List(c *zip.Ctx) error

List returns every reference currency (default namespace). Public + cacheable.

func PublicRoute

func PublicRoute(r zip.Router)

PublicRoute wires the unauthenticated list projection. Mount on the commerce public group so it serves GET /v1/commerce/currencies.

func Route

func Route(router zip.Router, args ...zip.Handler)

Route wires the admin CRUD on the /v1 bundle. Currencies use the DEFAULT namespace (a global reference set), so DefaultNamespace is set — the generic REST scaffold then serves /currency (list/get/create/update/delete).

Types

This section is empty.

Jump to

Keyboard shortcuts

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