regioncn_golang_client

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

README

regioncn-golang-client

go get github.com/yingzhuo/regioncn-golang-client

Documentation

Index

Constants

View Source
const (
	Json     = "json"
	Protobuf = "protobuf"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(config *Config) *Client

func NewJsonClient

func NewJsonClient(host string, port int) *Client

func NewProtobufClient

func NewProtobufClient(host string, port int) *Client

func (*Client) GetAllProvince

func (cli *Client) GetAllProvince() []*Model

func (*Client) GetAreaByCityCode

func (cli *Client) GetAreaByCityCode(code string) []*Model

func (*Client) GetCityByProvinceCode

func (cli *Client) GetCityByProvinceCode(code string) []*Model

func (*Client) GetStreetByAreaCode

func (cli *Client) GetStreetByAreaCode(code string) []*Model

type Config

type Config struct {
	Host         string
	Port         int
	ResponseType string
}

type Model

type Model struct {
	Id        int64   `json:"id"`
	Code      string  `json:"code"`
	Name      string  `json:"name"`
	ShortName string  `json:"shortName"`
	Lat       float64 `json:"lat"`
	Lng       float64 `json:"lng"`
}

func (*Model) String

func (m *Model) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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