types

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EntryIndexPrefix = "Entry_Index_"
	EntryPrefix      = "Entry_Value_"
)
View Source
const (
	MODULE_NAME string = "fixationstore"
)
View Source
const (
	ModuleName = "fixationstore"
)

Variables

View Source
var (
	ErrInvalidLengthFixation        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowFixation          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupFixation = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	// use single byte to save storage.
	// (value cannot be part of a valid index)
	EntryIndexLive = []byte{1}
	EntryIndexDead = []byte{2}
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidIndex = sdkerrors.Register(MODULE_NAME, 1, "entry index is invalid")
)

x/pairing module sentinel errors

Functions

func AssertSanitizedIndex

func AssertSanitizedIndex(safeIndex SafeIndex, prefix string)

func DecodeBlockAndKey

func DecodeBlockAndKey(encodedKey []byte) (uint64, []byte)

func DecodeKey

func DecodeKey(encodedKey []byte) uint64

func DesanitizeIndex

func DesanitizeIndex(safeIndex SafeIndex) string

desantizeIndex reverts the effect of SanitizeIndex - removes the trailing (ascii) DEL terminator.

func EncodeBlockAndKey

func EncodeBlockAndKey(block uint64, key []byte) []byte

func EncodeKey

func EncodeKey(key uint64) []byte

func FixationVersion

func FixationVersion() uint64

func IsEntryIndexLive

func IsEntryIndexLive(value []byte) bool

IsEntryIndexLive tests whether an entry-index is live

func KeyPrefix

func KeyPrefix(p string) []byte

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

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)

Types

type Entry

type Entry struct {
	Index    string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"`
	Block    uint64 `protobuf:"varint,2,opt,name=block,proto3" json:"block,omitempty"`
	StaleAt  uint64 `protobuf:"varint,3,opt,name=stale_at,json=staleAt,proto3" json:"stale_at,omitempty"`
	Refcount uint64 `protobuf:"varint,4,opt,name=refcount,proto3" json:"refcount,omitempty"`
	Data     []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"`
	DeleteAt uint64 `protobuf:"varint,6,opt,name=delete_at,json=deleteAt,proto3" json:"delete_at,omitempty"`
	IsLatest bool   `protobuf:"varint,7,opt,name=is_latest,json=isLatest,proto3" json:"is_latest,omitempty"`
}

func (*Entry) Descriptor

func (*Entry) Descriptor() ([]byte, []int)

func (*Entry) GetBlock

func (m *Entry) GetBlock() uint64

func (*Entry) GetData

func (m *Entry) GetData() []byte

func (*Entry) GetDeleteAt

func (m *Entry) GetDeleteAt() uint64

func (*Entry) GetIndex

func (m *Entry) GetIndex() string

func (*Entry) GetIsLatest

func (m *Entry) GetIsLatest() bool

func (*Entry) GetRefcount

func (m *Entry) GetRefcount() uint64

func (*Entry) GetStaleAt

func (m *Entry) GetStaleAt() uint64

func (Entry) HasDeleteAt

func (entry Entry) HasDeleteAt() bool

HasDeleteAt tests whether an entry is marked for deletion, i.e. has entry.Deleted != math.MaxUint64.

func (Entry) IsDeleted

func (entry Entry) IsDeleted(ctx sdk.Context) bool

IsDeleted tests whether an entry is currently deleted, i.e. has its entry.DeleteAt below the current ctx block height.

func (Entry) IsDeletedBy

func (entry Entry) IsDeletedBy(block uint64) bool

IsDeletedBy tests whether an entry is deleted, with respect to a given block, i.e. has entry.DeletAt smaller or equal to that that block.

func (Entry) IsStale

func (entry Entry) IsStale(ctx sdk.Context) bool

IsStale tests whether an entry is currently stale, i.e. has refcount zero _and_ has passed its stale_at time (more than STALE_ENTRY_TIME since deletion).

func (Entry) IsStaleBy

func (entry Entry) IsStaleBy(block uint64) bool

IsStaleBy tests whether an entry is stale, i.e. has refcount zero _and_ has passed its stale_at time (more than STALE_ENTRY_TIME since deletion).

func (*Entry) Marshal

func (m *Entry) Marshal() (dAtA []byte, err error)

func (*Entry) MarshalTo

func (m *Entry) MarshalTo(dAtA []byte) (int, error)

func (*Entry) MarshalToSizedBuffer

