Store addresses on every geocode
This commit is contained in:
parent
e04b86218d
commit
730f40956f
12 changed files with 223 additions and 229 deletions
|
|
@ -846,76 +846,6 @@ func (e *CommsTextorigin) Scan(value any) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Enum values for Countrytype
|
||||
const (
|
||||
CountrytypeUsa Countrytype = "usa"
|
||||
)
|
||||
|
||||
func AllCountrytype() []Countrytype {
|
||||
return []Countrytype{
|
||||
CountrytypeUsa,
|
||||
}
|
||||
}
|
||||
|
||||
type Countrytype string
|
||||
|
||||
func (e Countrytype) String() string {
|
||||
return string(e)
|
||||
}
|
||||
|
||||
func (e Countrytype) Valid() bool {
|
||||
switch e {
|
||||
case CountrytypeUsa:
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
// useful when testing in other packages
|
||||
func (e Countrytype) All() []Countrytype {
|
||||
return AllCountrytype()
|
||||
}
|
||||
|
||||
func (e Countrytype) MarshalText() ([]byte, error) {
|
||||
return []byte(e), nil
|
||||
}
|
||||
|
||||
func (e *Countrytype) UnmarshalText(text []byte) error {
|
||||
return e.Scan(text)
|
||||
}
|
||||
|
||||
func (e Countrytype) MarshalBinary() ([]byte, error) {
|
||||
return []byte(e), nil
|
||||
}
|
||||
|
||||
func (e *Countrytype) UnmarshalBinary(data []byte) error {
|
||||
return e.Scan(data)
|
||||
}
|
||||
|
||||
func (e Countrytype) Value() (driver.Value, error) {
|
||||
return string(e), nil
|
||||
}
|
||||
|
||||
func (e *Countrytype) Scan(value any) error {
|
||||
switch x := value.(type) {
|
||||
case string:
|
||||
*e = Countrytype(x)
|
||||
case []byte:
|
||||
*e = Countrytype(x)
|
||||
case nil:
|
||||
return fmt.Errorf("cannot nil into Countrytype")
|
||||
default:
|
||||
return fmt.Errorf("cannot scan type %T: %v", value, value)
|
||||
}
|
||||
|
||||
if !e.Valid() {
|
||||
return fmt.Errorf("invalid Countrytype value: %s", *e)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Enum values for FileuploadCsvtype
|
||||
const (
|
||||
FileuploadCsvtypePoollist FileuploadCsvtype = "PoolList"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue