country

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: MIT Imports: 13 Imported by: 0

README

Go Report Card GoDoc GolangCI

xmodules/country for Xamboo - GO

The country package contains all the world regions, countries and states as defined by ISO The package comes in english and spanish natively

Version Changes Control

v0.0.1 - 2020-05-08

  • Compatible with xmodule context standard

v0.0.0 - 2020-03-05

  • Support for multithread context implemented

v0.0.0 - 2020-01-23

  • BuildCaches is now on parallel thread

v0.0.0 - 2020-01-03

  • This document added
  • Need xmodules/context to work
  • Need xmodules/translation to work
  • Improvements in creation of modules and tables
  • Some bugs corrected in the dump of the data

v0.0.0 - 2019-12-18

  • First release of module

Manual:

I. Countries

Intro


  1. Overview

Example:

import "github.com/webability-go/xmodules/country"


  1. Reference

To use the package:

import "github.com/webability-go/xmodules/country"

Documentation

Overview

Package country contains the list of all countries in the world with some data Necesita USDA y METRICS para funcionar

Package user contains the list of administrative user for the system. All users have accesses, into a profile and even extended access based upon table records. It needs base xmodule.

Index

Constants

View Source
const (
	MODULEID         = "country"
	VERSION          = "0.0.1"
	TRANSLATIONTHEME = "country"
)

Variables

View Source
var ModuleCountry = assets.ModuleEntries{}

Functions

func CreateStructureCountryByData

func CreateStructureCountryByData(sitecontext applications.Datasource, data xdominion.XRecordDef, lang language.Tag) base.Structure

func CreateStructureCountryByKey

func CreateStructureCountryByKey(sitecontext applications.Datasource, key string, lang language.Tag) base.Structure

func Setup

func Setup(ds applications.Datasource, prefix string) ([]string, error)

InitModule is called during the init phase to link the module with the system adds tables and caches to ctx::database

func StartContext

func StartContext(ds applications.Datasource, ctx *context.Context) error

func Synchronize

func Synchronize(ds applications.Datasource, prefix string) ([]string, error)

Types

type StructureCountry

type StructureCountry struct {
	Key  string
	Lang language.Tag
	Data *xdominion.XRecord
}

func GetCountry

func GetCountry(ctx *base.Datasource, key string, lang language.Tag) *StructureCountry

GetCountry to get the data of a country from cache/db in the specified language

func (*StructureCountry) Clone

func (sc *StructureCountry) Clone() base.Structure

Clone the whole structure

func (*StructureCountry) ComplementData

func (sc *StructureCountry) ComplementData(sitecontext applications.Datasource)

ComplementData adds all the needed data from other objects /duplicable in the thread since the object will be destroyed at the end

func (*StructureCountry) GetData

func (sc *StructureCountry) GetData() *xdominion.XRecord

Returns the raw data

func (*StructureCountry) IsAuthorized

func (sc *StructureCountry) IsAuthorized(sitecontext applications.Datasource, site string, language string, device string) bool

IsAuthorized returns true if the structure can be used on this site/language/device

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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