func (m *Entry) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Entry) ProtoMessage

func (*Entry) ProtoMessage()

func (*Entry) Reset

func (m *Entry) Reset()

func (Entry) SafeIndex

func (entry Entry) SafeIndex() SafeIndex

SafeIndex returns the entry's index.

func (*Entry) Size

func (m *Entry) Size() (n int)

func (*Entry) String

func (m *Entry) String() string

func (*Entry) Unmarshal

func (m *Entry) Unmarshal(dAtA []byte) error

func (*Entry) XXX_DiscardUnknown

func (m *Entry) XXX_DiscardUnknown()

func (*Entry) XXX_Marshal

func (m *Entry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Entry) XXX_Merge

func (m *Entry) XXX_Merge(src proto.Message)

func (*Entry) XXX_Size

func (m *Entry) XXX_Size() int

func (*Entry) XXX_Unmarshal

func (m *Entry) XXX_Unmarshal(b []byte) error

type EpochstorageKeeper

type EpochstorageKeeper interface {
	BlocksToSaveRaw(ctx sdk.Context) (res uint64)
}

type FixationStore

type FixationStore struct {
	// contains filtered or unexported fields
}

func NewFixationStore

func NewFixationStore(storeKey storetypes.StoreKey, cdc codec.BinaryCodec, prefix string, tstore *timerstoretypes.TimerStore, getStaleBlocks GetStaleBlocks) *FixationStore

NewFixationStore returns a new FixationStore object

func (FixationStore) AllEntryIndicesFilter

func (fs FixationStore) AllEntryIndicesFilter(ctx sdk.Context, prefix string, filter func(k, v []byte) bool) []string

AllEntryIndicesFilter returns all Entry indices with a given prefix and filtered by the given filter function.

func (*FixationStore) AppendEntry

func (fs *FixationStore) AppendEntry(
	ctx sdk.Context,
	index string,
	block uint64,
	entryData codec.ProtoMarshaler,
) error

AppendEntry adds a new entry to the store

func (*FixationStore) DelEntry

func (fs *FixationStore) DelEntry(ctx sdk.Context, index string, block uint64) error

DelEntry marks the entry for deletion so that future GetEntry will not find it anymore. (Cleanup of the EntryIndex is done when the last reference is removed).

func (*FixationStore) Export

func (fs *FixationStore) Export(ctx sdk.Context) GenesisState

func (*FixationStore) FindEntry

func (fs *FixationStore) FindEntry(ctx sdk.Context, index string, block uint64, entryData codec.ProtoMarshaler) bool

FindEntry returns the entry by index and block without changing the refcount

func (*FixationStore) FindEntryDetailed

func (fs *FixationStore) FindEntryDetailed(ctx sdk.Context, index string, block uint64, entryData codec.ProtoMarshaler) (entryBlock uint64, isDeleted bool, isLatest bool, found bool)

FindEntryDetailed returns the entry by index, whether it's deleted, and block without changing the refcount

func (*FixationStore) FindRawEntry

func (fs *FixationStore) FindRawEntry(ctx sdk.Context, index string, block uint64) (Entry, error)

FindRawEntry returns the raw entry by index and block (even deleted or stale entries)

func (FixationStore) GetAllEntryIndices

func (fs FixationStore) GetAllEntryIndices(ctx sdk.Context) []string

GetAllEntryIndices returns all Entry indices

func (FixationStore) GetAllEntryIndicesWithPrefix

func (fs FixationStore) GetAllEntryIndicesWithPrefix(ctx sdk.Context, prefix string) []string

GetAllEntryIndicesWithPrefix returns all Entry indices with a given prefix

func (*FixationStore) GetAllEntryVersions

func (fs *FixationStore) GetAllEntryVersions(ctx sdk.Context, index string) (blocks []uint64)

GetAllEntryVersions returns a list of all versions (blocks) of an entry, for use in testing and migrations (includes stale and deleted entry versions).

func (*FixationStore) GetEntry

func (fs *FixationStore) GetEntry(ctx sdk.Context, index string, entryData codec.ProtoMarshaler) bool

GetEntry returns the latest entry by index and increments the refcount (while ignoring entries in stale-period)

func (*FixationStore) GetEntryVersionsRange

func (fs *FixationStore) GetEntryVersionsRange(ctx sdk.Context, index string, block, delta uint64) (blocks []uint64)

