Documentation
¶
Index ¶
- Constants
- type CountValue
- func (*CountValue) Descriptor() ([]byte, []int)
- func (count *CountValue) Encode() ([]byte, error)
- func (m *CountValue) GetCurrent() uint32
- func (count *CountValue) Inc()
- func (*CountValue) ProtoMessage()
- func (m *CountValue) Reset()
- func (m *CountValue) String() string
- func (count *CountValue) ValidNextValue(proposed uint32) bool
- func (m *CountValue) XXX_DiscardUnknown()
- func (m *CountValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CountValue) XXX_Merge(src proto.Message)
- func (m *CountValue) XXX_Size() int
- func (m *CountValue) XXX_Unmarshal(b []byte) error
- type Increment
- func (*Increment) Descriptor() ([]byte, []int)
- func (inc *Increment) Encode() ([]byte, error)
- func (m *Increment) GetValue() uint32
- func (*Increment) ProtoMessage()
- func (m *Increment) Reset()
- func (m *Increment) String() string
- func (m *Increment) XXX_DiscardUnknown()
- func (m *Increment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Increment) XXX_Merge(src proto.Message)
- func (m *Increment) XXX_Size() int
- func (m *Increment) XXX_Unmarshal(b []byte) error
- type QuerySchema
- type Schema
- type Service
- type Wallet
Constants ¶
View Source
const ServiceName = "counter_example"
ServiceName is just that...
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CountValue ¶
type CountValue struct { Current uint32 `protobuf:"varint,1,opt,name=current,proto3" json:"current,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Storage
func DecodeCount ¶
func DecodeCount(raw []byte) (*CountValue, error)
DecodeCount bytes => Countvalue
func (*CountValue) Descriptor ¶
func (*CountValue) Descriptor() ([]byte, []int)
func (*CountValue) GetCurrent ¶
func (m *CountValue) GetCurrent() uint32
func (*CountValue) ProtoMessage ¶
func (*CountValue) ProtoMessage()
func (*CountValue) Reset ¶
func (m *CountValue) Reset()
func (*CountValue) String ¶
func (m *CountValue) String() string
func (*CountValue) ValidNextValue ¶
func (count *CountValue) ValidNextValue(proposed uint32) bool
ValidNextValue check if the proposed count is correct
func (*CountValue) XXX_DiscardUnknown ¶
func (m *CountValue) XXX_DiscardUnknown()
func (*CountValue) XXX_Marshal ¶
func (m *CountValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CountValue) XXX_Merge ¶
func (m *CountValue) XXX_Merge(src proto.Message)
func (*CountValue) XXX_Size ¶
func (m *CountValue) XXX_Size() int
func (*CountValue) XXX_Unmarshal ¶
func (m *CountValue) XXX_Unmarshal(b []byte) error
type Increment ¶
type Increment struct { Value uint32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Message
func (*Increment) Descriptor ¶
func (*Increment) ProtoMessage ¶
func (*Increment) ProtoMessage()
func (*Increment) XXX_DiscardUnknown ¶
func (m *Increment) XXX_DiscardUnknown()
func (*Increment) XXX_Marshal ¶
func (*Increment) XXX_Unmarshal ¶
type QuerySchema ¶ added in v0.4.1
type QuerySchema struct {
// contains filtered or unexported fields
}
QuerySchema is really overkill for this example, but it's here for demo purposes It provides a Prefixed wrapper to a snapshot of the state store
func NewQuerySchema ¶ added in v0.4.1
func NewQuerySchema(store sdk.Snapshot) QuerySchema
func (QuerySchema) GetCountByKey ¶ added in v0.4.1
func (qs QuerySchema) GetCountByKey(k []byte) sdk.Result
type Schema ¶
type Schema struct {
// contains filtered or unexported fields
}
Schema wraps a prefixed store for our service
type Service ¶
type Service struct{}
Service is a simple service to demonstrate the menta API. It stores a counter for each tx.sender
func (Service) Initialize ¶
Initialize is called on the genesis block. Not used
type Wallet ¶
type Wallet struct {
// contains filtered or unexported fields
}
func CreateWallet ¶
func CreateWallet() Wallet
func WalletFromSeed ¶
Click to show internal directories.
Click to hide internal directories.