Help us shape the future of Go! Take the 2026 Go Developer Survey

geo

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2022 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Provides = wire.NewSet(
	wire.Struct(new(Controller), "*"),
	wire.Struct(new(Service), "*"),
)

Functions

This section is empty.

Types

type CitiesQuery

type CitiesQuery struct {
	Country string `form:"country" binding:"required"`
	State   string `form:"state" binding:"required"`
	Fields  string `form:"fields"`
}

type Controller

type Controller struct {
	Service *Service
}

func (*Controller) Cities

func (x *Controller) Cities(c *gin.Context) interface{}

func (*Controller) Countries

func (x *Controller) Countries(c *gin.Context) interface{}

func (*Controller) States

func (x *Controller) States(c *gin.Context) interface{}

type CountryQuery

type CountryQuery struct {
	Fields string `form:"fields"`
}

type Service

type Service struct {
	*common.Inject
}

func (*Service) FindCities

func (x *Service) FindCities(
	ctx context.Context,
	country string,
	state string,
	fields []string,
) (data []model.City, err error)

func (*Service) FindCountries

func (x *Service) FindCountries(
	ctx context.Context,
	fields []string,
) (data []model.Country, err error)

func (*Service) FindStates

func (x *Service) FindStates(
	ctx context.Context,
	country string,
	fields []string,
) (data []model.State, err error)

type StatesQuery

type StatesQuery struct {
	Country string `form:"country" binding:"required"`
	Fields  string `form:"fields"`
}

Jump to

Keyboard shortcuts

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