Documentation
¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func EncodedKeyToPath(key []byte) string
- func NewIbcPublishEvent(storeKey, friendly string, key, value []byte) sdk.Event
- func NewLegacyStorageEvent(path, value string) sdk.Event
- func PathToChildrenPrefix(path string) []byte
- func PathToEncodedKey(path string) []byte
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- func ValidatePath(path string) error
- type Children
- func (*Children) Descriptor() ([]byte, []int)
- func (m *Children) GetChildren() []string
- func (m *Children) Marshal() (dAtA []byte, err error)
- func (m *Children) MarshalTo(dAtA []byte) (int, error)
- func (m *Children) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Children) ProtoMessage()
- func (m *Children) Reset()
- func (m *Children) Size() (n int)
- func (m *Children) String() string
- func (m *Children) Unmarshal(dAtA []byte) error
- func (m *Children) XXX_DiscardUnknown()
- func (m *Children) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Children) XXX_Merge(src proto.Message)
- func (m *Children) XXX_Size() int
- func (m *Children) XXX_Unmarshal(b []byte) error
- type Data
- func (*Data) Descriptor() ([]byte, []int)
- func (m *Data) GetValue() string
- func (m *Data) Marshal() (dAtA []byte, err error)
- func (m *Data) MarshalTo(dAtA []byte) (int, error)
- func (m *Data) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Data) ProtoMessage()
- func (m *Data) Reset()
- func (m *Data) Size() (n int)
- func (m *Data) String() string
- func (m *Data) Unmarshal(dAtA []byte) error
- func (m *Data) XXX_DiscardUnknown()
- func (m *Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Data) XXX_Merge(src proto.Message)
- func (m *Data) XXX_Size() int
- func (m *Data) XXX_Unmarshal(b []byte) error
- type DataEntry
- func (*DataEntry) Descriptor() ([]byte, []int)
- func (m *DataEntry) GetPath() string
- func (m *DataEntry) GetValue() string
- func (m *DataEntry) Marshal() (dAtA []byte, err error)
- func (m *DataEntry) MarshalTo(dAtA []byte) (int, error)
- func (m *DataEntry) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*DataEntry) ProtoMessage()
- func (m *DataEntry) Reset()
- func (m *DataEntry) Size() (n int)
- func (m *DataEntry) String() string
- func (m *DataEntry) Unmarshal(dAtA []byte) error
- func (m *DataEntry) XXX_DiscardUnknown()
- func (m *DataEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DataEntry) XXX_Merge(src proto.Message)
- func (m *DataEntry) XXX_Size() int
- func (m *DataEntry) XXX_Unmarshal(b []byte) error
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetData() []*DataEntry
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type QueryChildrenRequest
- func (*QueryChildrenRequest) Descriptor() ([]byte, []int)
- func (m *QueryChildrenRequest) GetPagination() *query.PageRequest
- func (m *QueryChildrenRequest) GetPath() string
- func (m *QueryChildrenRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryChildrenRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryChildrenRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryChildrenRequest) ProtoMessage()
- func (m *QueryChildrenRequest) Reset()
- func (m *QueryChildrenRequest) Size() (n int)
- func (m *QueryChildrenRequest) String() string
- func (m *QueryChildrenRequest) Unmarshal(dAtA []byte) error
- func (m *QueryChildrenRequest) XXX_DiscardUnknown()
- func (m *QueryChildrenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryChildrenRequest) XXX_Merge(src proto.Message)
- func (m *QueryChildrenRequest) XXX_Size() int
- func (m *QueryChildrenRequest) XXX_Unmarshal(b []byte) error
- type QueryChildrenResponse
- func (*QueryChildrenResponse) Descriptor() ([]byte, []int)
- func (m *QueryChildrenResponse) GetChildren() []string
- func (m *QueryChildrenResponse) GetPagination() *query.PageResponse
- func (m *QueryChildrenResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryChildrenResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryChildrenResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryChildrenResponse) ProtoMessage()
- func (m *QueryChildrenResponse) Reset()
- func (m *QueryChildrenResponse) Size() (n int)
- func (m *QueryChildrenResponse) String() string
- func (m *QueryChildrenResponse) Unmarshal(dAtA []byte) error
- func (m *QueryChildrenResponse) XXX_DiscardUnknown()
- func (m *QueryChildrenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryChildrenResponse) XXX_Merge(src proto.Message)
- func (m *QueryChildrenResponse) XXX_Size() int
- func (m *QueryChildrenResponse) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryDataRequest
- func (*QueryDataRequest) Descriptor() ([]byte, []int)
- func (m *QueryDataRequest) GetPath() string
- func (m *QueryDataRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryDataRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryDataRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryDataRequest) ProtoMessage()
- func (m *QueryDataRequest) Reset()
- func (m *QueryDataRequest) Size() (n int)
- func (m *QueryDataRequest) String() string
- func (m *QueryDataRequest) Unmarshal(dAtA []byte) error
- func (m *QueryDataRequest) XXX_DiscardUnknown()
- func (m *QueryDataRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryDataRequest) XXX_Merge(src proto.Message)
- func (m *QueryDataRequest) XXX_Size() int
- func (m *QueryDataRequest) XXX_Unmarshal(b []byte) error
- type QueryDataResponse
- func (*QueryDataResponse) Descriptor() ([]byte, []int)
- func (m *QueryDataResponse) GetValue() string
- func (m *QueryDataResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryDataResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryDataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryDataResponse) ProtoMessage()
- func (m *QueryDataResponse) Reset()
- func (m *QueryDataResponse) Size() (n int)
- func (m *QueryDataResponse) String() string
- func (m *QueryDataResponse) Unmarshal(dAtA []byte) error
- func (m *QueryDataResponse) XXX_DiscardUnknown()
- func (m *QueryDataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryDataResponse) XXX_Merge(src proto.Message)
- func (m *QueryDataResponse) XXX_Size() int
- func (m *QueryDataResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type StorageEntry
- type UnimplementedQueryServer
Constants ¶
const ( LegacyEventTypeStorage = "storage" LegacyAttributeKeyPath = "path" LegacyAttributeKeyValue = "value" AttributeValueCategory = ModuleName )
swingset module event types
const ( EventTypeIbcPublish = "ibc_publish" AttributeKeyFriendly = "friendly" AttributeKeyKey = "key" AttributeKeyValue = "value" )
const ( // module name ModuleName = "vstorage" // StoreKey to be used when creating the KVStore StoreKey = ModuleName )
const RouterKey = ModuleName
Variables ¶
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var ( EncodedKeySeparator = []byte{0} PathSeparator = "." EncodedDataPrefix = []byte{0} EncodedNoDataValue = []byte{255} )
- A "path" is a sequence of zero or more dot-separated nonempty strings of 7-bit non-nul, non-dot ASCII characters. So `""`, `"foo"`, and `"foo.bar.baz"` are paths but `"."`, "foo.", and "fo\0o" are not.
- An encoded key for a path is the path prefixed with its length (in ASCII digits), separated by nul, followed by the path with dots replaced with nul. So the path key for the empty path is `0\0`.
- Store entries exist if and only if self or some descendant has an entry with data.
- Store entries with data contain `\0`-prefixed data, (just `\0` if data is empty).
- Placeholder store entries contain a single `\255` byte. These are used to indicate that the entry does not have any data (which is different from empty data). Placeholder entries are used when a descendant with data exists, similar to empty non-terminals in the DNS (cf. https://www.rfc-editor.org/rfc/rfc8499.html#section-7 ).
Functions ¶
func EncodedKeyToPath ¶
EncodedKeyToPath converts a byte slice key to a string path
func NewIbcPublishEvent ¶
func NewLegacyStorageEvent ¶
NewLegacyStorageEvent constructs a new storage change sdk.Event nolint: interfacer
func PathToChildrenPrefix ¶
PathToChildrenPrefix converts a path to a prefix for its children
func PathToEncodedKey ¶
PathToEncodedKey converts a path to a byte slice key
func RegisterQueryHandler ¶
RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterQueryHandlerClient ¶
func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.
func RegisterQueryHandlerFromEndpoint ¶
func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterQueryHandlerServer ¶
func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
func ValidatePath ¶
Types ¶
type Children ¶
type Children struct {
Children []string `protobuf:"bytes,1,rep,name=children,proto3" json:"children" yaml:"children"`
}
Children are the immediate names (just one level deep) of subnodes leading to more data from a given vstorage node.
func NewChildren ¶
func NewChildren() *Children
func (*Children) Descriptor ¶
func (*Children) GetChildren ¶
func (*Children) MarshalToSizedBuffer ¶
func (*Children) ProtoMessage ¶
func (*Children) ProtoMessage()
func (*Children) XXX_DiscardUnknown ¶
func (m *Children) XXX_DiscardUnknown()
func (*Children) XXX_Marshal ¶
func (*Children) XXX_Unmarshal ¶
type Data ¶
type Data struct {
Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value" yaml:"value"`
}
Data is the vstorage node data.
func (*Data) Descriptor ¶
func (*Data) ProtoMessage ¶
func (*Data) ProtoMessage()
func (*Data) XXX_DiscardUnknown ¶
func (m *Data) XXX_DiscardUnknown()
func (*Data) XXX_Unmarshal ¶
type DataEntry ¶
type DataEntry struct { // A "."-separated path with individual path elements matching // `[-_A-Za-z0-9]+` Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` }
A vstorage entry. The only necessary entries are those with data, as the ancestor nodes are reconstructed on import.
func (*DataEntry) Descriptor ¶
func (*DataEntry) MarshalToSizedBuffer ¶
func (*DataEntry) ProtoMessage ¶
func (*DataEntry) ProtoMessage()
func (*DataEntry) XXX_DiscardUnknown ¶
func (m *DataEntry) XXX_DiscardUnknown()
func (*DataEntry) XXX_Marshal ¶
func (*DataEntry) XXX_Unmarshal ¶
type GenesisState ¶
type GenesisState struct {
Data []*DataEntry `protobuf:"bytes,1,rep,name=data,proto3" json:"data" yaml:"data"`
}
The initial or exported state.
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetData ¶
func (m *GenesisState) GetData() []*DataEntry
func (*GenesisState) Marshal ¶
func (m *GenesisState) Marshal() (dAtA []byte, err error)
func (*GenesisState) MarshalToSizedBuffer ¶
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GenesisState) ProtoMessage ¶
func (*GenesisState) ProtoMessage()
func (*GenesisState) Reset ¶
func (m *GenesisState) Reset()
func (*GenesisState) Size ¶
func (m *GenesisState) Size() (n int)
func (*GenesisState) String ¶
func (m *GenesisState) String() string
func (*GenesisState) Unmarshal ¶
func (m *GenesisState) Unmarshal(dAtA []byte) error
func (*GenesisState) XXX_DiscardUnknown ¶
func (m *GenesisState) XXX_DiscardUnknown()
func (*GenesisState) XXX_Marshal ¶
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenesisState) XXX_Merge ¶
func (m *GenesisState) XXX_Merge(src proto.Message)
func (*GenesisState) XXX_Size ¶
func (m *GenesisState) XXX_Size() int
func (*GenesisState) XXX_Unmarshal ¶
func (m *GenesisState) XXX_Unmarshal(b []byte) error
type QueryChildrenRequest ¶
type QueryChildrenRequest struct { Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path" yaml:"path"` Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QueryChildrenRequest is the vstorage path children query.
func (*QueryChildrenRequest) Descriptor ¶
func (*QueryChildrenRequest) Descriptor() ([]byte, []int)
func (*QueryChildrenRequest) GetPagination ¶
func (m *QueryChildrenRequest) GetPagination() *query.PageRequest
func (*QueryChildrenRequest) GetPath ¶
func (m *QueryChildrenRequest) GetPath() string
func (*QueryChildrenRequest) Marshal ¶
func (m *QueryChildrenRequest) Marshal() (dAtA []byte, err error)
func (*QueryChildrenRequest) MarshalTo ¶
func (m *QueryChildrenRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryChildrenRequest) MarshalToSizedBuffer ¶
func (m *QueryChildrenRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryChildrenRequest) ProtoMessage ¶
func (*QueryChildrenRequest) ProtoMessage()
func (*QueryChildrenRequest) Reset ¶
func (m *QueryChildrenRequest) Reset()
func (*QueryChildrenRequest) Size ¶
func (m *QueryChildrenRequest) Size() (n int)
func (*QueryChildrenRequest) String ¶
func (m *QueryChildrenRequest) String() string
func (*QueryChildrenRequest) Unmarshal ¶
func (m *QueryChildrenRequest) Unmarshal(dAtA []byte) error
func (*QueryChildrenRequest) XXX_DiscardUnknown ¶
func (m *QueryChildrenRequest) XXX_DiscardUnknown()
func (*QueryChildrenRequest) XXX_Marshal ¶
func (m *QueryChildrenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryChildrenRequest) XXX_Merge ¶
func (m *QueryChildrenRequest) XXX_Merge(src proto.Message)
func (*QueryChildrenRequest) XXX_Size ¶
func (m *QueryChildrenRequest) XXX_Size() int
func (*QueryChildrenRequest) XXX_Unmarshal ¶
func (m *QueryChildrenRequest) XXX_Unmarshal(b []byte) error
type QueryChildrenResponse ¶
type QueryChildrenResponse struct { Children []string `protobuf:"bytes,1,rep,name=children,proto3" json:"children" yaml:"children"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QueryChildrenResponse is the vstorage path children response.
func (*QueryChildrenResponse) Descriptor ¶
func (*QueryChildrenResponse) Descriptor() ([]byte, []int)
func (*QueryChildrenResponse) GetChildren ¶
func (m *QueryChildrenResponse) GetChildren() []string
func (*QueryChildrenResponse) GetPagination ¶
func (m *QueryChildrenResponse) GetPagination() *query.PageResponse
func (*QueryChildrenResponse) Marshal ¶
func (m *QueryChildrenResponse) Marshal() (dAtA []byte, err error)
func (*QueryChildrenResponse) MarshalTo ¶
func (m *QueryChildrenResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryChildrenResponse) MarshalToSizedBuffer ¶
func (m *QueryChildrenResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryChildrenResponse) ProtoMessage ¶
func (*QueryChildrenResponse) ProtoMessage()
func (*QueryChildrenResponse) Reset ¶
func (m *QueryChildrenResponse) Reset()
func (*QueryChildrenResponse) Size ¶
func (m *QueryChildrenResponse) Size() (n int)
func (*QueryChildrenResponse) String ¶
func (m *QueryChildrenResponse) String() string
func (*QueryChildrenResponse) Unmarshal ¶
func (m *QueryChildrenResponse) Unmarshal(dAtA []byte) error
func (*QueryChildrenResponse) XXX_DiscardUnknown ¶
func (m *QueryChildrenResponse) XXX_DiscardUnknown()
func (*QueryChildrenResponse) XXX_Marshal ¶
func (m *QueryChildrenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryChildrenResponse) XXX_Merge ¶
func (m *QueryChildrenResponse) XXX_Merge(src proto.Message)
func (*QueryChildrenResponse) XXX_Size ¶
func (m *QueryChildrenResponse) XXX_Size() int
func (*QueryChildrenResponse) XXX_Unmarshal ¶
func (m *QueryChildrenResponse) XXX_Unmarshal(b []byte) error
type QueryClient ¶
type QueryClient interface { // Return an arbitrary vstorage datum. Data(ctx context.Context, in *QueryDataRequest, opts ...grpc.CallOption) (*QueryDataResponse, error) // Return the children of a given vstorage path. Children(ctx context.Context, in *QueryChildrenRequest, opts ...grpc.CallOption) (*QueryChildrenResponse, error) }
QueryClient is the client API for Query service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewQueryClient ¶
func NewQueryClient(cc grpc1.ClientConn) QueryClient
type QueryDataRequest ¶
type QueryDataRequest struct {
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path" yaml:"path"`
}
QueryDataRequest is the vstorage path data query.
func (*QueryDataRequest) Descriptor ¶
func (*QueryDataRequest) Descriptor() ([]byte, []int)
func (*QueryDataRequest) GetPath ¶
func (m *QueryDataRequest) GetPath() string
func (*QueryDataRequest) Marshal ¶
func (m *QueryDataRequest) Marshal() (dAtA []byte, err error)
func (*QueryDataRequest) MarshalToSizedBuffer ¶
func (m *QueryDataRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryDataRequest) ProtoMessage ¶
func (*QueryDataRequest) ProtoMessage()
func (*QueryDataRequest) Reset ¶
func (m *QueryDataRequest) Reset()
func (*QueryDataRequest) Size ¶
func (m *QueryDataRequest) Size() (n int)
func (*QueryDataRequest) String ¶
func (m *QueryDataRequest) String() string
func (*QueryDataRequest) Unmarshal ¶
func (m *QueryDataRequest) Unmarshal(dAtA []byte) error
func (*QueryDataRequest) XXX_DiscardUnknown ¶
func (m *QueryDataRequest) XXX_DiscardUnknown()
func (*QueryDataRequest) XXX_Marshal ¶
func (m *QueryDataRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryDataRequest) XXX_Merge ¶
func (m *QueryDataRequest) XXX_Merge(src proto.Message)
func (*QueryDataRequest) XXX_Size ¶
func (m *QueryDataRequest) XXX_Size() int
func (*QueryDataRequest) XXX_Unmarshal ¶
func (m *QueryDataRequest) XXX_Unmarshal(b []byte) error
type QueryDataResponse ¶
type QueryDataResponse struct {
Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value" yaml:"value"`
}
QueryDataResponse is the vstorage path data response.
func (*QueryDataResponse) Descriptor ¶
func (*QueryDataResponse) Descriptor() ([]byte, []int)
func (*QueryDataResponse) GetValue ¶
func (m *QueryDataResponse) GetValue() string
func (*QueryDataResponse) Marshal ¶
func (m *QueryDataResponse) Marshal() (dAtA []byte, err error)
func (*QueryDataResponse) MarshalTo ¶
func (m *QueryDataResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryDataResponse) MarshalToSizedBuffer ¶
func (m *QueryDataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryDataResponse) ProtoMessage ¶
func (*QueryDataResponse) ProtoMessage()
func (*QueryDataResponse) Reset ¶
func (m *QueryDataResponse) Reset()
func (*QueryDataResponse) Size ¶
func (m *QueryDataResponse) Size() (n int)
func (*QueryDataResponse) String ¶
func (m *QueryDataResponse) String() string
func (*QueryDataResponse) Unmarshal ¶
func (m *QueryDataResponse) Unmarshal(dAtA []byte) error
func (*QueryDataResponse) XXX_DiscardUnknown ¶
func (m *QueryDataResponse) XXX_DiscardUnknown()
func (*QueryDataResponse) XXX_Marshal ¶
func (m *QueryDataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryDataResponse) XXX_Merge ¶
func (m *QueryDataResponse) XXX_Merge(src proto.Message)
func (*QueryDataResponse) XXX_Size ¶
func (m *QueryDataResponse) XXX_Size() int
func (*QueryDataResponse) XXX_Unmarshal ¶
func (m *QueryDataResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface { // Return an arbitrary vstorage datum. Data(context.Context, *QueryDataRequest) (*QueryDataResponse, error) // Return the children of a given vstorage path. Children(context.Context, *QueryChildrenRequest) (*QueryChildrenResponse, error) }
QueryServer is the server API for Query service.
type StorageEntry ¶ added in v0.34.0
type StorageEntry struct {
// contains filtered or unexported fields
}
func NewStorageEntry ¶ added in v0.34.0
func NewStorageEntry(path string, value string) StorageEntry
func NewStorageEntryWithNoData ¶ added in v0.34.0
func NewStorageEntryWithNoData(path string) StorageEntry
func UnmarshalStorageEntry ¶ added in v0.34.0
func UnmarshalStorageEntry(msg json.RawMessage) (entry StorageEntry, err error)
UnmarshalStorageEntry interprets its argument as a [key: string, value?: string | null] JSON array and returns a corresponding StorageEntry. The key must be a string, and the value (if present) must be a string or null.
func (StorageEntry) HasData ¶ added in v0.34.0
func (se StorageEntry) HasData() bool
func (StorageEntry) Path ¶ added in v0.34.0
func (se StorageEntry) Path() string
func (StorageEntry) StringValue ¶ added in v0.34.0
func (se StorageEntry) StringValue() string
func (StorageEntry) Value ¶ added in v0.34.0
func (se StorageEntry) Value() *string
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) Children ¶
func (*UnimplementedQueryServer) Children(ctx context.Context, req *QueryChildrenRequest) (*QueryChildrenResponse, error)
func (*UnimplementedQueryServer) Data ¶
func (*UnimplementedQueryServer) Data(ctx context.Context, req *QueryDataRequest) (*QueryDataResponse, error)