GetEntryVersionsRange returns a list of versions from nearest-no-later block and onward, and not more than delta blocks further (skip stale entries).

func (*FixationStore) GetStoreKey

func (fs *FixationStore) GetStoreKey() storetypes.StoreKey

func (*FixationStore) GetStorePrefix

func (fs *FixationStore) GetStorePrefix() string

func (*FixationStore) HasEntry

func (fs *FixationStore) HasEntry(ctx sdk.Context, index string, block uint64) bool

HasEntry returns true if an entry version exists for the given index, block tuple (any kind of entry, even deleted or stale).

func (*FixationStore) Init

func (fs *FixationStore) Init(ctx sdk.Context, gs GenesisState)

func (*FixationStore) IsEntryStale

func (fs *FixationStore) IsEntryStale(ctx sdk.Context, index string, block uint64) bool

IsEntryStale returns true if an entry version exists and is stale.

func (*FixationStore) ModifyEntry

func (fs *FixationStore) ModifyEntry(ctx sdk.Context, index string, block uint64, entryData codec.ProtoMarshaler)

ModifyEntry modifies an existing entry in the store (should be called only for existing entries; will panic otherwise)

func (*FixationStore) PutEntry

func (fs *FixationStore) PutEntry(ctx sdk.Context, index string, block uint64)

PutEntry finds the entry by index and block and decrements the refcount (should be called only for existing entries; will panic otherwise)

func (*FixationStore) ReadEntry

func (fs *FixationStore) ReadEntry(ctx sdk.Context, index string, block uint64, entryData codec.ProtoMarshaler)

ReadEntry returns and existing entry with index and specific block (should be called only for existing entries; will panic otherwise)

type GenesisEntries

type GenesisEntries struct {
	Index   string  `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"`
	IsLive  bool    `protobuf:"varint,2,opt,name=is_live,json=isLive,proto3" json:"is_live,omitempty"`
	Entries []Entry `protobuf:"bytes,3,rep,name=entries,proto3" json:"entries"`
}

func (*GenesisEntries) Descriptor

func (*GenesisEntries) Descriptor() ([]byte, []int)

func (*GenesisEntries) GetEntries

func (m *GenesisEntries) GetEntries() []Entry

func (*GenesisEntries) GetIndex

func (m *GenesisEntries) GetIndex() string

func (*GenesisEntries) GetIsLive

func (m *GenesisEntries) GetIsLive() bool

func (*GenesisEntries) Marshal

func (m *GenesisEntries) Marshal() (dAtA []byte, err error)

func (*GenesisEntries) MarshalTo

func (m *GenesisEntries) MarshalTo(dAtA []byte) (int, error)

func (*GenesisEntries) MarshalToSizedBuffer

func (m *GenesisEntries) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GenesisEntries) ProtoMessage

func (*GenesisEntries) ProtoMessage()

func (*GenesisEntries) Reset

func (m *GenesisEntries) Reset()

func (*GenesisEntries) Size

func (m *GenesisEntries) Size() (n int)

func (*GenesisEntries) String

func (m *GenesisEntries) String() string

func (*GenesisEntries) Unmarshal

func (m *GenesisEntries) Unmarshal(dAtA []byte) error

func (*GenesisEntries) XXX_DiscardUnknown

func (m *GenesisEntries) XXX_DiscardUnknown()

func (*GenesisEntries) XXX_Marshal

func (m *GenesisEntries) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenesisEntries) XXX_Merge

func (m *GenesisEntries) XXX_Merge(src proto.Message)

func (*GenesisEntries) XXX_Size

func (m *GenesisEntries) XXX_Size() int

func (*GenesisEntries) XXX_Unmarshal

func (m *GenesisEntries) XXX_Unmarshal(b []byte) error

type GenesisState

