Documentation
¶
Index ¶
- Constants
- 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) 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) Tables() ([]*Table, error)
- type Extent
- type FilterCond
- type Function
- type Ordering
- type QueryParam
- type Table
- type TransformFunction
Constants ¶
View Source
const ( JSONTypeString = "string" JSONTypeNumber = "number" JSONTypeBoolean = "boolean" PGTypeBool = "bool" PGTypeNumeric = "numeric" PGTypeGeometry = "geometry" )
View Source
const FunctionIDColumnName = "id"
FunctionIDColumnName is the name for a function-supplied ID
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Catalog ¶
type Catalog interface {
Tables() ([]*Table, error)
// TableByName returns the table with given name.
// It returns nil if the table does not exist
TableByName(name string) (*Table, error)
// 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) 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) Tables ¶
func (cat *CatalogMock) Tables() ([]*Table, error)
type FilterCond ¶ added in v1.1.0
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 QueryParam ¶
type QueryParam struct {
Limit int
Offset int
Bbox *Extent
Filter []*FilterCond
// Columns is the list of columns to return
Columns []string
OrderBy []Ordering
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.