Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collection struct {
// contains filtered or unexported fields
}
Collection holds a set of regions.
func NewCollection ¶
func NewCollection(regions ...Region) *Collection
NewCollection expects an array of regions, from which
func (*Collection) Codes ¶
func (c *Collection) Codes() []Code
Codes provides a list of region codes contained in the collection.
func (*Collection) For ¶
func (c *Collection) For(code Code) Region
For returns the region definition for the document or nil if the region code is invalid.
func (*Collection) List ¶
func (c *Collection) List() map[Code]Region
List provides the list of regions and their definitions. Only really meant for exporting data.
type Region ¶
type Region interface { // Taxes provides a region's tax definition Taxes() *tax.Region // Currency provides the regions default currency definition. Currency() *currency.Def // Code provides this regions official code. Code() Code // Validate determines the type of GOBL document provided and attempts // to check the contents for errors. Validate(obj interface{}) error }
Region represents the methods we expect to be available from a region.
Click to show internal directories.
Click to hide internal directories.