type GenesisState struct {
	Version    uint64             `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	Entries    []GenesisEntries   `protobuf:"bytes,2,rep,name=entries,proto3" json:"entries"`
	Timerstore types.GenesisState `protobuf:"bytes,3,opt,name=timerstore,proto3" json:"timerstore"`
}

func DefaultGenesis

func DefaultGenesis() *GenesisState

func (*GenesisState) Descriptor

func (*GenesisState) Descriptor() ([]byte, []int)

func (*GenesisState) GetEntries

func (m *GenesisState) GetEntries() []GenesisEntries

func (*GenesisState) GetTimerstore

func (m *GenesisState) GetTimerstore() types.GenesisState

func (*GenesisState) GetVersion

func (m *GenesisState) GetVersion() uint64

func (*GenesisState) Marshal

func (m *GenesisState) Marshal() (dAtA []byte, err error)

func (*GenesisState) MarshalTo

func (m *GenesisState) MarshalTo(dAtA []byte) (int, 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 GetStaleBlocks

type GetStaleBlocks func(sdk.Context) uint64

type QueryAllIndicesRequest

type QueryAllIndicesRequest struct {
	StoreKey string `protobuf:"bytes,1,opt,name=store_key,json=storeKey,proto3" json:"store_key,omitempty"`
	Prefix   string `protobuf:"bytes,2,opt,name=prefix,proto3" json:"prefix,omitempty"`
}

func (*QueryAllIndicesRequest) Descriptor

func (*QueryAllIndicesRequest) Descriptor() ([]byte, []int)

func (*QueryAllIndicesRequest) GetPrefix

func (m *QueryAllIndicesRequest) GetPrefix() string

func (*QueryAllIndicesRequest) GetStoreKey

func (m *QueryAllIndicesRequest) GetStoreKey() string

func (*QueryAllIndicesRequest) Marshal

func (m *QueryAllIndicesRequest) Marshal() (dAtA []byte, err error)

func (*QueryAllIndicesRequest) MarshalTo

func (m *QueryAllIndicesRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryAllIndicesRequest) MarshalToSizedBuffer

func (m *QueryAllIndicesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryAllIndicesRequest) ProtoMessage

func (*QueryAllIndicesRequest) ProtoMessage()

func (*QueryAllIndicesRequest) Reset

func (m *QueryAllIndicesRequest) Reset()

func (*QueryAllIndicesRequest) Size

func (m *QueryAllIndicesRequest) Size() (n int)

func (*QueryAllIndicesRequest) String

func (m *QueryAllIndicesRequest) String() string

func (*QueryAllIndicesRequest) Unmarshal

func (m *QueryAllIndicesRequest) Unmarshal(dAtA []byte) error

func (*QueryAllIndicesRequest) XXX_DiscardUnknown

func (m *QueryAllIndicesRequest) XXX_DiscardUnknown()

func (*QueryAllIndicesRequest) XXX_Marshal

func (m *QueryAllIndicesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryAllIndicesRequest) XXX_Merge

func (m *QueryAllIndicesRequest) XXX_Merge(src proto.Message)

func (*QueryAllIndicesRequest) XXX_Size

func (m *QueryAllIndicesRequest) XXX_Size() int

func (*QueryAllIndicesRequest) XXX_Unmarshal

func (m *QueryAllIndicesRequest) XXX_Unmarshal(b []byte) error

type QueryAllIndicesResponse

type QueryAllIndicesResponse struct {
	Indices []string `protobuf:"bytes,1,rep,name=indices,proto3" json:"indices,omitempty"`
}

func (*QueryAllIndicesResponse) Descriptor

func (*QueryAllIndicesResponse) Descriptor() ([]byte, []int)

func (*QueryAllIndicesResponse) GetIndices

func (m *QueryAllIndicesResponse) GetIndices() []string

func (*QueryAllIndicesResponse) Marshal

func (m *QueryAllIndicesResponse) Marshal() (dAtA []byte, err error)

func (*QueryAllIndicesResponse) MarshalTo

func (m *QueryAllIndicesResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryAllIndicesResponse) MarshalToSizedBuffer

func (m *QueryAllIndicesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryAllIndicesResponse) ProtoMessage

func (*QueryAllIndicesResponse) ProtoMessage()

func (*QueryAllIndicesResponse) Reset

func (m *QueryAllIndicesResponse) Reset()

func (*QueryAllIndicesResponse) Size

func (m *QueryAllIndicesResponse) Size() (n int)

func (*QueryAllIndicesResponse) String

func (m *QueryAllIndicesResponse) String() string

func (*QueryAllIndicesResponse) Unmarshal

func (m *QueryAllIndicesResponse) Unmarshal(dAtA []byte) error

func (*QueryAllIndicesResponse) XXX_DiscardUnknown

func (m *QueryAllIndicesResponse) XXX_DiscardUnknown()

func (*QueryAllIndicesResponse) XXX_Marshal

func (m *QueryAllIndicesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryAllIndicesResponse) XXX_Merge

func (m *QueryAllIndicesResponse) XXX_Merge(src proto.Message)

func (*QueryAllIndicesResponse) XXX_Size

func (m *QueryAllIndicesResponse) XXX_Size() int

func (*QueryAllIndicesResponse) XXX_Unmarshal

func (m *QueryAllIndicesResponse) XXX_Unmarshal(b []byte) error

type QueryClient

type QueryClient interface {
	// Queries a fixation store for all its indices.
	AllIndices(ctx context.Context, in *QueryAllIndicesRequest, opts ...grpc.CallOption) (*QueryAllIndicesResponse, error)
	// Queries for all store keys.
	StoreKeys(ctx context.Context, in *QueryStoreKeysRequest, opts ...grpc.CallOption) (*QueryStoreKeysResponse, error)
	// Queries for all versions of a specific entry (versions = different blocks).
	Versions(ctx context.Context, in *QueryVersionsRequest, opts ...grpc.CallOption) (*QueryVersionsResponse, error)
	// Queries for a specific entry with detailed information.
	Entry(ctx context.Context, in *QueryEntryRequest, opts ...grpc.CallOption) (*QueryEntryResponse, 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 QueryEntryRequest

type QueryEntryRequest struct {
	StoreKey   string `protobuf:"bytes,1,opt,name=store_key,json=storeKey,proto3" json:"store_key,omitempty"`
	Prefix     string `protobuf:"bytes,2,opt,name=prefix,proto3" json:"prefix,omitempty"`
	Key        string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
	Block      uint64 `protobuf:"varint,4,opt,name=block,proto3" json:"block,omitempty"`
	HideData   bool   `protobuf:"varint,5,opt,name=hide_data,json=hideData,proto3" json:"hide_data,omitempty"`
	StringData bool   `protobuf:"varint,6,opt,name=string_data,json=stringData,proto3" json:"string_data,omitempty"`
}

func (*QueryEntryRequest) Descriptor

func (*QueryEntryRequest) Descriptor() ([]byte, []int)

func (*QueryEntryRequest) GetBlock

func (m *QueryEntryRequest) GetBlock() uint64

func (*QueryEntryRequest) GetHideData

func (m *QueryEntryRequest) GetHideData() bool

func (*QueryEntryRequest) GetKey

func (m *QueryEntryRequest) GetKey() string

func (*QueryEntryRequest) GetPrefix

func (m *QueryEntryRequest) GetPrefix() string

func (*QueryEntryRequest) GetStoreKey

func (m *QueryEntryRequest) GetStoreKey() string

func (*QueryEntryRequest) GetStringData

func (m *QueryEntryRequest) GetStringData() bool

func (*QueryEntryRequest) Marshal

func (m *QueryEntryRequest) Marshal() (dAtA []byte, err error)

func (*QueryEntryRequest) MarshalTo

func (m *QueryEntryRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryEntryRequest) MarshalToSizedBuffer

func (m *QueryEntryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryEntryRequest) ProtoMessage

func (*QueryEntryRequest) ProtoMessage()

func (*QueryEntryRequest) Reset

func (m *QueryEntryRequest) Reset()

func (*QueryEntryRequest) Size

func (m *QueryEntryRequest) Size() (n int)

func (*QueryEntryRequest) String

func (m *QueryEntryRequest) String() string

func (*QueryEntryRequest) Unmarshal

func (m *QueryEntryRequest) Unmarshal(dAtA []byte) error

func (*QueryEntryRequest) XXX_DiscardUnknown

func (m *QueryEntryRequest) XXX_DiscardUnknown()

func (*QueryEntryRequest) XXX_Marshal

func (m *QueryEntryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryEntryRequest) XXX_Merge

func (m *QueryEntryRequest) XXX_Merge(src proto.Message)

func (*QueryEntryRequest) XXX_Size

func (m *QueryEntryRequest) XXX_Size() int

func (*QueryEntryRequest) XXX_Unmarshal

func (m *QueryEntryRequest) XXX_Unmarshal(b []byte) error

type QueryEntryResponse

type QueryEntryResponse struct {
	Entry      *Entry `protobuf:"bytes,1,opt,name=entry,proto3" json:"entry,omitempty"`
	StringData string `protobuf:"bytes,2,opt,name=string_data,json=stringData,proto3" json:"string_data,omitempty"`
}

func (*QueryEntryResponse) Descriptor

func (*QueryEntryResponse) Descriptor() ([]byte, []int)

func (*QueryEntryResponse) GetEntry

func (m *QueryEntryResponse) GetEntry() *Entry

func (*QueryEntryResponse) GetStringData

func (m *QueryEntryResponse) GetStringData() string

func (*QueryEntryResponse) Marshal

func (m *QueryEntryResponse) Marshal() (dAtA []byte, err error)

func (*QueryEntryResponse) MarshalTo

func (m *QueryEntryResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryEntryResponse) MarshalToSizedBuffer

func (m *QueryEntryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryEntryResponse) ProtoMessage

func (*QueryEntryResponse) ProtoMessage()

func (*QueryEntryResponse) Reset

func (m *QueryEntryResponse) Reset()

func (*QueryEntryResponse) Size

func (m *QueryEntryResponse) Size() (n int)

func (*QueryEntryResponse) String

func (m *QueryEntryResponse) String() string

func (*QueryEntryResponse) Unmarshal

func (m *QueryEntryResponse) Unmarshal(dAtA []byte) error

func (*QueryEntryResponse) XXX_DiscardUnknown

func (m *QueryEntryResponse) XXX_DiscardUnknown()

func (*QueryEntryResponse) XXX_Marshal

func (m *QueryEntryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryEntryResponse) XXX_Merge

func (m *QueryEntryResponse) XXX_Merge(src proto.Message)

func (*QueryEntryResponse) XXX_Size

func (m *QueryEntryResponse) XXX_Size() int

func (*QueryEntryResponse) XXX_Unmarshal

func (m *QueryEntryResponse) XXX_Unmarshal(b []byte) error

type QueryServer

type QueryServer interface {
	// Queries a fixation store for all its indices.
	AllIndices(context.Context, *QueryAllIndicesRequest) (*QueryAllIndicesResponse, error)
	// Queries for all store keys.
	StoreKeys(context.Context, *QueryStoreKeysRequest) (*QueryStoreKeysResponse, error)
	// Queries for all versions of a specific entry (versions = different blocks).
	Versions(context.Context, *QueryVersionsRequest) (*QueryVersionsResponse, error)
	// Queries for a specific entry with detailed information.
	Entry(context.Context, *QueryEntryRequest) (*QueryEntryResponse, error)
}

QueryServer is the server API for Query service.

type QueryStoreKeysRequest

type QueryStoreKeysRequest struct {
}

func (*QueryStoreKeysRequest) Descriptor

func (*QueryStoreKeysRequest) Descriptor() ([]byte, []int)

func (*QueryStoreKeysRequest) Marshal

func (m *QueryStoreKeysRequest) Marshal() (dAtA []byte, err error)

func (*QueryStoreKeysRequest) MarshalTo

func (m *QueryStoreKeysRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryStoreKeysRequest) MarshalToSizedBuffer

func (m *QueryStoreKeysRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryStoreKeysRequest) ProtoMessage

func (*QueryStoreKeysRequest) ProtoMessage()

func (*QueryStoreKeysRequest) Reset

func (m *QueryStoreKeysRequest) Reset()

func (*QueryStoreKeysRequest) Size

func (m *QueryStoreKeysRequest) Size() (n int)

func (*QueryStoreKeysRequest) String

func (m *QueryStoreKeysRequest) String() string

func (*QueryStoreKeysRequest) Unmarshal

func (m *QueryStoreKeysRequest) Unmarshal(dAtA []byte) error

func (*QueryStoreKeysRequest) XXX_DiscardUnknown

func (m *QueryStoreKeysRequest) XXX_DiscardUnknown()

func (*QueryStoreKeysRequest) XXX_Marshal

func (m *QueryStoreKeysRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryStoreKeysRequest) XXX_Merge

func (m *QueryStoreKeysRequest) XXX_Merge(src proto.Message)

func (*QueryStoreKeysRequest) XXX_Size

func (m *QueryStoreKeysRequest) XXX_Size() int

func (*QueryStoreKeysRequest) XXX_Unmarshal

func (m *QueryStoreKeysRequest) XXX_Unmarshal(b []byte) error

type QueryStoreKeysResponse

type QueryStoreKeysResponse struct {
	Keys []StoreKeyAndPrefix `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys"`
}

