Documentation
¶
Index ¶
- Constants
- Variables
- func Degrees(rad float64) float64
- func Lat2y(lat float64) float64
- func LatLngToTile(level int, lat, lng float64) (row, column int)
- func Lon2x(lon float64) float64
- func MITMProxyTransport() (*http.Transport, error)
- func Radians(deg float64) float64
- func ServiceRootFromTenant(base string, tenantId string) string
- func X2lat(x float64) float64
- func Y2lat(y float64) float64
- type AdminInfo
- type ArcGIS
- func (ag *ArcGIS) AdminInfo(ctx context.Context, serviceName string, serviceType ServiceType) (*AdminInfo, error)
- func (ag *ArcGIS) GeocodeFindAddressCandidates(ctx context.Context, address string) (*response.GeocodeFindAddressCandidates, error)
- func (ag *ArcGIS) Info(ctx context.Context) (*RestInfo, error)
- func (ag *ArcGIS) MapServices(ctx context.Context) ([]MapService, error)
- func (ag *ArcGIS) NewServiceFeature(ctx context.Context, name string, url url.URL) (*ServiceFeature, error)
- func (ag *ArcGIS) PermissionList(ctx context.Context, serviceName string, serviceType ServiceType) (*response.PermissionSlice, error)
- func (ag *ArcGIS) PortalsGlobal(ctx context.Context) (*response.Portal, error)
- func (ag *ArcGIS) PortalsSelf(ctx context.Context) (*response.Portal, error)
- func (ag *ArcGIS) Query(ctx context.Context, service string, layer_id uint, query *Query) (*QueryResult, error)
- func (ag *ArcGIS) QueryCount(ctx context.Context, service string, layer_id uint) (*QueryResultCount, error)
- func (ag *ArcGIS) QueryRaw(ctx context.Context, service string, layer_id uint, query *Query) ([]byte, error)
- func (ag *ArcGIS) Search(ctx context.Context, query string) (*SearchResponse, error)
- func (ag *ArcGIS) SearchInAccount(ctx context.Context, query string) (*SearchResponse, error)
- func (ag *ArcGIS) Services(ctx context.Context) ([]*ServiceFeature, error)
- func (ag *ArcGIS) WebhookList(ctx context.Context, serviceName string, serviceType ServiceType) (*WebhookSlice, error)
- type AuthInfo
- type Authenticator
- type AuthenticatorOAuth
- type AuthenticatorToken
- type AuthenticatorUsernamePassword
- type CodeWrapper
- type CodedValue
- type DefaultValueWrapper
- type Domain
- type ErrorFromAPI
- type ErrorResponse
- type Feature
- type Field
- type LayerFeature
- type MapService
- type Position
- type Query
- type QueryResult
- type QueryResultCount
- type ResourceInfo
- type ResponseServiceInfo
- type ResponseURLs
- type RestInfo
- type SearchResponse
- type SearchResult
- type ServerURL
- type ServerURLCollection
- type ServiceFeature
- type ServiceListing
- type ServiceType
- type SpatialReference
- type Table
- type UniqueIdField
- type Usage
- type Webhook
- type WebhookListResponse
- type WebhookSlice
Constants ¶
View Source
const ( APIErrorUnrecognized apiErrorType = "" APIErrorInvalidAuthToken apiErrorType = "invalid_auth_token" APIErrorInvalidRequest apiErrorType = "invalid_request" APIErrorNotPermitted apiErrorType = "not_permitted" )
View Source
const R = 6378137.0
Variables ¶
View Source
var ( ErrorInvalidAuthToken *apiError = &apiError{ Code: 400, Description: "invalid auth token", Details: []string{}, ErrorType: APIErrorInvalidAuthToken, Message: "invalid auth token", } ErrorInvalidRefreshToken *apiError = &apiError{ Code: 498, Description: "invalidated refresh_token", Details: []string{}, ErrorType: APIErrorInvalidRequest, Message: "invalidated refresh_token", } ErrorNotPermitted *apiError = &apiError{ Code: 403, Description: "User does not have permissions to access this service", Details: []string{}, ErrorType: APIErrorNotPermitted, Message: "not permitted", } )
View Source
var ServiceTypeNames = map[ServiceType]string{ ServiceTypeGPServer: "GPServer", ServiceTypeFeatureServer: "FeatureServer", }
Functions ¶
func LatLngToTile ¶ added in v0.0.7
LatLngToTile converts GPS coordinates to ArcGIS tile coordinates
func MITMProxyTransport ¶ added in v0.0.7
func ServiceRootFromTenant ¶ added in v0.0.3
Types ¶
type AdminInfo ¶ added in v0.0.6
type AdminInfo struct {
CurrentVersion string `json:"currentversion"`
}
type ArcGIS ¶
type ArcGIS struct {
AccountID string
// contains filtered or unexported fields
}
Root structure for an instance of the ArcGIS API
func NewArcGISAuth ¶ added in v0.0.7
func NewArcGISAuth(ctx context.Context, auth Authenticator) (*ArcGIS, error)
func NewArcGISTransport ¶ added in v0.0.7
func (*ArcGIS) GeocodeFindAddressCandidates ¶ added in v0.0.7
func (*ArcGIS) MapServices ¶ added in v0.0.7
func (ag *ArcGIS) MapServices(ctx context.Context) ([]MapService, error)
func (*ArcGIS) NewServiceFeature ¶ added in v0.0.7
func (*ArcGIS) PermissionList ¶ added in v0.0.6
func (ag *ArcGIS) PermissionList(ctx context.Context, serviceName string, serviceType ServiceType) (*response.PermissionSlice, error)
func (*ArcGIS) PortalsGlobal ¶ added in v0.0.7
func (*ArcGIS) PortalsSelf ¶ added in v0.0.3
func (*ArcGIS) QueryCount ¶ added in v0.0.3
func (*ArcGIS) SearchInAccount ¶ added in v0.0.7
func (*ArcGIS) Services ¶ added in v0.0.3
func (ag *ArcGIS) Services(ctx context.Context) ([]*ServiceFeature, error)
func (*ArcGIS) WebhookList ¶ added in v0.0.4
func (ag *ArcGIS) WebhookList(ctx context.Context, serviceName string, serviceType ServiceType) (*WebhookSlice, error)
type AuthInfo ¶
type AuthInfo struct {
// contains filtered or unexported fields
}
Basic information about the REST API itself
type Authenticator ¶ added in v0.0.3
type Authenticator interface {
// contains filtered or unexported methods
}
type AuthenticatorOAuth ¶ added in v0.0.3
type AuthenticatorToken ¶ added in v0.0.3
type AuthenticatorToken struct {
Token string
}
Authentication by adding in a 'token=?' query argument to requests
type AuthenticatorUsernamePassword ¶ added in v0.0.7
type CodeWrapper ¶
type CodeWrapper string
func (*CodeWrapper) UnmarshalJSON ¶
func (c *CodeWrapper) UnmarshalJSON(data []byte) (err error)
type CodedValue ¶
type CodedValue struct {
Code CodeWrapper
Name string
}
type DefaultValueWrapper ¶
type DefaultValueWrapper string
func (*DefaultValueWrapper) UnmarshalJSON ¶
func (d *DefaultValueWrapper) UnmarshalJSON(data []byte) (err error)
type Domain ¶
type Domain struct {
CodedValues []CodedValue
MergePolicy string
Name string
SplitPolicy string
Type string
}
type ErrorFromAPI ¶
type ErrorFromAPI struct {
Code int `json:"code"`
Details []string `json:"details"`
Error string `json:"error"`
Description string `json:"error_description"`
Message string `json:"message"`
}
Errors at the API level
func (ErrorFromAPI) HasDetail ¶ added in v0.0.7
func (e ErrorFromAPI) HasDetail(s string) bool
type ErrorResponse ¶ added in v0.0.4
type ErrorResponse struct {
Error ErrorFromAPI `json:"error"`
}
func (ErrorResponse) AsError ¶ added in v0.0.4
func (e ErrorResponse) AsError(ctx context.Context) apiError
type LayerFeature ¶ added in v0.0.3
type LayerFeature struct {
ID uint
Name string
ParentLayerID int
DefaultVisibility bool
SubLayerIDs *string
MinScale int
MaxScale int
Type string
GeometryType string
}
Feature Server details
type MapService ¶ added in v0.0.7
type Position ¶
func GeometryToPosition ¶
type Query ¶
type QueryResult ¶
type QueryResult struct {
Features []Feature
Fields []Field
GeometryType string
GlobalIDFieldName string
ObjectIdFieldName string
SpatialReference SpatialReference
UniqueIdField UniqueIdField
}
type QueryResultCount ¶
type QueryResultCount struct {
Count int
}
type ResourceInfo ¶ added in v0.0.3
type ResourceInfo struct {
CurrentVersion float32 `json:"currentVersion"`
MapName string `json:"mapName"`
SupportsDynamicLayers bool `json:"supportsDynamicLayers"`
//Layers []LayerResource
//Tables TableResource
//SpatialReference SpatialReference `json:"spatialReference"`
SingleFusedMapCache bool `json:"singleFusedMapCache"`
}
type ResponseServiceInfo ¶ added in v0.0.7
type ResponseServiceInfo struct {
CurrentVersion float64
Services []ServiceListing
}
type ResponseURLs ¶ added in v0.0.7
type ResponseURLs struct {
URLs ServerURLCollection `json:"urls"`
}
type SearchResponse ¶ added in v0.0.3
type SearchResponse struct {
Total int `json:"total"`
Start int `json:"start"`
Num int `json:"num"`
NextStart int `json:"nextStart"`
Results []SearchResult `json:"results"`
}
type SearchResult ¶ added in v0.0.3
type SearchResult struct {
ID string `json:"id"`
Owner string `json:"owner"`
OrgID string `json:"orgId"`
Created int64 `json:"created"`
IsOrgItem bool `json:"isOrgItem"`
Modified int64 `json:"modified"`
Guid *string `json:"guid"`
Name string `json:"name"`
Title string `json:"title"`
Type string `json:"type"`
TypeKeywords []string `json:"typeKeywords"`
Description string `json:"description"`
Tags []string `json:"tags"`
Snippet string `json:"snippet"`
Thumbnail string `json:"thumbnail"`
Documentation *string `json:"documentation"`
Extent [][]float32 `json:"extent"`
Categories []string `json:"categories"`
SpatialReference string `json:"spatialReference"`
AccessInformation string `json:"accessInformation"`
Classification *string `json:"classification"`
LicenseInfo string `json:"licenseInfo"`
Culture string `json:"culture"`
Properties *map[string]interface{} `json:"properties"`
AdvancedSettings *string `json:"advancedSettings"`
URL string `json:"url"`
ProxyFilter *string `json:"proxyFilter"`
Access string `json:"access"`
Size int `json:"size"`
SubInfo int `json:"subInfo"`
AppCategories []string `json:"appCategories"`
Industries []string `json:"industries"`
Languages []string `json:"languages"`
LargeThumbnail *string `json:"largeThumbnail"`
Banner *string `json:"banner"`
Screenshots []string `json:"screenshots"`
Listed bool `json:"listed"`
NumComments int `json:"numComments"`
NumRatings int `json:"numRatings"`
AvgRating int `json:"avgRating"`
NumViews int `json:"numViews"`
ScoreCompleteness int `json:"scoreCompleteness"`
GroupDesignations *string `json:"groupDesignations"`
ApiToken1ExpirationDate int `json:"apiToken1ExpirationDate"`
ApiToken2ExpirationDate int `json:"apiToken2ExpirationDate"`
LastViewed int64 `json:"lastViewed"`
}
type ServerURLCollection ¶ added in v0.0.7
type ServiceFeature ¶ added in v0.0.7
type ServiceListing ¶
Listing of available services
type ServiceType ¶ added in v0.0.4
type ServiceType int
const ( ServiceTypeGPServer ServiceType = iota ServiceTypeFeatureServer )
type SpatialReference ¶
type UniqueIdField ¶
Query endpoint
type WebhookListResponse ¶ added in v0.0.4
type WebhookListResponse struct {
Webhooks []Webhook `json:"webhooks"`
}
type WebhookSlice ¶ added in v0.0.7
type WebhookSlice = []Webhook
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
schema-to-sql
command
|
|
|
schema-to-struct
command
|
|
|
counts
command
|
|
|
exporter
command
|
|
|
fieldseeker-default
command
|
|
|
fieldseeker-search
command
|
|
|
map-tile
command
|
|
|
service-request
command
|
|
|
trap-data
command
|
|
|
version
command
|
|
Click to show internal directories.
Click to hide internal directories.