sqlite_remotev1

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SigAlg_name = map[int32]string{
		0: "SIG_ALG_UNSPECIFIED",
		1: "SIG_ALG_ED25519",
	}
	SigAlg_value = map[string]int32{
		"SIG_ALG_UNSPECIFIED": 0,
		"SIG_ALG_ED25519":     1,
	}
)

Enum value maps for SigAlg.

View Source
var (
	ErrorCode_name = map[int32]string{
		0:  "ERROR_CODE_UNSPECIFIED",
		1:  "ERROR_CODE_UNAUTHENTICATED",
		2:  "ERROR_CODE_FORBIDDEN",
		3:  "ERROR_CODE_NOT_FOUND",
		4:  "ERROR_CODE_LEASE_HELD",
		5:  "ERROR_CODE_FENCED",
		6:  "ERROR_CODE_VERSION_CONFLICT",
		7:  "ERROR_CODE_BAD_REQUEST",
		8:  "ERROR_CODE_TOO_LARGE",
		9:  "ERROR_CODE_QUOTA_EXCEEDED",
		10: "ERROR_CODE_RATE_LIMITED",
		11: "ERROR_CODE_INTERNAL",
		12: "ERROR_CODE_ACCESS_DENIED",
		13: "ERROR_CODE_SLOT_TAKEN",
	}
	ErrorCode_value = map[string]int32{
		"ERROR_CODE_UNSPECIFIED":      0,
		"ERROR_CODE_UNAUTHENTICATED":  1,
		"ERROR_CODE_FORBIDDEN":        2,
		"ERROR_CODE_NOT_FOUND":        3,
		"ERROR_CODE_LEASE_HELD":       4,
		"ERROR_CODE_FENCED":           5,
		"ERROR_CODE_VERSION_CONFLICT": 6,
		"ERROR_CODE_BAD_REQUEST":      7,
		"ERROR_CODE_TOO_LARGE":        8,
		"ERROR_CODE_QUOTA_EXCEEDED":   9,
		"ERROR_CODE_RATE_LIMITED":     10,
		"ERROR_CODE_INTERNAL":         11,
		"ERROR_CODE_ACCESS_DENIED":    12,
		"ERROR_CODE_SLOT_TAKEN":       13,
	}
)

Enum value maps for ErrorCode.

View Source
var File_sqlite_remote_v1_sqlite_remote_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Block

