obj

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddrIsEmpty

func AddrIsEmpty(a dawg.Address) bool

AddrIsEmpty will tell if an address is empty.

func AddressFmt

func AddressFmt(a dawg.Address) string

AddressFmt returns a formatted address string from and Address interface.

func AddressFmtIndent

func AddressFmtIndent(a dawg.Address, l int) string

AddressFmtIndent returns AddressFmt but with the second line indented to some length l.

func AsGob added in v0.0.3

func AsGob(a *Address) ([]byte, error)

AsGob converts the Address into a binary format using the gob package.

func AsJSON added in v0.0.3

func AsJSON(a *Address) ([]byte, error)

AsJSON converts the Address to json format.

Types

type Address

type Address struct {
	Street   string `config:"street" json:"street"`
	CityName string `config:"cityname" json:"cityname"`
	State    string `config:"state" json:"state"`
	Zipcode  string `config:"zipcode" json:"zipcode"`
}

Address represents a street address

func FromAddress

func FromAddress(a dawg.Address) *Address

FromAddress makes an obj.Address from an address interface.

func FromGob added in v0.0.3

func FromGob(raw []byte) (*Address, error)

FromGob will create a new address from binary data encoded using the gob package.

func (*Address) City

func (a *Address) City() string

City returns the city

func (*Address) LineOne

func (a *Address) LineOne() string

LineOne returns the first line of the address

func (*Address) StateCode

func (a *Address) StateCode() string

StateCode returns the state code of the address

func (Address) String

func (a Address) String() string

func (*Address) Zip

func (a *Address) Zip() string

Zip returns the zip code.

Jump to

Keyboard shortcuts

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