Documentation
¶
Index ¶
- Constants
- func FunctionQualifiedId(name string) string
- type Catalog
- type CatalogMock
- func (cat *CatalogMock) Close()
- func (cat *CatalogMock) FunctionByName(name string) (*Function, error)
- func (cat *CatalogMock) FunctionData(ctx context.Context, name string, args map[string]string, param *QueryParam) ([]map[string]interface{}, error)
- func (cat *CatalogMock) FunctionFeatures(ctx context.Context, name string, args map[string]string, param *QueryParam) ([]string, error)
- func (cat *CatalogMock) Functions() ([]*Function, error)
- func (cat *CatalogMock) SetIncludeExclude(includeList []string, excludeList []string)
- func (cat *CatalogMock) TableByName(name string) (*Table, error)
- func (cat *CatalogMock) TableFeature(ctx context.Context, name string, id string, param *QueryParam) (string, error)
- func (cat *CatalogMock) TableFeatures(ctx context.Context, name string, param *QueryParam) ([]string, error)
- func (cat *CatalogMock) TableReload(name string)
- func (cat *CatalogMock) Tables() ([]*Table, error)
- type Extent
- type Function
- type PropertyFilter
- type QueryParam
- type Sorting
- type Table
- type TransformFunction
Constants ¶
View Source
const ( //errMsgCollectionNotFound = "Collection not found: %v" //errMsgFeatureNotFound = "Feature not found: %v" SRID_4326 = 4326 SRID_UNKNOWN = -1 )
View Source
const ( JSONTypeString = "string" JSONTypeNumber = "number" JSONTypeBoolean = "boolean" JSONTypeJSON = "json" JSONTypeBooleanArray = "boolean[]" JSONTypeStringArray = "string[]" JSONTypeNumberArray = "number[]" PGTypeBool = "bool" PGTypeNumeric = "numeric" PGTypeJSON = "json" PGTypeGeometry = "geometry" PGTypeTextArray = "_text" )
Constants
View Source
const FunctionIDColumnName = "id"
FunctionIDColumnName is the name for a function-supplied ID
View Source
const SchemaPostGISFTW = "postgisftw"
Variables ¶
This section is empty.
Functions ¶
func FunctionQualifiedId ¶
Creates a fully qualified function id. adds default postgisftw schema if name arg has no schema
Types ¶
type Catalog ¶
type Catalog interface { SetIncludeExclude(includeList []string, excludeList []string) Tables() ([]*Table, error) // TableByName returns the table with given name. // It returns nil if the table does not exist TableByName(name string) (*Table, error) // TableReload reloads volatile table data TableReload(name string) // TableFeatures returns an array of the JSON for the features in a table // It returns nil if the table does not exist TableFeatures(ctx context.Context, name string, param *QueryParam) ([]string, error) // TableFeature returns the JSON text for a table feature with given id // It returns an empty string if the table or feature does not exist TableFeature(ctx context.Context, name string, id string, param *QueryParam) (string, error) Functions() ([]*Function, error) // FunctionByName returns the function with given name. // It returns nil if the function does not exist FunctionByName(name string) (*Function, error) FunctionFeatures(ctx context.Context, name string, args map[string]string, param *QueryParam) ([]string, error) FunctionData(ctx context.Context, name string, args map[string]string, param *QueryParam) ([]map[string]interface{}, error) Close() }
Catalog tbd
type CatalogMock ¶
type CatalogMock struct { TableDefs []*Table FunctionDefs []*Function // contains filtered or unexported fields }
func (*CatalogMock) Close ¶
func (cat *CatalogMock) Close()
func (*CatalogMock) FunctionByName ¶
func (cat *CatalogMock) FunctionByName(name string) (*Function, error)
func (*CatalogMock) FunctionData ¶
func (cat *CatalogMock) FunctionData(ctx context.Context, name string, args map[string]string, param *QueryParam) ([]map[string]interface{}, error)
func (*CatalogMock) FunctionFeatures ¶
func (cat *CatalogMock) FunctionFeatures(ctx context.Context, name string, args map[string]string, param *QueryParam) ([]string, error)
func (*CatalogMock) Functions ¶
func (cat *CatalogMock) Functions() ([]*Function, error)
func (*CatalogMock) SetIncludeExclude ¶
func (cat *CatalogMock) SetIncludeExclude(includeList []string, excludeList []string)
func (*CatalogMock) TableByName ¶
func (cat *CatalogMock) TableByName(name string) (*Table, error)
func (*CatalogMock) TableFeature ¶
func (cat *CatalogMock) TableFeature(ctx context.Context, name string, id string, param *QueryParam) (string, error)
func (*CatalogMock) TableFeatures ¶
func (cat *CatalogMock) TableFeatures(ctx context.Context, name string, param *QueryParam) ([]string, error)
func (*CatalogMock) TableReload ¶
func (cat *CatalogMock) TableReload(name string)
func (*CatalogMock) Tables ¶
func (cat *CatalogMock) Tables() ([]*Table, error)
type Function ¶
type Function struct { ID string Schema string Name string Description string InNames []string InDbTypes []string InTypeMap map[string]string InDefaults []string NumNoDefault int OutNames []string OutDbTypes []string OutJSONTypes []string Types map[string]string GeometryColumn string IDColumn string }
Function tbd
func (*Function) IsGeometryFunction ¶
type PropertyFilter ¶
type QueryParam ¶
type QueryParam struct { Crs int Limit int Offset int Bbox *Extent BboxCrs int FilterSql string Filter []*PropertyFilter // Columns is the list of columns to return Columns []string GroupBy []string SortBy []Sorting Precision int TransformFuns []TransformFunction }
QueryParam holds the optional parameters for a data query
type Table ¶
type Table struct { ID string Schema string Table string Title string Description string GeometryType string GeometryColumn string IDColumn string Srid int Extent Extent Columns []string DbTypes map[string]string JSONTypes []string ColDesc []string }
Table holds metadata for table/view objects
type TransformFunction ¶
TransformFunction denotes a geometry function with arguments
Click to show internal directories.
Click to hide internal directories.