library

package
v1.36.3 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Countries []Country
View Source
var CountryLastUpdated time.Time

Functions

func LoadDaisho

func LoadDaisho(c *gin.Context)

func LoadShopJS

func LoadShopJS(c *gin.Context)

func Route

func Route(router router.Router, args ...gin.HandlerFunc)

Types

type Country

type Country struct {
	Name         string        `json:"name"`
	IsoCode      string        `json:"code"`
	SubDivisions []SubDivision `json:"subdivisions"`
}

type LoadDaishoReq

type LoadDaishoReq struct {
	HasCountries bool `json:"hasCountries"`

	LastChecked time.Time `json:"lastChecked"`
}

type LoadDaishoRes

type LoadDaishoRes struct {
	Countries []Country `json:"countries,omitempty"`
}

type LoadShopJSReq

type LoadShopJSReq struct {
	HasCountries     bool `json:"hasCountries"`
	HasTaxRates      bool `json:"hasTaxRates"`
	HasShippingRates bool `json:"hasShippingRates"`

	LastChecked time.Time `json:"lastChecked"`
	StoreId     string    `json:"storeId"`
}

ShopJS request and response

type LoadShopJSRes

type LoadShopJSRes struct {
	Countries     []Country                    `json:"countries,omitempty"`
	TaxRates      *taxrates.TaxRates           `json:"taxRates,omitempty"`
	ShippingRates *shippingrates.ShippingRates `json:"shippingRates,omitempty"`
	Currency      currency.Type                `json:"currency,omitempty"`
	StoreId       string                       `json:"storeId,omitempty"`

	Live bool `json:"live"`
}

type SubDivision

type SubDivision struct {
	Name    string `json:"name"`
	IsoCode string `json:"code"`
}

Countries Loading

Jump to

Keyboard shortcuts

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