Documentation ¶
Index ¶
- Constants
- func StartWorker(port string, name string, offline bool)
- type Acp
- func (a *Acp) Connect(processName string, protocolMin, protocolMax int) (err error)
- func (a *Acp) EstablishProtocol(minProtocol, maxProtocol int) bool
- func (a *Acp) Flush()
- func (a *Acp) Get(dataType string) (value interface{}, err *AcpErr)
- func (a *Acp) GetBool() bool
- func (a *Acp) GetByte() int
- func (a *Acp) GetCoord() [2]float64
- func (a *Acp) GetFloat() float64
- func (a *Acp) GetInt() int
- func (a *Acp) GetLong() int64
- func (a *Acp) GetShort() int
- func (a *Acp) GetShortFloat() float32
- func (a *Acp) GetString() string
- func (a *Acp) GetULong() uint64
- func (a *Acp) GetUShort() int
- func (a *Acp) GetUbyte() int
- func (a *Acp) GetUint() int
- func (a *Acp) Put(dataType string, value interface{}) (err error)
- func (a *Acp) PutBool(b bool)
- func (a *Acp) PutByte(value int8)
- func (a *Acp) PutFloat(value float64)
- func (a *Acp) PutInt(value int32)
- func (a *Acp) PutLong(value int64)
- func (a *Acp) PutShort(value int16)
- func (a *Acp) PutShortFloat(value float32)
- func (a *Acp) PutString(s string)
- func (a *Acp) PutULong(value uint64)
- func (a *Acp) PutUShort(value uint16)
- func (a *Acp) PutUbyte(value uint8)
- func (a *Acp) PutUint(value uint32)
- func (a *Acp) ReadNumber(data interface{})
- func (a *Acp) VerifyConnection(name string) bool
- func (a *Acp) Write(buf []byte)
- type AcpErr
- type BBox
- type Cache
- type FeaturesMap
- type IAcp
- type TestAcp
- func (a *TestAcp) Connect(processName string, protocolMin, protocolMax int) (err error)
- func (a *TestAcp) EstablishProtocol(minProtocol, maxProtocol int) bool
- func (a *TestAcp) Flush()
- func (a *TestAcp) Get(dataType string) (value interface{}, err *AcpErr)
- func (a *TestAcp) GetBool() bool
- func (a *TestAcp) GetByte() int
- func (a *TestAcp) GetCoord() [2]float64
- func (a *TestAcp) GetFloat() float64
- func (a *TestAcp) GetInt() int
- func (a *TestAcp) GetLong() int64
- func (a *TestAcp) GetShort() int
- func (a *TestAcp) GetShortFloat() float32
- func (a *TestAcp) GetString() string
- func (a *TestAcp) GetULong() uint64
- func (a *TestAcp) GetUShort() int
- func (a *TestAcp) GetUbyte() int
- func (a *TestAcp) GetUint() int
- func (a *TestAcp) Put(dataType string, value interface{}) (err error)
- func (a *TestAcp) PutBool(b bool)
- func (a *TestAcp) PutByte(value int8)
- func (a *TestAcp) PutFloat(value float64)
- func (a *TestAcp) PutInt(value int32)
- func (a *TestAcp) PutLong(value int64)
- func (a *TestAcp) PutShort(value int16)
- func (a *TestAcp) PutShortFloat(value float32)
- func (a *TestAcp) PutString(s string)
- func (a *TestAcp) PutULong(value uint64)
- func (a *TestAcp) PutUShort(value uint16)
- func (a *TestAcp) PutUbyte(value uint8)
- func (a *TestAcp) PutUint(value uint32)
- func (a *TestAcp) ReadNumber(data interface{})
- func (a *TestAcp) VerifyConnection(name string) bool
- func (a *TestAcp) Write(buf []byte)
- type Worker
- func (w *Worker) DumpFeatures(request *config.DumpRequest, resp *config.FeaturesResponse) (respErr error)
- func (w *Worker) GetFeature(request *config.FeatureRequest, resp *config.FeaturesResponse) (respErr error)
- func (w *Worker) GetFeatures(request *config.FeaturesRequest, resp *config.FeaturesResponse) (respErr error)
- func (t *Worker) GetTestFeature(request *config.FeatureRequest, resp *config.FeaturesResponse) error
- func (t *Worker) GetTestFeatures(request *config.FeaturesRequest, resp *config.FeaturesResponse) error
- func (w *Worker) SearchFeatures(request *config.SearchRequest, resp *config.FeaturesResponse) (respErr error)
- func (t *Worker) TestSearchFeatures(request *config.SearchRequest, resp *config.FeaturesResponse) error
Constants ¶
const ( // MoreDataToGet more records to get from ACP MoreDataToGet = 0 // NoMoreDataToGet no more records to get from ACP NoMoreDataToGet = 1 // RecordNotFound record was not found RecordNotFound = 1 )
Variables ¶
This section is empty.
Functions ¶
func StartWorker ¶
StartWorker register struct and start RPC worker server
Types ¶
type Acp ¶
type Acp struct { Name string // contains filtered or unexported fields }
Acp holds I/O buffer to communicate with Magik ACP
func (*Acp) EstablishProtocol ¶
EstablishProtocol checks Acp protocol
func (*Acp) GetShortFloat ¶
GetShortFloat read float32 from Acp input
func (*Acp) PutShortFloat ¶
PutShortFloat sends short float value to Acp output
func (*Acp) ReadNumber ¶
func (a *Acp) ReadNumber(data interface{})
ReadNumber reads number from Acp input
func (*Acp) VerifyConnection ¶
VerifyConnection verify Acp process name
type AcpErr ¶
type AcpErr struct {
Err string
}
AcpErr ACP error
func NewAcpErrf ¶
NewAcpErrf new error from formated string
type BBox ¶
type BBox struct {
// contains filtered or unexported fields
}
BBox struct to support Bounding box operations
func NewBBoxFromCoordinate ¶
func NewBBoxFromCoordinate(coord geojson.Coordinate) *BBox
NewBBoxFromCoordinate creates new BBox from coordinate
func NewBBoxFromCoordinates ¶
func NewBBoxFromCoordinates(coords geojson.Coordinates) *BBox
NewBBoxFromCoordinates creates new BBox from coordinates
type FeaturesMap ¶
FeaturesMap struct to cache Features by id
func NewFeaturesMap ¶
func NewFeaturesMap() FeaturesMap
NewFeaturesMap creates new empty FeaturesMap
type IAcp ¶
type IAcp interface { Flush() Write([]byte) PutBool(bool) PutUbyte(uint8) PutByte(int8) PutUShort(uint16) PutShort(int16) PutUint(uint32) PutInt(int32) PutULong(uint64) PutLong(int64) PutShortFloat(float32) PutFloat(float64) PutString(string) ReadNumber(interface{}) GetBool() bool GetUbyte() int GetByte() int GetUShort() int GetShort() int GetUint() int GetInt() int GetULong() uint64 GetLong() int64 GetShortFloat() float32 GetFloat() float64 GetString() string GetCoord() [2]float64 VerifyConnection(string) bool EstablishProtocol(int, int) bool Connect(string, int, int) error Put(string, interface{}) error Get(string) (interface{}, *AcpErr) }
IAcp holds I/O buffer to communicate with Magik ACP
type TestAcp ¶
type TestAcp struct {
Name string
}
TestAcp holds I/O buffer to communicate with Magik ACP
func NewTestAcp ¶
NewTestAcp creates and init new Acp with name
func (*TestAcp) EstablishProtocol ¶
EstablishProtocol checks Acp protocol
func (*TestAcp) GetShortFloat ¶
GetShortFloat read float32 from Acp input
func (*TestAcp) PutShortFloat ¶
PutShortFloat sends short float value to Acp output
func (*TestAcp) ReadNumber ¶
func (a *TestAcp) ReadNumber(data interface{})
ReadNumber reads number from Acp input
func (*TestAcp) VerifyConnection ¶
VerifyConnection verify Acp process name
type Worker ¶
Worker type to wrap RPC communication
func (*Worker) DumpFeatures ¶
func (w *Worker) DumpFeatures(request *config.DumpRequest, resp *config.FeaturesResponse) (respErr error)
DumpFeatures receive from ACP list of features
func (*Worker) GetFeature ¶
func (w *Worker) GetFeature(request *config.FeatureRequest, resp *config.FeaturesResponse) (respErr error)
GetFeature receive from ACP list of features
func (*Worker) GetFeatures ¶
func (w *Worker) GetFeatures(request *config.FeaturesRequest, resp *config.FeaturesResponse) (respErr error)
GetFeatures receive from ACP list of features
func (*Worker) GetTestFeature ¶
func (t *Worker) GetTestFeature(request *config.FeatureRequest, resp *config.FeaturesResponse) error
GetTestFeature get feature details
func (*Worker) GetTestFeatures ¶
func (t *Worker) GetTestFeatures(request *config.FeaturesRequest, resp *config.FeaturesResponse) error
GetTestFeatures get features id and geom
func (*Worker) SearchFeatures ¶
func (w *Worker) SearchFeatures(request *config.SearchRequest, resp *config.FeaturesResponse) (respErr error)
SearchFeatures receive from ACP list of features
func (*Worker) TestSearchFeatures ¶
func (t *Worker) TestSearchFeatures(request *config.SearchRequest, resp *config.FeaturesResponse) error
TestSearchFeatures get feature details