Documentation ¶
Index ¶
- Constants
- Variables
- func InitGenesis(ctx sdk.Context, keeper Keeper, data GenesisState)
- func MustDecodeBech32GeoID(bech string) []byte
- func NewHandler(keeper Keeper) sdk.Handler
- func RegisterCodec(cdc *codec.Codec)
- func ValidateGenesis(data GenesisState) error
- func ValidateGeometry(geom Geometry) (geom.T, error)
- type AppModule
- func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) sdk.Tags
- func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) ([]abci.ValidatorUpdate, sdk.Tags)
- func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
- func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate
- func (AppModule) Name() string
- func (am AppModule) NewHandler() sdk.Handler
- func (am AppModule) NewQuerierHandler() sdk.Querier
- func (AppModule) QuerierRoute() string
- func (am AppModule) RegisterInvariants(ir sdk.InvariantRouter)
- func (AppModule) Route() string
- type AppModuleBasic
- type FeatureType
- type GenesisState
- type Geometry
- type Keeper
- type MsgStoreGeo
- type MsgStoreGeometry
Constants ¶
View Source
const (
ModuleName = "geo"
)
View Source
const PostgresSchema = `` /* 236-byte string literal not displayed */
View Source
const RouterKey = ModuleName
View Source
const (
WGS84_SRID = 4326
)
Variables ¶
View Source
var PostgresMigrations = []string{ PostgresSchema, }
Functions ¶
func MustDecodeBech32GeoID ¶
func NewHandler ¶
NewHandler returns a handler for "data" type messages.
func RegisterCodec ¶
RegisterCodec registers concrete types on the Amino codec
func ValidateGeometry ¶
Types ¶
type AppModule ¶
type AppModule struct { AppModuleBasic // contains filtered or unexported fields }
app module
func NewAppModule ¶
NewAppModule creates a new AppModule object
func (AppModule) BeginBlock ¶
module begin-block
func (AppModule) EndBlock ¶
func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) ([]abci.ValidatorUpdate, sdk.Tags)
module end-block
func (AppModule) ExportGenesis ¶
func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
module export genesis
func (AppModule) InitGenesis ¶
func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate
module init-genesis
func (AppModule) NewQuerierHandler ¶
module querier
func (AppModule) RegisterInvariants ¶
func (am AppModule) RegisterInvariants(ir sdk.InvariantRouter)
register invariants
type AppModuleBasic ¶
type AppModuleBasic struct{}
app module basics object
func (AppModuleBasic) DefaultGenesis ¶
func (AppModuleBasic) DefaultGenesis() json.RawMessage
default genesis state
func (AppModuleBasic) RegisterCodec ¶
func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
register module codec
func (AppModuleBasic) ValidateGenesis ¶
func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
module validate genesis
type FeatureType ¶
type FeatureType int
const ( Point FeatureType = iota LineString Polygon MultiPoint MultiLineString MultiPolygon )
func GetFeatureType ¶
func GetFeatureType(g geom.T) (FeatureType, error)
type GenesisState ¶
type GenesisState struct {
Geometries []Geometry `json:"geometries"`
}
GenesisState - geo genesis state
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
DefaultGenesisState creates a default GenesisState object
func ExportGenesis ¶
func ExportGenesis(ctx sdk.Context, keeper Keeper) GenesisState
ExportGenesis returns a GenesisState for a given context and keeper.
func NewGenesisState ¶
func NewGenesisState() GenesisState
NewGenesisState creates a new GenesisState object
type Geometry ¶
type Geometry struct { Type FeatureType `json:"type"` // EWKB representation of the geo feature. Must be in the WGS84 coordinate // system and represent a Point, LineString, Polygon, MultiPoint, MultiLineString or MultiPolygon EWKB []byte `json:"ewkb,omitempty"` }
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func (Keeper) GetGeometry ¶
func (Keeper) StoreGeometry ¶
type MsgStoreGeo ¶
type MsgStoreGeo struct { Data Geometry `json:"data"` Signer sdk.AccAddress `json:"signer"` }
type MsgStoreGeometry ¶
type MsgStoreGeometry struct { Data Geometry `json:"data"` Signer sdk.AccAddress `json:"signer"` }
func (MsgStoreGeometry) GetSignBytes ¶
func (msg MsgStoreGeometry) GetSignBytes() []byte
func (MsgStoreGeometry) GetSigners ¶
func (msg MsgStoreGeometry) GetSigners() []sdk.AccAddress
func (MsgStoreGeometry) Route ¶
func (MsgStoreGeometry) Route() string
func (MsgStoreGeometry) Type ¶
func (MsgStoreGeometry) Type() string
func (MsgStoreGeometry) ValidateBasic ¶
func (msg MsgStoreGeometry) ValidateBasic() sdk.Error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.