func (*QueryStoreKeysResponse) Descriptor

func (*QueryStoreKeysResponse) Descriptor() ([]byte, []int)

func (*QueryStoreKeysResponse) GetKeys

func (*QueryStoreKeysResponse) Marshal

func (m *QueryStoreKeysResponse) Marshal() (dAtA []byte, err error)

func (*QueryStoreKeysResponse) MarshalTo

func (m *QueryStoreKeysResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryStoreKeysResponse) MarshalToSizedBuffer

func (m *QueryStoreKeysResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryStoreKeysResponse) ProtoMessage

func (*QueryStoreKeysResponse) ProtoMessage()

func (*QueryStoreKeysResponse) Reset

func (m *QueryStoreKeysResponse) Reset()

func (*QueryStoreKeysResponse) Size

func (m *QueryStoreKeysResponse) Size() (n int)

func (*QueryStoreKeysResponse) String

func (m *QueryStoreKeysResponse) String() string

func (*QueryStoreKeysResponse) Unmarshal

func (m *QueryStoreKeysResponse) Unmarshal(dAtA []byte) error

func (*QueryStoreKeysResponse) XXX_DiscardUnknown

func (m *QueryStoreKeysResponse) XXX_DiscardUnknown()

func (*QueryStoreKeysResponse) XXX_Marshal