type Block struct {

	// Byte offset in the file divided by page_size.
	Index uint64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
	// Exactly page_size bytes.
	Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

One block of the database file.

func (*Block) Descriptor deprecated

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

Deprecated: Use Block.ProtoReflect.Descriptor instead.

func (*Block) GetData

func (x *Block) GetData() []byte

func (*Block) GetIndex

func (x *Block) GetIndex() uint64

func (*Block) ProtoMessage

func (*Block) ProtoMessage()

func (*Block) ProtoReflect

func (x *Block) ProtoReflect() protoreflect.Message

func (*Block) Reset

func (x *Block) Reset()

func (*Block) String

func (x *Block) String() string

type Challenge

type Challenge struct {

	// 32 random bytes. Valid for this login only.
	Nonce []byte `protobuf:"bytes,1,opt,name=nonce,proto3" json:"nonce,omitempty"`
	// The server's configured identifier, normally its public WebSocket URL, e.g. "wss://vfs.example/v1/ws". It is
	// part of the signed transcript. A client that compares it with the URL it connected to detects a challenge that
	// another server relays. Browsers do not expose TLS channel binding, so this is the only binding available.
	// sqlite-remote-vfs does not compare it; it expects a separate key for each server instead.
	ServerId string `protobuf:"bytes,2,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"`
	// Deadline for the `Proof`, in milliseconds since the Unix epoch.
	ExpiresAtMs uint64 `protobuf:"varint,3,opt,name=expires_at_ms,json=expiresAtMs,proto3" json:"expires_at_ms,omitempty"`
	// contains filtered or unexported fields
}

Answer to `Hello`, with the Hello's request_id. The client answers with a `Proof`.

func (*Challenge) Descriptor deprecated

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

Deprecated: Use Challenge.ProtoReflect.Descriptor instead.

func (*Challenge) GetExpiresAtMs

func (x *Challenge) GetExpiresAtMs() uint64

func (*Challenge) GetNonce

func (x *Challenge) GetNonce() []byte

func (*Challenge) GetServerId

func (x *Challenge) GetServerId() string

func (*Challenge) ProtoMessage

func (*Challenge) ProtoMessage()

func (*Challenge) ProtoReflect

func (x *Challenge) ProtoReflect() protoreflect.Message

func (*Challenge) Reset

func (x *Challenge) Reset()

func (*Challenge) String

func (x *Challenge) String() string

type Changed

type Changed struct {
	DbId string `protobuf:"bytes,1,opt,name=db_id,json=dbId,proto3" json:"db_id,omitempty"`
	// Version of the client's local copy. Must not be greater than the current version.
	FromVersion uint64 `protobuf:"varint,2,opt,name=from_version,json=fromVersion,proto3" json:"from_version,omitempty"`
	// contains filtered or unexported fields
}

Requests the indexes of all blocks changed since `from_version`. Answered with `Changes`.

Used to catch up a local copy that is a few commits behind. The client discards those blocks from the copy and keeps the rest, instead of fetching the whole database.

func (*Changed) Descriptor deprecated

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

Deprecated: Use Changed.ProtoReflect.Descriptor instead.

func (*Changed) GetDbId

func (x *Changed) GetDbId() string

func (*Changed) GetFromVersion

func (x *Changed) GetFromVersion() uint64

func (*Changed) ProtoMessage

func (*Changed) ProtoMessage()

func (*Changed) ProtoReflect

func (x *Changed) ProtoReflect() protoreflect.Message

func (*Changed) Reset

func (x *Changed) Reset()

func (*Changed) String

func (x *Changed) String() string

type Changes

type Changes struct {
	FromVersion uint64 `protobuf:"varint,1,opt,name=from_version,json=fromVersion,proto3" json:"from_version,omitempty"`
	// The current version.
	ToVersion uint64 `protobuf:"varint,2,opt,name=to_version,json=toVersion,proto3" json:"to_version,omitempty"`
	// Indexes of all blocks written by any commit after `from_version`, ascending and without duplicates.
	Blocks []uint64 `protobuf:"varint,3,rep,packed,name=blocks,proto3" json:"blocks,omitempty"`
	// False if the server's change log does not reach back to `from_version`, or the list does not fit in one frame.
	// `blocks` is then empty and the client has to discard its local copy.
	Complete bool `protobuf:"varint,4,opt,name=complete,proto3" json:"complete,omitempty"`
	// contains filtered or unexported fields
}

Answer to `Changed`.

func (*Changes) Descriptor deprecated

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

Deprecated: Use Changes.ProtoReflect.Descriptor instead.

func (*Changes) GetBlocks

func (x *Changes) GetBlocks() []uint64

func (*Changes) GetComplete

func (x *Changes) GetComplete() bool

func (*Changes) GetFromVersion

func (x *Changes) GetFromVersion() uint64

func (*Changes) GetToVersion

func (x *Changes) GetToVersion() uint64

func (*Changes) ProtoMessage

func (*Changes) ProtoMessage()

func (*Changes) ProtoReflect

func (x *Changes) ProtoReflect() protoreflect.Message

func (*Changes) Reset

func (x *Changes) Reset()

func (*Changes) String

func (x *Changes) String() string

type ClaimSlot added in v0.3.0

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

Makes the key of this connection the holder of its owner's slot. Answered with `Slot`.

Slots need access tokens: the owner is the token's `sub`. An owner has one slot. While the slot is held, opening a database with another key of the same owner fails with ERROR_CODE_SLOT_TAKEN, also when resuming a lease.

If another key holds the slot, the slot passes to this key with an empty label, and all databases of the other key are deleted completely, without the record that `Delete` keeps. Instances that have them open receive `LeaseRevoked` if they are connected to the same server instance; in any case their next request on them fails with ERROR_CODE_FENCED. Claiming a slot that this key already holds changes nothing. A server without access tokens answers with ERROR_CODE_BAD_REQUEST.

func (*ClaimSlot) Descriptor deprecated added in v0.3.0

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

Deprecated: Use ClaimSlot.ProtoReflect.Descriptor instead.

func (*ClaimSlot) ProtoMessage added in v0.3.0

func (*ClaimSlot) ProtoMessage()

func (*ClaimSlot) ProtoReflect added in v0.3.0

func (x *ClaimSlot) ProtoReflect() protoreflect.Message

func (*ClaimSlot) Reset added in v0.3.0

func (x *ClaimSlot) Reset()

func (*ClaimSlot) String added in v0.3.0

func (x *ClaimSlot) String() string

type ClientFrame

type ClientFrame struct {

	// Chosen by the client. Must be greater than 0. Every answer to the request carries the same id.
	RequestId uint64 `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	// 14 is reserved for recovery after a server restore.
	//
	// Types that are valid to be assigned to Body:
	//
	//	*ClientFrame_Hello
	//	*ClientFrame_Open
	//	*ClientFrame_Fetch
	//	*ClientFrame_Commit
	//	*ClientFrame_Ping
	//	*ClientFrame_CloseDb
	//	*ClientFrame_Proof
	//	*ClientFrame_Delete
	//	*ClientFrame_Changed
	//	*ClientFrame_ClaimSlot
	//	*ClientFrame_DeleteSlot
	//	*ClientFrame_SetSlotLabel
	Body isClientFrame_Body `protobuf_oneof:"body"`
	// contains filtered or unexported fields
}

A frame from the client to the server.

func (*ClientFrame) Descriptor deprecated

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

Deprecated: Use ClientFrame.ProtoReflect.Descriptor instead.

func (*ClientFrame) GetBody

func (x *ClientFrame) GetBody() isClientFrame_Body

func (*ClientFrame) GetChanged

func (x *ClientFrame) GetChanged() *Changed

func (*ClientFrame) GetClaimSlot added in v0.3.0

func (x *ClientFrame) GetClaimSlot() *ClaimSlot

func (*ClientFrame) GetCloseDb

func (x *ClientFrame) GetCloseDb() *CloseDb

func (*ClientFrame) GetCommit

func (x *ClientFrame) GetCommit() *Commit

func (*ClientFrame) GetDelete

func (x *ClientFrame) GetDelete() *Delete

func (*ClientFrame) GetDeleteSlot added in v0.3.0

func (x *ClientFrame) GetDeleteSlot() *DeleteSlot

func (*ClientFrame) GetFetch

func (x *ClientFrame) GetFetch() *Fetch

func (*ClientFrame) GetHello

func (x *ClientFrame) GetHello() *Hello

func (*ClientFrame) GetOpen

func (x *ClientFrame) GetOpen() *Open

func (*ClientFrame) GetPing

func (x *ClientFrame) GetPing() *Ping

func (*ClientFrame) GetProof

func (x *ClientFrame) GetProof() *Proof

func (*ClientFrame) GetRequestId

func (x *ClientFrame) GetRequestId() uint64

func (*ClientFrame) GetSetSlotLabel added in v0.4.0

func (x *ClientFrame) GetSetSlotLabel() *SetSlotLabel

func (*ClientFrame) ProtoMessage

func (*ClientFrame) ProtoMessage()

func (*ClientFrame) ProtoReflect

func (x *ClientFrame) ProtoReflect() protoreflect.Message

func (*ClientFrame) Reset

func (x *ClientFrame) Reset()

func (*ClientFrame) String

func (x *ClientFrame) String() string

type ClientFrame_Changed

type ClientFrame_Changed struct {
	Changed *Changed `protobuf:"bytes,19,opt,name=changed,proto3,oneof"`
}

type ClientFrame_ClaimSlot added in v0.3.0

type ClientFrame_ClaimSlot struct {
	ClaimSlot *ClaimSlot `protobuf:"bytes,20,opt,name=claim_slot,json=claimSlot,proto3,oneof"`
}

type ClientFrame_CloseDb

type ClientFrame_CloseDb struct {
	CloseDb *CloseDb `protobuf:"bytes,16,opt,name=close_db,json=closeDb,proto3,oneof"`
}

type ClientFrame_Commit

type ClientFrame_Commit struct {
	Commit *Commit `protobuf:"bytes,13,opt,name=commit,proto3,oneof"`
}

type ClientFrame_Delete

type ClientFrame_Delete struct {
	Delete *Delete `protobuf:"bytes,18,opt,name=delete,proto3,oneof"`
}

type ClientFrame_DeleteSlot added in v0.3.0

type ClientFrame_DeleteSlot struct {
	DeleteSlot *DeleteSlot `protobuf:"bytes,21,opt,name=delete_slot,json=deleteSlot,proto3,oneof"`
}

type ClientFrame_Fetch

type ClientFrame_Fetch struct {
	Fetch *Fetch `protobuf:"bytes,12,opt,name=fetch,proto3,oneof"`
}

type ClientFrame_Hello

type ClientFrame_Hello struct {
	Hello *Hello `protobuf:"bytes,10,opt,name=hello,proto3,oneof"`
}

type ClientFrame_Open

type ClientFrame_Open struct {
	Open *Open `protobuf:"bytes,11,opt,name=open,proto3,oneof"`
}

type ClientFrame_Ping

type ClientFrame_Ping struct {
	Ping *Ping `protobuf:"bytes,15,opt,name=ping,proto3,oneof"`
}

type ClientFrame_Proof

type ClientFrame_Proof struct {
	Proof *Proof `protobuf:"bytes,17,opt,name=proof,proto3,oneof"`
}

type ClientFrame_SetSlotLabel added in v0.4.0

type ClientFrame_SetSlotLabel struct {
	SetSlotLabel *SetSlotLabel `protobuf:"bytes,22,opt,name=set_slot_label,json=setSlotLabel,proto3,oneof"`
}

type CloseDb

type CloseDb struct {
	DbId       string `protobuf:"bytes,1,opt,name=db_id,json=dbId,proto3" json:"db_id,omitempty"`
	LeaseEpoch uint64 `protobuf:"varint,2,opt,name=lease_epoch,json=leaseEpoch,proto3" json:"lease_epoch,omitempty"`
	// contains filtered or unexported fields
}

Releases the lease of a database immediately. Answered with `Ok`.

func (*CloseDb) Descriptor deprecated

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

Deprecated: Use CloseDb.ProtoReflect.Descriptor instead.

func (*CloseDb) GetDbId

func (x *CloseDb) GetDbId() string

func (*CloseDb) GetLeaseEpoch

func (x *CloseDb) GetLeaseEpoch() uint64

func (*CloseDb) ProtoMessage

func (*CloseDb) ProtoMessage()

func (*CloseDb) ProtoReflect

func (x *CloseDb) ProtoReflect() protoreflect.Message

func (*CloseDb) Reset

func (x *CloseDb) Reset()

func (*CloseDb) String

func (x *CloseDb) String() string

type Commit

type Commit struct {
	DbId string `protobuf:"bytes,1,opt,name=db_id,json=dbId,proto3" json:"db_id,omitempty"`
	// 16 random bytes, the same in every part. Makes a repeated commit idempotent: if the last applied commit has this
	// id and the version is base_version + 1, the server answers with that version again.
	CommitId []byte `protobuf:"bytes,2,opt,name=commit_id,json=commitId,proto3" json:"commit_id,omitempty"`
	// Current lease epoch, otherwise ERROR_CODE_FENCED.
	LeaseEpoch uint64 `protobuf:"varint,3,opt,name=lease_epoch,json=leaseEpoch,proto3" json:"lease_epoch,omitempty"`
	// Version the commit is based on. Must be the current version, otherwise ERROR_CODE_VERSION_CONFLICT.
	BaseVersion uint64 `protobuf:"varint,4,opt,name=base_version,json=baseVersion,proto3" json:"base_version,omitempty"`
	// Length of the database file after the commit, in blocks. Blocks at or beyond it are removed.
	PageCount uint64   `protobuf:"varint,5,opt,name=page_count,json=pageCount,proto3" json:"page_count,omitempty"`
	Blocks    []*Block `protobuf:"bytes,6,rep,name=blocks,proto3" json:"blocks,omitempty"`
	// True if more parts of this commit follow.
	More bool `protobuf:"varint,7,opt,name=more,proto3" json:"more,omitempty"`
	// Number of this part within the commit, starting at 0. Part 0 starts a new commit and discards an incomplete one.
	// Every further part must directly follow the previous part and repeat its commit_id, lease_epoch, base_version
	// and page_count. Otherwise the server refuses it and discards the commit, so later parts cannot be applied on
	// their own. This keeps a commit atomic although the client sends all parts without waiting for answers.
	Part uint32 `protobuf:"varint,8,opt,name=part,proto3" json:"part,omitempty"`
	// contains filtered or unexported fields
}

One frame (part) of a commit: blocks changed by one or more SQLite transactions. The server applies a commit atomically. Only the last part is answered, with `CommitAck` or `Error`. A refused part is answered with `Error` at once.

func (*Commit) Descriptor deprecated

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

Deprecated: Use Commit.ProtoReflect.Descriptor instead.

func (*Commit) GetBaseVersion

func (x *Commit) GetBaseVersion() uint64

func (*Commit) GetBlocks

func (x *Commit) GetBlocks() []*Block

func (*Commit) GetCommitId

func (x *Commit) GetCommitId() []byte

func (*Commit) GetDbId

func (x *Commit) GetDbId() string

func (*Commit) GetLeaseEpoch

func (x *Commit) GetLeaseEpoch() uint64

func (*Commit) GetMore

func (x *Commit) GetMore() bool

func (*Commit) GetPageCount

func (x *Commit) GetPageCount() uint64

func (*Commit) GetPart

func (x *Commit) GetPart() uint32

func (*Commit) ProtoMessage

func (*Commit) ProtoMessage()

func (*Commit) ProtoReflect

func (x *Commit) ProtoReflect() protoreflect.Message

func (*Commit) Reset

func (x *Commit) Reset()

func (*Commit) String

func (x *Commit) String() string

type CommitAck

type CommitAck struct {
	CommitId []byte `protobuf:"bytes,1,opt,name=commit_id,json=commitId,proto3" json:"commit_id,omitempty"`
	// Version after the commit.
	Version uint64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

Answer to the last part of an applied `Commit`. The commit is durable when this is sent.

func (*CommitAck) Descriptor deprecated

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

Deprecated: Use CommitAck.ProtoReflect.Descriptor instead.

func (*CommitAck) GetCommitId

func (x *CommitAck) GetCommitId() []byte

func (*CommitAck) GetVersion

func (x *CommitAck) GetVersion() uint64

func (*CommitAck) ProtoMessage

func (*CommitAck) ProtoMessage()

func (*CommitAck) ProtoReflect

func (x *CommitAck) ProtoReflect() protoreflect.Message

func (*CommitAck) Reset

func (x *CommitAck) Reset()

func (*CommitAck) String

func (x *CommitAck) String() string

type Delete

type Delete struct {
	DbId string `protobuf:"bytes,1,opt,name=db_id,json=dbId,proto3" json:"db_id,omitempty"`
	// Deletes even if another instance holds a lease that has not expired. That instance receives `LeaseRevoked`.
	// Without it, the request fails with ERROR_CODE_LEASE_HELD in that case.
	Takeover bool `protobuf:"varint,2,opt,name=takeover,proto3" json:"takeover,omitempty"`
	// contains filtered or unexported fields
}

Deletes a database: its blocks and its change log. Answered with `Ok`, also if the database does not exist or was already deleted, so that a repeated request succeeds.

The database must not be open on this connection. The server keeps a record of the deleted database with its lease epoch and version, and increases the epoch, so that no earlier lease can commit again. Opening the database again with `create_if_missing` creates it empty with any page size; the epoch and the version continue from the deleted database. Opening it without `create_if_missing` fails with ERROR_CODE_NOT_FOUND.

func (*Delete) Descriptor deprecated

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

Deprecated: Use Delete.ProtoReflect.Descriptor instead.

func (*Delete) GetDbId

func (x *Delete) GetDbId() string

func (*Delete) GetTakeover

func (x *Delete) GetTakeover() bool

func (*Delete) ProtoMessage

func (*Delete) ProtoMessage()

func (*Delete) ProtoReflect

func (x *Delete) ProtoReflect() protoreflect.Message

func (*Delete) Reset

func (x *Delete) Reset()

func (*Delete) String

func (x *Delete) String() string

type DeleteSlot added in v0.3.0

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

Releases the owner's slot and deletes all databases of the key of this connection completely, without the record that `Delete` keeps. Answered with `Ok`, also if the owner has no slot. If another key holds the slot, nothing is deleted and the request fails with ERROR_CODE_SLOT_TAKEN. No database may be open on this connection.

func (*DeleteSlot) Descriptor deprecated added in v0.3.0

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

Deprecated: Use DeleteSlot.ProtoReflect.Descriptor instead.

func (*DeleteSlot) ProtoMessage added in v0.3.0

func (*DeleteSlot) ProtoMessage()

func (*DeleteSlot) ProtoReflect added in v0.3.0

func (x *DeleteSlot) ProtoReflect() protoreflect.Message

func (*DeleteSlot) Reset added in v0.3.0

func (x *DeleteSlot) Reset()

func (*DeleteSlot) String added in v0.3.0

func (x *DeleteSlot) String() string

type Error

type Error struct {
	Code ErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=sqlite_remote.v1.ErrorCode" json:"code,omitempty"`
	// Human-readable reason. For ERROR_CODE_INTERNAL it contains no details.
	Detail string `protobuf:"bytes,2,opt,name=detail,proto3" json:"detail,omitempty"`
	// Current version of the database. Set with ERROR_CODE_VERSION_CONFLICT.
	CurrentVersion uint64 `protobuf:"varint,3,opt,name=current_version,json=currentVersion,proto3" json:"current_version,omitempty"`
	// Time the current lease was granted, in milliseconds since the Unix epoch. Set with ERROR_CODE_LEASE_HELD.
	LeaseHolderSinceMs uint64 `protobuf:"varint,4,opt,name=lease_holder_since_ms,json=leaseHolderSinceMs,proto3" json:"lease_holder_since_ms,omitempty"`
	// contains filtered or unexported fields
}

Answer to a failed request.

func (*Error) Descriptor deprecated

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

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetCode

func (x *Error) GetCode() ErrorCode

func (*Error) GetCurrentVersion

func (x *Error) GetCurrentVersion() uint64

func (*Error) GetDetail

func (x *Error) GetDetail() string

func (*Error) GetLeaseHolderSinceMs

func (x *Error) GetLeaseHolderSinceMs() uint64

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

func (x *Error) ProtoReflect() protoreflect.Message

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

type ErrorCode

type ErrorCode int32
const (
	ErrorCode_ERROR_CODE_UNSPECIFIED ErrorCode = 0
	// Login failed: no valid `Proof`, an expired challenge, or a request before the login.
	ErrorCode_ERROR_CODE_UNAUTHENTICATED ErrorCode = 1
	// The database belongs to another subject.
	ErrorCode_ERROR_CODE_FORBIDDEN ErrorCode = 2
	// The database does not exist or was deleted.
	ErrorCode_ERROR_CODE_NOT_FOUND ErrorCode = 3
	// Another instance holds a lease that has not expired.
	ErrorCode_ERROR_CODE_LEASE_HELD ErrorCode = 4
	// The lease epoch is not the current one: another instance acquired the lease, or it was released.
	ErrorCode_ERROR_CODE_FENCED ErrorCode = 5
	// The request is based on a version other than the current one. See `Error.current_version`.
	ErrorCode_ERROR_CODE_VERSION_CONFLICT ErrorCode = 6
	// The request is invalid and cannot succeed when repeated, e.g. a block of the wrong size, a block index at or
	// beyond page_count, or a commit part that does not continue the pending commit.
	ErrorCode_ERROR_CODE_BAD_REQUEST ErrorCode = 7
	// The commit exceeds the server's size limit for one commit.
	ErrorCode_ERROR_CODE_TOO_LARGE      ErrorCode = 8
	ErrorCode_ERROR_CODE_QUOTA_EXCEEDED ErrorCode = 9
	ErrorCode_ERROR_CODE_RATE_LIMITED   ErrorCode = 10
	// Unexpected error on the server. Details are only in the server's log.
	ErrorCode_ERROR_CODE_INTERNAL ErrorCode = 11
	// The server requires an access token (`Hello.access_token`), and the token is missing, invalid, expired, or bound
	// to another key.
	ErrorCode_ERROR_CODE_ACCESS_DENIED ErrorCode = 12
	// Another key holds the owner's slot. See `ClaimSlot`.
	ErrorCode_ERROR_CODE_SLOT_TAKEN ErrorCode = 13
)

func (ErrorCode) Descriptor

func (ErrorCode) Descriptor() protoreflect.EnumDescriptor

func (ErrorCode) Enum

func (x ErrorCode) Enum() *ErrorCode

func (ErrorCode) EnumDescriptor deprecated

func (ErrorCode) EnumDescriptor() ([]byte, []int)

Deprecated: Use ErrorCode.Descriptor instead.

func (ErrorCode) Number

func (x ErrorCode) Number() protoreflect.EnumNumber

func (ErrorCode) String

func (x ErrorCode) String() string

func (ErrorCode) Type

type Fetch

type Fetch struct {
	DbId string `protobuf:"bytes,1,opt,name=db_id,json=dbId,proto3" json:"db_id,omitempty"`
	// Must be the current version. Otherwise the request fails with ERROR_CODE_VERSION_CONFLICT.
	Version uint64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
	// One range: `count` blocks starting at `first_block`. Ignored if `ranges` is set.
	FirstBlock uint64 `protobuf:"varint,3,opt,name=first_block,json=firstBlock,proto3" json:"first_block,omitempty"`
	Count      uint64 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"`
	// Several ranges, in ascending order and without overlap. At most 4096. Blocks that were never written are
	// returned as zeros.
	Ranges []*Range `protobuf:"bytes,5,rep,name=ranges,proto3" json:"ranges,omitempty"`
	// contains filtered or unexported fields
}

Requests blocks as of `version`. Either one range (`first_block` and `count`) or several (`ranges`). Answered with one or more `Pages` frames.

Several ranges in one request are for catching up a local copy. The blocks changed by a series of commits are spread across the file, and one request per range would cost one round trip each.

func (*Fetch) Descriptor deprecated

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

Deprecated: Use Fetch.ProtoReflect.Descriptor instead.

func (*Fetch) GetCount

func (x *Fetch) GetCount() uint64

func (*Fetch) GetDbId

func (x *Fetch) GetDbId() string

func (*Fetch) GetFirstBlock

func (x *Fetch) GetFirstBlock() uint64

func (*Fetch) GetRanges

func (x *Fetch) GetRanges() []*Range

func (*Fetch) GetVersion

func (x *Fetch) GetVersion() uint64

func (*Fetch) ProtoMessage

func (*Fetch) ProtoMessage()

func (*Fetch) ProtoReflect

func (x *Fetch) ProtoReflect() protoreflect.Message

func (*Fetch) Reset

func (x *Fetch) Reset()

func (*Fetch) String

func (x *Fetch) String() string

type Hello

type Hello struct {

	// Protocol version of the client. The server rejects a version other than its own with ERROR_CODE_BAD_REQUEST.
	ProtocolVersion uint32 `protobuf:"varint,1,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version,omitempty"`
	// Id of the client instance, e.g. one browser tab or worker. 1 to 64 bytes. Usually random. A client that restarts
	// may use the same id again to take back its own lease without takeover, see `Open.takeover`. Two instances that run
	// at the same time must not use the same id.
	InstanceId []byte `protobuf:"bytes,2,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"`
	// Algorithm and public key of the client's key pair. The client proves possession of the private key with a
	// `Proof`. The server derives the subject from the public key. The subject determines which databases the
	// connection can access. A client has no other way to select a subject.
	SigAlg    SigAlg `protobuf:"varint,3,opt,name=sig_alg,json=sigAlg,proto3,enum=sqlite_remote.v1.SigAlg" json:"sig_alg,omitempty"`
	PublicKey []byte `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// Access token, for a server that admits only clients with one. A signed JWT whose `cnf` claim binds it to
	// `public_key`, so that it is useless without the private key. The server checks it before the `Challenge` and
	// rejects a missing, invalid or expired token, or one bound to another key, with ERROR_CODE_ACCESS_DENIED. A server
	// without such a requirement ignores the field. See `HelloOk.access_token_ttl_ms`.
	AccessToken string `protobuf:"bytes,5,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` // 6 is reserved for a second signature algorithm.
	// contains filtered or unexported fields
}

First frame on a connection. The server answers with a `Challenge`, or with an `Error` if the frame is invalid or the access token is rejected.

func (*Hello) Descriptor deprecated

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

Deprecated: Use Hello.ProtoReflect.Descriptor instead.

func (*Hello) GetAccessToken

func (x *Hello) GetAccessToken() string

func (*Hello) GetInstanceId

func (x *Hello) GetInstanceId() []byte

func (*Hello) GetProtocolVersion

func (x *Hello) GetProtocolVersion() uint32

func (*Hello) GetPublicKey

func (x *Hello) GetPublicKey() []byte

func (*Hello) GetSigAlg

func (x *Hello) GetSigAlg() SigAlg

func (*Hello) ProtoMessage

func (*Hello) ProtoMessage()

func (*Hello) ProtoReflect

func (x *Hello) ProtoReflect() protoreflect.Message

func (*Hello) Reset

func (x *Hello) Reset()

func (*Hello) String

func (x *Hello) String() string

type HelloOk

type HelloOk struct {

	// Protocol version of the server.
	ProtocolVersion uint32 `protobuf:"varint,1,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version,omitempty"`
	// Largest frame the server accepts, in bytes. The client splits a commit into parts that fit.
	MaxFrameBytes uint32 `protobuf:"varint,2,opt,name=max_frame_bytes,json=maxFrameBytes,proto3" json:"max_frame_bytes,omitempty"`
	// Interval at which the client sends a `Ping` while it is otherwise idle, in milliseconds.
	PingIntervalMs uint32 `protobuf:"varint,3,opt,name=ping_interval_ms,json=pingIntervalMs,proto3" json:"ping_interval_ms,omitempty"`
	// Time after the last renewal from which another instance can acquire the lease without `takeover`, in
	// milliseconds. Commits and pings renew the lease.
	LeaseTtlMs uint32 `protobuf:"varint,4,opt,name=lease_ttl_ms,json=leaseTtlMs,proto3" json:"lease_ttl_ms,omitempty"`
	// Remaining lifetime of the access token in milliseconds, 0 without a token. Relative, so that the clocks of client
	// and server need not agree. The client reconnects with a new token before this time has passed, between two
	// requests. Shortly after it has passed, the server closes the connection at the next frame.
	AccessTokenTtlMs uint64 `protobuf:"varint,5,opt,name=access_token_ttl_ms,json=accessTokenTtlMs,proto3" json:"access_token_ttl_ms,omitempty"`
	// contains filtered or unexported fields
}

Answer to a valid `Proof`, with the Proof's request_id. Completes the login and carries the server's limits.

func (*HelloOk) Descriptor deprecated

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

Deprecated: Use HelloOk.ProtoReflect.Descriptor instead.

func (*HelloOk) GetAccessTokenTtlMs

func (x *HelloOk) GetAccessTokenTtlMs() uint64

func (*HelloOk) GetLeaseTtlMs

func (x *HelloOk) GetLeaseTtlMs() uint32

func (*HelloOk) GetMaxFrameBytes

func (x *HelloOk) GetMaxFrameBytes() uint32

func (*HelloOk) GetPingIntervalMs

func (x *HelloOk) GetPingIntervalMs() uint32

func (*HelloOk) GetProtocolVersion

func (x *HelloOk) GetProtocolVersion() uint32

func (*HelloOk) ProtoMessage

func (*HelloOk) ProtoMessage()

func (*HelloOk) ProtoReflect

func (x *HelloOk) ProtoReflect() protoreflect.Message

func (*HelloOk) Reset

func (x *HelloOk) Reset()

func (*HelloOk) String

func (x *HelloOk) String() string

type LeaseRevoked

type LeaseRevoked struct {
	DbId          string `protobuf:"bytes,1,opt,name=db_id,json=dbId,proto3" json:"db_id,omitempty"`
	NewLeaseEpoch uint64 `protobuf:"varint,2,opt,name=new_lease_epoch,json=newLeaseEpoch,proto3" json:"new_lease_epoch,omitempty"`
	// contains filtered or unexported fields
}

Sent unprompted (request_id 0) when another instance has acquired the lease of a database open on this connection. Delivery is not guaranteed. A client that missed it gets ERROR_CODE_FENCED on its next commit.

func (*LeaseRevoked) Descriptor deprecated

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

Deprecated: Use LeaseRevoked.ProtoReflect.Descriptor instead.

func (*LeaseRevoked) GetDbId

func (x *LeaseRevoked) GetDbId() string

func (*LeaseRevoked) GetNewLeaseEpoch

func (x *LeaseRevoked) GetNewLeaseEpoch() uint64

func (*LeaseRevoked) ProtoMessage

func (*LeaseRevoked) ProtoMessage()

func (*LeaseRevoked) ProtoReflect

func (x *LeaseRevoked) ProtoReflect() protoreflect.Message

func (*LeaseRevoked) Reset

func (x *LeaseRevoked) Reset()

func (*LeaseRevoked) String

func (x *LeaseRevoked) String() string

type Ok

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

Answer to a request that returns no data, e.g. `CloseDb`.

func (*Ok) Descriptor deprecated

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

Deprecated: Use Ok.ProtoReflect.Descriptor instead.

func (*Ok) ProtoMessage

func (*Ok) ProtoMessage()

func (*Ok) ProtoReflect

func (x *Ok) ProtoReflect() protoreflect.Message

func (*Ok) Reset

func (x *Ok) Reset()

func (*Ok) String

func (x *Ok) String() string

type Open

type Open struct {

	// Name of the database within the subject. 1 to 128 bytes of UTF-8.
	DbId string `protobuf:"bytes,1,opt,name=db_id,json=dbId,proto3" json:"db_id,omitempty"`
	// Page size of a new database. For an existing database it must be 0 or equal to the database's page size.
	PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// Creates the database if it does not exist or was deleted. Without it, such a database fails with
	// ERROR_CODE_NOT_FOUND.
	CreateIfMissing bool `protobuf:"varint,3,opt,name=create_if_missing,json=createIfMissing,proto3" json:"create_if_missing,omitempty"`
	// Acquires the lease even if another instance holds one that has not expired. Without it, the open fails with
	// ERROR_CODE_LEASE_HELD in that case. The instance that holds the lease, identified by `Hello.instance_id`, gets a
	// new lease without it: a client that restarted has lost its lease id and cannot resume. Its earlier lease is fenced.
	Takeover bool `protobuf:"varint,4,opt,name=takeover,proto3" json:"takeover,omitempty"`
	// Set only when reopening after a broken connection. Continues the previous lease instead of acquiring a new one.
	Resume *Resume `protobuf:"bytes,5,opt,name=resume,proto3" json:"resume,omitempty"`
	// contains filtered or unexported fields
}

Opens a database and acquires its lease, the exclusive right to commit to it. Answered with `Opened`.

func (*Open) Descriptor deprecated

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

Deprecated: Use Open.ProtoReflect.Descriptor instead.

func (*Open) GetCreateIfMissing

func (x *Open) GetCreateIfMissing() bool

func (*Open) GetDbId

func (x *Open) GetDbId() string

func (*Open) GetPageSize

func (x *Open) GetPageSize() uint32

func (*Open) GetResume

func (x *Open) GetResume() *Resume

func (*Open) GetTakeover

func (x *Open) GetTakeover() bool

func (*Open) ProtoMessage

func (*Open) ProtoMessage()

func (*Open) ProtoReflect

func (x *Open) ProtoReflect() protoreflect.Message

func (*Open) Reset

func (x *Open) Reset()

func (*Open) String

func (x *Open) String() string

type Opened

type Opened struct {
	LeaseId []byte `protobuf:"bytes,1,opt,name=lease_id,json=leaseId,proto3" json:"lease_id,omitempty"`
	// Fencing token. Every new lease has a higher epoch. A `Commit` must carry the current epoch, otherwise it fails
	// with ERROR_CODE_FENCED.
	LeaseEpoch uint64 `protobuf:"varint,2,opt,name=lease_epoch,json=leaseEpoch,proto3" json:"lease_epoch,omitempty"`
	// Current version. Every applied commit and every deletion increases it by 1.
	Version  uint64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"`
	PageSize uint32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// Length of the database file, in blocks.
	PageCount uint64 `protobuf:"varint,5,opt,name=page_count,json=pageCount,proto3" json:"page_count,omitempty"`
	// commit_id of the last applied commit. A client whose commit was not acknowledged compares it with its own
	// commit_id to find out whether the commit was applied.
	LastCommitId []byte `protobuf:"bytes,6,opt,name=last_commit_id,json=lastCommitId,proto3" json:"last_commit_id,omitempty"`
	// contains filtered or unexported fields
}

Answer to `Open`: the lease and the current state of the database.

func (*Opened) Descriptor deprecated

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

Deprecated: Use Opened.ProtoReflect.Descriptor instead.

func (*Opened) GetLastCommitId

func (x *Opened) GetLastCommitId() []byte

func (*Opened) GetLeaseEpoch

func (x *Opened) GetLeaseEpoch() uint64

func (*Opened) GetLeaseId

func (x *Opened) GetLeaseId() []byte

func (*Opened) GetPageCount

func (x *Opened) GetPageCount() uint64

func (*Opened) GetPageSize

func (x *Opened) GetPageSize() uint32

func (*Opened) GetVersion

func (x *Opened) GetVersion() uint64

func (*Opened) ProtoMessage

func (*Opened) ProtoMessage()

func (*Opened) ProtoReflect

func (x *Opened) ProtoReflect() protoreflect.Message

func (*Opened) Reset

func (x *Opened) Reset()

func (*Opened) String

func (x *Opened) String() string

type Pages

type Pages struct {

	// Index of the first block in this frame.
	FirstBlock uint64 `protobuf:"varint,1,opt,name=first_block,json=firstBlock,proto3" json:"first_block,omitempty"`
	// Consecutive blocks from `first_block`, each exactly page_size bytes.
	Blocks [][]byte `protobuf:"bytes,2,rep,name=blocks,proto3" json:"blocks,omitempty"`
	// True on the last frame of the answer.
	Last bool `protobuf:"varint,3,opt,name=last,proto3" json:"last,omitempty"`
	// contains filtered or unexported fields
}

Blocks answering a `Fetch`, with the Fetch's request_id. The server sends the ranges in the requested order and splits them across as many frames as needed. A frame never contains blocks from two ranges.

func (*Pages) Descriptor deprecated

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

Deprecated: Use Pages.ProtoReflect.Descriptor instead.

func (*Pages) GetBlocks

func (x *Pages) GetBlocks() [][]byte

func (*Pages) GetFirstBlock

func (x *Pages) GetFirstBlock() uint64

func (*Pages) GetLast

func (x *Pages) GetLast() bool

func (*Pages) ProtoMessage

func (*Pages) ProtoMessage()

func (*Pages) ProtoReflect

func (x *Pages) ProtoReflect() protoreflect.Message

func (*Pages) Reset

func (x *Pages) Reset()

func (*Pages) String

func (x *Pages) String() string

type Ping

type Ping struct {

	// Client clock in milliseconds. Returned unchanged in the `Pong`.
	ClientTimeMs uint64 `protobuf:"varint,1,opt,name=client_time_ms,json=clientTimeMs,proto3" json:"client_time_ms,omitempty"`
	// contains filtered or unexported fields
}

Keeps the connection open and renews the leases of all databases open on it. The server renews a lease only if at least half of lease_ttl_ms has passed since its last renewal. Answered with `Pong`.

func (*Ping) Descriptor deprecated

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

Deprecated: Use Ping.ProtoReflect.Descriptor instead.

func (*Ping) GetClientTimeMs

func (x *Ping) GetClientTimeMs() uint64

func (*Ping) ProtoMessage

func (*Ping) ProtoMessage()

func (*Ping) ProtoReflect

func (x *Ping) ProtoReflect() protoreflect.Message

func (*Ping) Reset

func (x *Ping) Reset()

func (*Ping) String

func (x *Ping) String() string

type Pong

type Pong struct {
	ClientTimeMs uint64 `protobuf:"varint,1,opt,name=client_time_ms,json=clientTimeMs,proto3" json:"client_time_ms,omitempty"`
	// contains filtered or unexported fields
}

Answer to `Ping`.

func (*Pong) Descriptor deprecated

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

Deprecated: Use Pong.ProtoReflect.Descriptor instead.

func (*Pong) GetClientTimeMs

func (x *Pong) GetClientTimeMs() uint64

func (*Pong) ProtoMessage

func (*Pong) ProtoMessage()

func (*Pong) ProtoReflect

func (x *Pong) ProtoReflect() protoreflect.Message

func (*Pong) Reset

func (x *Pong) Reset()

func (*Pong) String

func (x *Pong) String() string

type Proof

type Proof struct {
	Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

Answer to `Challenge`. The server answers with `HelloOk`, or with an `Error` (ERROR_CODE_UNAUTHENTICATED), both with the Proof's request_id.

`signature` is the signature over the following transcript. Each part is preceded by its length as a 4-byte big-endian integer:

"sqlite-remote-auth-v1" || server_id || nonce || instance_id || sig_alg || public_key

sig_alg is the enum value as a 4-byte big-endian integer.

func (*Proof) Descriptor deprecated

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

Deprecated: Use Proof.ProtoReflect.Descriptor instead.

func (*Proof) GetSignature

func (x *Proof) GetSignature() []byte

func (*Proof) ProtoMessage

func (*Proof) ProtoMessage()

func (*Proof) ProtoReflect

func (x *Proof) ProtoReflect() protoreflect.Message

func (*Proof) Reset

func (x *Proof) Reset()

func (*Proof) String

func (x *Proof) String() string

type Range

type Range struct {
	FirstBlock uint64 `protobuf:"varint,1,opt,name=first_block,json=firstBlock,proto3" json:"first_block,omitempty"`
	Count      uint64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

A range of consecutive blocks.

func (*Range) Descriptor deprecated

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

Deprecated: Use Range.ProtoReflect.Descriptor instead.

func (*Range) GetCount

func (x *Range) GetCount() uint64

func (*Range) GetFirstBlock

func (x *Range) GetFirstBlock() uint64

func (*Range) ProtoMessage

func (*Range) ProtoMessage()

func (*Range) ProtoReflect

func (x *Range) ProtoReflect() protoreflect.Message

func (*Range) Reset

func (x *Range) Reset()

func (*Range) String

func (x *Range) String() string

type Resume

type Resume struct {

	// lease_id and lease_epoch from the previous `Opened`. If the lease is no longer current, the open fails with
	// ERROR_CODE_FENCED.
	LeaseId    []byte `protobuf:"bytes,1,opt,name=lease_id,json=leaseId,proto3" json:"lease_id,omitempty"`
	LeaseEpoch uint64 `protobuf:"varint,2,opt,name=lease_epoch,json=leaseEpoch,proto3" json:"lease_epoch,omitempty"`
	// The last version the server acknowledged to this client.
	KnownVersion uint64 `protobuf:"varint,3,opt,name=known_version,json=knownVersion,proto3" json:"known_version,omitempty"`
	// commit_id of a commit that was sent but not acknowledged. Empty if there is none.
	PendingCommitId []byte `protobuf:"bytes,4,opt,name=pending_commit_id,json=pendingCommitId,proto3" json:"pending_commit_id,omitempty"`
	// contains filtered or unexported fields
}

The previous lease and state, for reopening after a broken connection.

func (*Resume) Descriptor deprecated

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

Deprecated: Use Resume.ProtoReflect.Descriptor instead.

func (*Resume) GetKnownVersion

func (x *Resume) GetKnownVersion() uint64

func (*Resume) GetLeaseEpoch

func (x *Resume) GetLeaseEpoch() uint64

func (*Resume) GetLeaseId

func (x *Resume) GetLeaseId() []byte

func (*Resume) GetPendingCommitId

func (x *Resume) GetPendingCommitId() []byte

func (*Resume) ProtoMessage

func (*Resume) ProtoMessage()

func (*Resume) ProtoReflect

func (x *Resume) ProtoReflect() protoreflect.Message

func (*Resume) Reset

func (x *Resume) Reset()

func (*Resume) String

func (x *Resume) String() string

type ServerFrame

type ServerFrame struct {

	// The request_id of the request this frame answers. 0 for a frame the server sends unprompted (`LeaseRevoked`).
	RequestId uint64 `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	// Types that are valid to be assigned to Body:
	//
	//	*ServerFrame_HelloOk
	//	*ServerFrame_Opened
	//	*ServerFrame_Pages
	//	*ServerFrame_CommitAck
	//	*ServerFrame_Pong
	//	*ServerFrame_LeaseRevoked
	//	*ServerFrame_Error
	//	*ServerFrame_Ok
	//	*ServerFrame_Challenge
	//	*ServerFrame_Changes
	//	*ServerFrame_Slot
	Body isServerFrame_Body `protobuf_oneof:"body"`
	// contains filtered or unexported fields
}

A frame from the server to the client.

func (*ServerFrame) Descriptor deprecated

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

Deprecated: Use ServerFrame.ProtoReflect.Descriptor instead.

func (*ServerFrame) GetBody

func (x *ServerFrame) GetBody() isServerFrame_Body

func (*ServerFrame) GetChallenge

func (x *ServerFrame) GetChallenge() *Challenge

func (*ServerFrame) GetChanges

func (x *ServerFrame) GetChanges() *Changes

func (*ServerFrame) GetCommitAck

func (x *ServerFrame) GetCommitAck() *CommitAck

func (*ServerFrame) GetError

func (x *ServerFrame) GetError() *Error

func (*ServerFrame) GetHelloOk

func (x *ServerFrame) GetHelloOk() *HelloOk

func (*ServerFrame) GetLeaseRevoked

func (x *ServerFrame) GetLeaseRevoked() *LeaseRevoked

func (*ServerFrame) GetOk

func (x *ServerFrame) GetOk() *Ok

func (*ServerFrame) GetOpened

func (x *ServerFrame) GetOpened() *Opened

func (*ServerFrame) GetPages

func (x *ServerFrame) GetPages() *Pages

func (*ServerFrame) GetPong

func (x *ServerFrame) GetPong() *Pong

func (*ServerFrame) GetRequestId

func (x *ServerFrame) GetRequestId() uint64

func (*ServerFrame) GetSlot added in v0.3.0

func (x *ServerFrame) GetSlot() *Slot

func (*ServerFrame) ProtoMessage

func (*ServerFrame) ProtoMessage()

func (*ServerFrame) ProtoReflect

func (x *ServerFrame) ProtoReflect() protoreflect.Message

func (*ServerFrame) Reset

func (x *ServerFrame) Reset()

func (*ServerFrame) String

func (x *ServerFrame) String() string

type ServerFrame_Challenge

type ServerFrame_Challenge struct {
	Challenge *Challenge `protobuf:"bytes,18,opt,name=challenge,proto3,oneof"`
}

type ServerFrame_Changes

type ServerFrame_Changes struct {
	Changes *Changes `protobuf:"bytes,19,opt,name=changes,proto3,oneof"`
}

type ServerFrame_CommitAck

type ServerFrame_CommitAck struct {
	CommitAck *CommitAck `protobuf:"bytes,13,opt,name=commit_ack,json=commitAck,proto3,oneof"`
}

type ServerFrame_Error

type ServerFrame_Error struct {
	Error *Error `protobuf:"bytes,16,opt,name=error,proto3,oneof"`
}

type ServerFrame_HelloOk

type ServerFrame_HelloOk struct {
	HelloOk *HelloOk `protobuf:"bytes,10,opt,name=hello_ok,json=helloOk,proto3,oneof"`
}

type ServerFrame_LeaseRevoked

type ServerFrame_LeaseRevoked struct {
	LeaseRevoked *LeaseRevoked `protobuf:"bytes,15,opt,name=lease_revoked,json=leaseRevoked,proto3,oneof"`
}

type ServerFrame_Ok

type ServerFrame_Ok struct {
	Ok *Ok `protobuf:"bytes,17,opt,name=ok,proto3,oneof"`
}

type ServerFrame_Opened

type ServerFrame_Opened struct {
	Opened *Opened `protobuf:"bytes,11,opt,name=opened,proto3,oneof"`
}

type ServerFrame_Pages

type ServerFrame_Pages struct {
	Pages *Pages `protobuf:"bytes,12,opt,name=pages,proto3,oneof"`
}

type ServerFrame_Pong

type ServerFrame_Pong struct {
	Pong *Pong `protobuf:"bytes,14,opt,name=pong,proto3,oneof"`
}

type ServerFrame_Slot added in v0.3.0

type ServerFrame_Slot struct {
	Slot *Slot `protobuf:"bytes,20,opt,name=slot,proto3,oneof"`
}

type SetSlotLabel added in v0.4.0

type SetSlotLabel struct {

	// At most 256 bytes. Empty clears the label.
	Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"`
	// contains filtered or unexported fields
}

Sets the label of the owner's slot, e.g. the id of the device that holds it. Only the key that holds the slot can set it: for another key the request fails with ERROR_CODE_SLOT_TAKEN, without a slot with ERROR_CODE_NOT_FOUND. It never passes or deletes anything. Answered with `Slot`.

func (*SetSlotLabel) Descriptor deprecated added in v0.4.0

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

Deprecated: Use SetSlotLabel.ProtoReflect.Descriptor instead.

func (*SetSlotLabel) GetLabel added in v0.4.0

func (x *SetSlotLabel) GetLabel() string

func (*SetSlotLabel) ProtoMessage added in v0.4.0

func (*SetSlotLabel) ProtoMessage()

func (*SetSlotLabel) ProtoReflect added in v0.4.0

func (x *SetSlotLabel) ProtoReflect() protoreflect.Message

func (*SetSlotLabel) Reset added in v0.4.0

func (x *SetSlotLabel) Reset()

func (*SetSlotLabel) String added in v0.4.0

func (x *SetSlotLabel) String() string

type SigAlg

type SigAlg int32

Signature algorithm of the client's key pair.

const (
	SigAlg_SIG_ALG_UNSPECIFIED SigAlg = 0
	SigAlg_SIG_ALG_ED25519     SigAlg = 1
)

func (SigAlg) Descriptor

func (SigAlg) Descriptor() protoreflect.EnumDescriptor

func (SigAlg) Enum

func (x SigAlg) Enum() *SigAlg

func (SigAlg) EnumDescriptor deprecated

func (SigAlg) EnumDescriptor() ([]byte, []int)

Deprecated: Use SigAlg.Descriptor instead.

func (SigAlg) Number

func (x SigAlg) Number() protoreflect.EnumNumber

func (SigAlg) String

func (x SigAlg) String() string

func (SigAlg) Type

func (SigAlg) Type() protoreflect.EnumType

type Slot added in v0.3.0

type Slot struct {
	Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"`
	// Time the slot passed to its current key, in milliseconds since the Unix epoch.
	ClaimedAtMs uint64 `protobuf:"varint,2,opt,name=claimed_at_ms,json=claimedAtMs,proto3" json:"claimed_at_ms,omitempty"`
	// Label of the slot before this claim, if another key held it. Empty if the slot was free or already held by this
	// key.
	ReplacedLabel string `protobuf:"bytes,3,opt,name=replaced_label,json=replacedLabel,proto3" json:"replaced_label,omitempty"`
	// contains filtered or unexported fields
}

The owner's slot, in answer to `ClaimSlot` and `SetSlotLabel`.

func (*Slot) Descriptor deprecated added in v0.3.0

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

Deprecated: Use Slot.ProtoReflect.Descriptor instead.

func (*Slot) GetClaimedAtMs added in v0.3.0

func (x *Slot) GetClaimedAtMs() uint64

func (*Slot) GetLabel added in v0.3.0

func (x *Slot) GetLabel() string

func (*Slot) GetReplacedLabel added in v0.3.0

func (x *Slot) GetReplacedLabel() string

func (*Slot) ProtoMessage added in v0.3.0

func (*Slot) ProtoMessage()

func (*Slot) ProtoReflect added in v0.3.0

func (x *Slot) ProtoReflect() protoreflect.Message

func (*Slot) Reset added in v0.3.0

func (x *Slot) Reset()

func (*Slot) String added in v0.3.0

func (x *Slot) String() string

Jump to

Keyboard shortcuts

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