placesvc

package
v0.0.0-...-a8c9a41 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Box

type Box struct {
	X1 float64
	Y1 float64
	X2 float64
	Y2 float64
}

type Config

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

Configuration structure.

func New

func New(opts ...func(*Config)) (*Config, error)

func (*Config) CreatePlaceIndex

func (config *Config) CreatePlaceIndex(description string, tags *map[string]string) (*location.CreatePlaceIndexOutput, error)

func (*Config) DeletePlaceIndex

func (config *Config) DeletePlaceIndex() (*location.DeletePlaceIndexOutput, error)

func (*Config) DescribePlaceIndex

func (config *Config) DescribePlaceIndex(indexName string) (*location.DescribePlaceIndexOutput, error)

func (*Config) ListPlaceIndexes

func (config *Config) ListPlaceIndexes() (*location.ListPlaceIndexesOutput, error)

func (*Config) SearchPlaceIndexForPosition

func (config *Config) SearchPlaceIndexForPosition(latLon *LatLon) (*location.SearchPlaceIndexForPositionOutput, error)

func (*Config) SearchPlaceIndexForSuggestions

func (config *Config) SearchPlaceIndexForSuggestions(search *SuggestionSearch) (*location.SearchPlaceIndexForSuggestionsOutput, error)

func (*Config) SearchPlaceIndexForText

func (config *Config) SearchPlaceIndexForText(search *SuggestionSearch) (*location.SearchPlaceIndexForTextOutput, error)

func (*Config) UpdatePlaceIndex

func (config *Config) UpdatePlaceIndex(description string) (*location.UpdatePlaceIndexOutput, error)

type LatLon

type LatLon struct {
	Latitude  float64
	Longitude float64
}

type Option

type Option func(config *Config)

func SetAWSProfile

func SetAWSProfile(profile string) Option

func SetAWSRegion

func SetAWSRegion(region string) Option

func SetIndexName

func SetIndexName(indexName string) Option

func SetIndexService

func SetIndexService(indexService string) Option

func SetLanguage

func SetLanguage(language string) Option

func SetLogger

func SetLogger(log *logrus.Logger) Option

type SuggestionSearch

type SuggestionSearch struct {
	// The free-form partial text to use to generate place suggestions. For example,
	// eiffel tow.
	//
	// This member is required.
	Text *string

	// An optional parameter that indicates a preference for place suggestions that are
	// closer to a specified position. If provided, this parameter must contain a pair
	// of numbers. The first number represents the X coordinate, or longitude; the
	// second number represents the Y coordinate, or latitude. For example, [-123.1174,
	// 49.2847] represents the position with longitude -123.1174 and latitude 49.2847.
	// BiasPosition and FilterBBox are mutually exclusive. Specifying both options
	// results in an error.
	BiasPosition *LatLon

	// An optional parameter that limits the search results by returning only
	// suggestions within a specified bounding box. If provided, this parameter must
	// contain a total of four consecutive numbers in two pairs. The first pair of
	// numbers represents the X and Y coordinates (longitude and latitude,
	// respectively) of the southwest corner of the bounding box; the second pair of
	// numbers represents the X and Y coordinates (longitude and latitude,
	// respectively) of the northeast corner of the bounding box. For example,
	// [-12.7935, -37.4835, -12.0684, -36.9542] represents a bounding box where the
	// southwest corner has longitude -12.7935 and latitude -37.4835, and the northeast
	// corner has longitude -12.0684 and latitude -36.9542. FilterBBox and BiasPosition
	// are mutually exclusive. Specifying both options results in an error.
	FilterBBox *Box

	// An optional parameter that limits the search results by returning only
	// suggestions within the provided list of countries.
	//
	// * Use the ISO 3166
	// (https://www.iso.org/iso-3166-country-codes.html) 3-digit country code. For
	// example, Australia uses three upper-case characters: AUS.
	FilterCountries []string

	// The preferred language used to return results. The value must be a valid BCP 47
	// (https://tools.ietf.org/search/bcp47) language tag, for example, en for English.
	// This setting affects the languages used in the results. It does not change which
	// results are returned. If the language is not specified, or not supported for a
	// particular result, the partner automatically chooses a language for the result.
	// Used only when the partner selected is Here.
	Language *string
}

Jump to

Keyboard shortcuts

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