func (m *QueryStoreKeysResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryStoreKeysResponse) XXX_Merge

func (m *QueryStoreKeysResponse) XXX_Merge(src proto.Message)

func (*QueryStoreKeysResponse) XXX_Size

func (m *QueryStoreKeysResponse) XXX_Size() int

func (*QueryStoreKeysResponse) XXX_Unmarshal

func (m *QueryStoreKeysResponse) XXX_Unmarshal(b []byte) error

type QueryVersionsRequest

type QueryVersionsRequest struct {
	StoreKey string `protobuf:"bytes,1,opt,name=store_key,json=storeKey,proto3" json:"store_key,omitempty"`
	Prefix   string `protobuf:"bytes,2,opt,name=prefix,proto3" json:"prefix,omitempty"`
	Key      string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
}

func (*QueryVersionsRequest) Descriptor

func (*QueryVersionsRequest) Descriptor() ([]byte, []int)

func (*QueryVersionsRequest) GetKey

func (m *QueryVersionsRequest) GetKey() string

func (*QueryVersionsRequest) GetPrefix

func (m *QueryVersionsRequest) GetPrefix() string

func (*QueryVersionsRequest) GetStoreKey

func (m *QueryVersionsRequest) GetStoreKey() string

func (*QueryVersionsRequest) Marshal

