geo

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2023 License: BSD-3-Clause Imports: 10 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 CitiesDto

type CitiesDto struct {
	Country string `query:"country,required"`
	State   string `query:"state,required"`
	Fields  string `query:"fields"`
}

type Controller

type Controller struct {
	Service *Service
}

func (*Controller) Cities

func (x *Controller) Cities(ctx context.Context, c *app.RequestContext)

func (*Controller) Countries

func (x *Controller) Countries(ctx context.Context, c *app.RequestContext)

func (*Controller) States

func (x *Controller) States(ctx context.Context, c *app.RequestContext)

type CountriesDto

type CountriesDto struct {
	Fields string `query:"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 StatesDto

type StatesDto struct {
	Country string `query:"country,required"`
	Fields  string `query:"fields"`
}

Jump to

Keyboard shortcuts

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