Documentation
¶
Index ¶
Constants ¶
View Source
const CName = "any-ns.cache"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CacheService ¶
type CacheService interface {
// call it before you want to check in smart contracts
// it will look up data in Mongo
IsNameAvailable(ctx context.Context, in *nsp.NameAvailableRequest) (out *nsp.NameAvailableResponse, err error)
GetNameByAddress(ctx context.Context, in *nsp.NameByAddressRequest) (out *nsp.NameByAddressResponse, err error)
// call it when you need to read REAL data: smart contracts -> cache
// will return "not found" if can not find name
// will return no error if name is found and data was updated
// will return error if something went wrong
UpdateInCache(ctx context.Context, in *nsp.NameAvailableRequest) (err error)
app.Component
}
type NameDataItem ¶
type NameDataItem struct {
FullName string `bson:"name"`
// always store in LOWER CASE!
OwnerEthAddress string `bson:"owner_eth_address"`
OwnerScwEthAddress string `bson:"owner_scw_eth_address"`
OwnerAnyAddress string `bson:"owner_any_address"`
SpaceId string `bson:"space_id"`
NameExpires int64 `bson:"name_expires"`
}
Click to show internal directories.
Click to hide internal directories.