func (m *QueryVersionsRequest) Marshal() (dAtA []byte, err error)

func (*QueryVersionsRequest) MarshalTo

func (m *QueryVersionsRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryVersionsRequest) MarshalToSizedBuffer

func (m *QueryVersionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryVersionsRequest) ProtoMessage

func (*QueryVersionsRequest) ProtoMessage()

func (*QueryVersionsRequest) Reset

func (m *QueryVersionsRequest) Reset()

func (*QueryVersionsRequest) Size

func (m *QueryVersionsRequest) Size() (n int)

func (*QueryVersionsRequest) String

func (m *QueryVersionsRequest) String() string

func (*QueryVersionsRequest) Unmarshal

func (m *QueryVersionsRequest) Unmarshal(dAtA []byte) error

func (*QueryVersionsRequest) XXX_DiscardUnknown

func (m *QueryVersionsRequest) XXX_DiscardUnknown()

func (*QueryVersionsRequest) XXX_Marshal

func (m *QueryVersionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryVersionsRequest) XXX_Merge

func (m *QueryVersionsRequest) XXX_Merge(src proto.Message)

func (*QueryVersionsRequest) XXX_Size

func (m *QueryVersionsRequest) XXX_Size() int

func (*QueryVersionsRequest) XXX_Unmarshal

func (m *QueryVersionsRequest) XXX_Unmarshal(b []byte) error

type QueryVersionsResponse

type QueryVersionsResponse struct {
	Entries []Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries"`
}

func (*QueryVersionsResponse) Descriptor

func (*QueryVersionsResponse) Descriptor() ([]byte, []int)

func (*QueryVersionsResponse) GetEntries

func (m *QueryVersionsResponse) GetEntries() []Entry

func (*QueryVersionsResponse) Marshal

func (m *QueryVersionsResponse) Marshal() (dAtA []byte, err error)

func (*QueryVersionsResponse) MarshalTo

func (m *QueryVersionsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryVersionsResponse) MarshalToSizedBuffer

func (m *QueryVersionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryVersionsResponse) ProtoMessage

func (*QueryVersionsResponse) ProtoMessage()

func (*QueryVersionsResponse) Reset

func (m *QueryVersionsResponse) Reset()

func (*QueryVersionsResponse) Size

func (m *QueryVersionsResponse) Size() (n int)

func (*QueryVersionsResponse) String

func (m *QueryVersionsResponse) String() string

func (*QueryVersionsResponse) Unmarshal

func (m *QueryVersionsResponse) Unmarshal(dAtA []byte) error

func (*QueryVersionsResponse) XXX_DiscardUnknown

func (m *QueryVersionsResponse) XXX_DiscardUnknown()

func (*QueryVersionsResponse) XXX_Marshal

func (m *QueryVersionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryVersionsResponse) XXX_Merge

func (m *QueryVersionsResponse) XXX_Merge(src proto.Message)

func (*QueryVersionsResponse) XXX_Size

func (m *QueryVersionsResponse) XXX_Size() int

func (*QueryVersionsResponse) XXX_Unmarshal

func (m *QueryVersionsResponse) XXX_Unmarshal(b []byte) error

type SafeIndex

type SafeIndex string

SafeIndex is a sanitized string, i.e. contains only visible ascii characters (i.e. Ascii 32-126), and terminates with (ascii) DEL; this ensures that an index can never be a prefix of another index.

func SanitizeIndex

func SanitizeIndex(index string) (SafeIndex, error)

sanitizeIndex checks that a string contains only visible ascii characters (i.e. Ascii 32-126), and appends a (ascii) DEL to the index; this ensures that an index can never be a prefix of another index.

type StoreKeyAndPrefix

type StoreKeyAndPrefix struct {
	StoreKey string `protobuf:"bytes,1,opt,name=store_key,json=storeKey,proto3" json:"store_key,omitempty"`
	Prefix   string `protobuf:"bytes,2,opt,name=prefix,proto3" json:"prefix,omitempty"`
}

func (*StoreKeyAndPrefix) Descriptor

func (*StoreKeyAndPrefix) Descriptor() ([]byte, []int)

func (*StoreKeyAndPrefix) GetPrefix

func (m *StoreKeyAndPrefix) GetPrefix() string

func (*StoreKeyAndPrefix) GetStoreKey

func (m *StoreKeyAndPrefix) GetStoreKey() string

func (*StoreKeyAndPrefix) Marshal

func (m *StoreKeyAndPrefix) Marshal() (dAtA []byte, err error)

func (*StoreKeyAndPrefix) MarshalTo

func (m *StoreKeyAndPrefix) MarshalTo(dAtA []byte) (int, error)

func (*StoreKeyAndPrefix) MarshalToSizedBuffer

func (m *StoreKeyAndPrefix) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*StoreKeyAndPrefix) ProtoMessage

func (*StoreKeyAndPrefix) ProtoMessage()

func (*StoreKeyAndPrefix) Reset

func (m *StoreKeyAndPrefix) Reset()

func (*StoreKeyAndPrefix) Size

func (m *StoreKeyAndPrefix) Size() (n int)

func (*StoreKeyAndPrefix) String

func (m *StoreKeyAndPrefix) String() string

func (*StoreKeyAndPrefix) Unmarshal

func (m *StoreKeyAndPrefix) Unmarshal(dAtA []byte) error

func (*StoreKeyAndPrefix) XXX_DiscardUnknown

func (m *StoreKeyAndPrefix) XXX_DiscardUnknown()

func (*StoreKeyAndPrefix) XXX_Marshal

func (m *StoreKeyAndPrefix) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StoreKeyAndPrefix) XXX_Merge

func (m *StoreKeyAndPrefix) XXX_Merge(src proto.Message)

func (*StoreKeyAndPrefix) XXX_Size

func (m *StoreKeyAndPrefix) XXX_Size() int

func (*StoreKeyAndPrefix) XXX_Unmarshal

func (m *StoreKeyAndPrefix) XXX_Unmarshal(b []byte) error

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) AllIndices

func (*UnimplementedQueryServer) Entry

func (*UnimplementedQueryServer) StoreKeys

func (*UnimplementedQueryServer) Versions

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL