capnp

package
v0.0.5-beta-2 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: MIT, Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DealInfo_TypeID = 0xc69bf7c475bb2886

DealInfo_TypeID is the unique identifier for the type DealInfo.

View Source
const Schema_Column_TypeID = 0xc6ee33dc50be1a5a

Schema_Column_TypeID is the unique identifier for the type Schema_Column.

View Source
const Schema_TypeID = 0xb2c63295c6bcc643

Schema_TypeID is the unique identifier for the type Schema.

View Source
const Tx_Record_Column_TypeID = 0xdaf0d54cc25988fc

Tx_Record_Column_TypeID is the unique identifier for the type Tx_Record_Column.

View Source
const Tx_Record_PrimaryKey_TypeID = 0x9722004316c0ea9f

Tx_Record_PrimaryKey_TypeID is the unique identifier for the type Tx_Record_PrimaryKey.

View Source
const Tx_Record_TypeID = 0xadfa24e64cb4fa48

Tx_Record_TypeID is the unique identifier for the type Tx_Record.

View Source
const Tx_TypeID = 0xe9135d071d75f95f

Tx_TypeID is the unique identifier for the type Tx.

Variables

This section is empty.

Functions

func CompareTx

func CompareTx(tx *pgrepl.Tx, capnptx Tx) error

CompareTx compares the two types of Tx. Used for testing.

func RegisterSchema

func RegisterSchema(reg *schemas.Registry)

Types

type DealInfo

type DealInfo capnp.Struct

func NewDealInfo

func NewDealInfo(s *capnp.Segment) (DealInfo, error)

func NewRootDealInfo

func NewRootDealInfo(s *capnp.Segment) (DealInfo, error)

func ReadRootDealInfo

func ReadRootDealInfo(msg *capnp.Message) (DealInfo, error)

func (DealInfo) Archived

func (s DealInfo) Archived() bool

func (DealInfo) Cid

func (s DealInfo) Cid() (string, error)

func (DealInfo) CidBytes

func (s DealInfo) CidBytes() ([]byte, error)

func (DealInfo) DecodeFromPtr

func (DealInfo) DecodeFromPtr(p capnp.Ptr) DealInfo

func (DealInfo) EncodeAsPtr

func (s DealInfo) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr

func (DealInfo) ExpiresAt

func (s DealInfo) ExpiresAt() (string, error)

func (DealInfo) ExpiresAtBytes

func (s DealInfo) ExpiresAtBytes() ([]byte, error)

func (DealInfo) HasCid

func (s DealInfo) HasCid() bool

func (DealInfo) HasExpiresAt

func (s DealInfo) HasExpiresAt() bool

func (DealInfo) IsValid

func (s DealInfo) IsValid() bool

func (DealInfo) Message

func (s DealInfo) Message() *capnp.Message

func (DealInfo) Segment

func (s DealInfo) Segment() *capnp.Segment

func (DealInfo) SetArchived

func (s DealInfo) SetArchived(v bool)

func (DealInfo) SetCid

func (s DealInfo) SetCid(v string) error

func (DealInfo) SetExpiresAt

func (s DealInfo) SetExpiresAt(v string) error

func (DealInfo) SetSize

func (s DealInfo) SetSize(v uint32)

func (DealInfo) SetTimestamp

func (s DealInfo) SetTimestamp(v int64)

func (DealInfo) Size

func (s DealInfo) Size() uint32

func (DealInfo) String

func (s DealInfo) String() string

func (DealInfo) Timestamp

func (s DealInfo) Timestamp() int64

func (DealInfo) ToPtr

func (s DealInfo) ToPtr() capnp.Ptr

type DealInfo_Future

type DealInfo_Future struct{ *capnp.Future }

DealInfo_Future is a wrapper for a DealInfo promised by a client call.

func (DealInfo_Future) Struct

func (f DealInfo_Future) Struct() (DealInfo, error)

type DealInfo_List

type DealInfo_List = capnp.StructList[DealInfo]

DealInfo_List is a list of DealInfo.

func NewDealInfo_List

func NewDealInfo_List(s *capnp.Segment, sz int32) (DealInfo_List, error)

NewDealInfo creates a new list of DealInfo.

type Schema

type Schema capnp.Struct

func NewRootSchema

func NewRootSchema(s *capnp.Segment) (Schema, error)

func NewSchema

func NewSchema(s *capnp.Segment) (Schema, error)

func ReadRootSchema

func ReadRootSchema(msg *capnp.Message) (Schema, error)

func (Schema) Columns

func (s Schema) Columns() (Schema_Column_List, error)

func (Schema) DecodeFromPtr

func (Schema) DecodeFromPtr(p capnp.Ptr) Schema

func (Schema) EncodeAsPtr

func (s Schema) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr

func (Schema) HasColumns

func (s Schema) HasColumns() bool

func (Schema) IsValid

func (s Schema) IsValid() bool

func (Schema) Message

func (s Schema) Message() *capnp.Message

func (Schema) NewColumns

func (s Schema) NewColumns(n int32) (Schema_Column_List, error)

NewColumns sets the columns field to a newly allocated Schema_Column_List, preferring placement in s's segment.

func (Schema) Segment

func (s Schema) Segment() *capnp.Segment

func (Schema) SetColumns

func (s Schema) SetColumns(v Schema_Column_List) error

func (Schema) String

func (s Schema) String() string

func (Schema) ToPtr

func (s Schema) ToPtr() capnp.Ptr

type Schema_Column

type Schema_Column capnp.Struct

func NewRootSchema_Column

func NewRootSchema_Column(s *capnp.Segment) (Schema_Column, error)

func NewSchema_Column

func NewSchema_Column(s *capnp.Segment) (Schema_Column, error)

func ReadRootSchema_Column

func ReadRootSchema_Column(msg *capnp.Message) (Schema_Column, error)

func (Schema_Column) DecodeFromPtr

func (Schema_Column) DecodeFromPtr(p capnp.Ptr) Schema_Column

func (Schema_Column) EncodeAsPtr

func (s Schema_Column) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr

func (Schema_Column) HasName

func (s Schema_Column) HasName() bool

func (Schema_Column) HasType

func (s Schema_Column) HasType() bool

func (Schema_Column) IsNullable

func (s Schema_Column) IsNullable() bool

func (Schema_Column) IsPartOfPrimaryKey

func (s Schema_Column) IsPartOfPrimaryKey() bool

func (Schema_Column) IsValid

func (s Schema_Column) IsValid() bool

func (Schema_Column) Message

func (s Schema_Column) Message() *capnp.Message

func (Schema_Column) Name

func (s Schema_Column) Name() (string, error)

func (Schema_Column) NameBytes

func (s Schema_Column) NameBytes() ([]byte, error)

func (Schema_Column) Segment

func (s Schema_Column) Segment() *capnp.Segment

func (Schema_Column) SetIsNullable

func (s Schema_Column) SetIsNullable(v bool)

func (Schema_Column) SetIsPartOfPrimaryKey

func (s Schema_Column) SetIsPartOfPrimaryKey(v bool)

func (Schema_Column) SetName

func (s Schema_Column) SetName(v string) error

func (Schema_Column) SetType

func (s Schema_Column) SetType(v string) error

func (Schema_Column) String

func (s Schema_Column) String() string

func (Schema_Column) ToPtr

func (s Schema_Column) ToPtr() capnp.Ptr

func (Schema_Column) Type

func (s Schema_Column) Type() (string, error)

func (Schema_Column) TypeBytes

func (s Schema_Column) TypeBytes() ([]byte, error)

type Schema_Column_Future

type Schema_Column_Future struct{ *capnp.Future }

Schema_Column_Future is a wrapper for a Schema_Column promised by a client call.

func (Schema_Column_Future) Struct

type Schema_Column_List

type Schema_Column_List = capnp.StructList[Schema_Column]

Schema_Column_List is a list of Schema_Column.

func NewSchema_Column_List

func NewSchema_Column_List(s *capnp.Segment, sz int32) (Schema_Column_List, error)

NewSchema_Column creates a new list of Schema_Column.

type Schema_Future

type Schema_Future struct{ *capnp.Future }

Schema_Future is a wrapper for a Schema promised by a client call.

func (Schema_Future) Struct

func (f Schema_Future) Struct() (Schema, error)

type Schema_List

type Schema_List = capnp.StructList[Schema]

Schema_List is a list of Schema.

func NewSchema_List

func NewSchema_List(s *capnp.Segment, sz int32) (Schema_List, error)

NewSchema creates a new list of Schema.

type Tx

type Tx capnp.Struct

func FromPgReplTx

func FromPgReplTx(tx *pgrepl.Tx) (Tx, error)

FromPgReplTx converts Tx to its capnp verson.

func NewRootTx

func NewRootTx(s *capnp.Segment) (Tx, error)

func NewTx

func NewTx(s *capnp.Segment) (Tx, error)

func ReadRootTx

func ReadRootTx(msg *capnp.Message) (Tx, error)

func (Tx) CommitLSN

func (s Tx) CommitLSN() uint64

func (Tx) DecodeFromPtr

func (Tx) DecodeFromPtr(p capnp.Ptr) Tx

func (Tx) EncodeAsPtr

func (s Tx) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr

func (Tx) HasRecords

func (s Tx) HasRecords() bool

func (Tx) IsValid

func (s Tx) IsValid() bool

func (Tx) Message

func (s Tx) Message() *capnp.Message

func (Tx) NewRecords

func (s Tx) NewRecords(n int32) (Tx_Record_List, error)

NewRecords sets the records field to a newly allocated Tx_Record_List, preferring placement in s's segment.

func (Tx) Records

func (s Tx) Records() (Tx_Record_List, error)

func (Tx) Segment

func (s Tx) Segment() *capnp.Segment

func (Tx) SetCommitLSN

func (s Tx) SetCommitLSN(v uint64)

func (Tx) SetRecords

func (s Tx) SetRecords(v Tx_Record_List) error

func (Tx) String

func (s Tx) String() string

func (Tx) ToPtr

func (s Tx) ToPtr() capnp.Ptr

type Tx_Future

type Tx_Future struct{ *capnp.Future }

Tx_Future is a wrapper for a Tx promised by a client call.

func (Tx_Future) Struct

func (f Tx_Future) Struct() (Tx, error)

type Tx_List

type Tx_List = capnp.StructList[Tx]

Tx_List is a list of Tx.

func NewTx_List

func NewTx_List(s *capnp.Segment, sz int32) (Tx_List, error)

NewTx creates a new list of Tx.

type Tx_Record

type Tx_Record capnp.Struct

func NewRootTx_Record

func NewRootTx_Record(s *capnp.Segment) (Tx_Record, error)

func NewTx_Record

func NewTx_Record(s *capnp.Segment) (Tx_Record, error)

func ReadRootTx_Record

func ReadRootTx_Record(msg *capnp.Message) (Tx_Record, error)

func (Tx_Record) Action

func (s Tx_Record) Action() (string, error)

func (Tx_Record) ActionBytes

func (s Tx_Record) ActionBytes() ([]byte, error)

func (Tx_Record) Columns

func (s Tx_Record) Columns() (Tx_Record_Column_List, error)

func (Tx_Record) DecodeFromPtr

func (Tx_Record) DecodeFromPtr(p capnp.Ptr) Tx_Record

func (Tx_Record) EncodeAsPtr

func (s Tx_Record) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr

func (Tx_Record) HasAction

func (s Tx_Record) HasAction() bool

func (Tx_Record) HasColumns

func (s Tx_Record) HasColumns() bool

func (Tx_Record) HasPrimaryKey

func (s Tx_Record) HasPrimaryKey() bool

func (Tx_Record) HasSchema

func (s Tx_Record) HasSchema() bool

func (Tx_Record) HasTable

func (s Tx_Record) HasTable() bool

func (Tx_Record) HasTimestamp

func (s Tx_Record) HasTimestamp() bool

func (Tx_Record) IsValid

func (s Tx_Record) IsValid() bool

func (Tx_Record) Message

func (s Tx_Record) Message() *capnp.Message

func (Tx_Record) NewColumns

func (s Tx_Record) NewColumns(n int32) (Tx_Record_Column_List, error)

NewColumns sets the columns field to a newly allocated Tx_Record_Column_List, preferring placement in s's segment.

func (Tx_Record) NewPrimaryKey

func (s Tx_Record) NewPrimaryKey(n int32) (Tx_Record_PrimaryKey_List, error)

NewPrimaryKey sets the primaryKey field to a newly allocated Tx_Record_PrimaryKey_List, preferring placement in s's segment.

func (Tx_Record) PrimaryKey

func (s Tx_Record) PrimaryKey() (Tx_Record_PrimaryKey_List, error)

func (Tx_Record) Schema

func (s Tx_Record) Schema() (string, error)

func (Tx_Record) SchemaBytes

func (s Tx_Record) SchemaBytes() ([]byte, error)

func (Tx_Record) Segment

func (s Tx_Record) Segment() *capnp.Segment

func (Tx_Record) SetAction

func (s Tx_Record) SetAction(v string) error

func (Tx_Record) SetColumns

func (s Tx_Record) SetColumns(v Tx_Record_Column_List) error

func (Tx_Record) SetPrimaryKey

func (s Tx_Record) SetPrimaryKey(v Tx_Record_PrimaryKey_List) error

func (Tx_Record) SetSchema

func (s Tx_Record) SetSchema(v string) error

func (Tx_Record) SetTable

func (s Tx_Record) SetTable(v string) error

func (Tx_Record) SetTimestamp

func (s Tx_Record) SetTimestamp(v string) error

func (Tx_Record) String

func (s Tx_Record) String() string

func (Tx_Record) Table

func (s Tx_Record) Table() (string, error)

func (Tx_Record) TableBytes

func (s Tx_Record) TableBytes() ([]byte, error)

func (Tx_Record) Timestamp

func (s Tx_Record) Timestamp() (string, error)

func (Tx_Record) TimestampBytes

func (s Tx_Record) TimestampBytes() ([]byte, error)

func (Tx_Record) ToPtr

func (s Tx_Record) ToPtr() capnp.Ptr

type Tx_Record_Column

type Tx_Record_Column capnp.Struct

func NewRootTx_Record_Column

func NewRootTx_Record_Column(s *capnp.Segment) (Tx_Record_Column, error)

func NewTx_Record_Column

func NewTx_Record_Column(s *capnp.Segment) (Tx_Record_Column, error)

func ReadRootTx_Record_Column

func ReadRootTx_Record_Column(msg *capnp.Message) (Tx_Record_Column, error)

func (Tx_Record_Column) DecodeFromPtr

func (Tx_Record_Column) DecodeFromPtr(p capnp.Ptr) Tx_Record_Column

func (Tx_Record_Column) EncodeAsPtr

func (s Tx_Record_Column) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr

func (Tx_Record_Column) HasName

func (s Tx_Record_Column) HasName() bool

func (Tx_Record_Column) HasType

func (s Tx_Record_Column) HasType() bool

func (Tx_Record_Column) HasValue

func (s Tx_Record_Column) HasValue() bool

func (Tx_Record_Column) IsValid

func (s Tx_Record_Column) IsValid() bool

func (Tx_Record_Column) Message

func (s Tx_Record_Column) Message() *capnp.Message

func (Tx_Record_Column) Name

func (s Tx_Record_Column) Name() (string, error)

func (Tx_Record_Column) NameBytes

func (s Tx_Record_Column) NameBytes() ([]byte, error)

func (Tx_Record_Column) Segment

func (s Tx_Record_Column) Segment() *capnp.Segment

func (Tx_Record_Column) SetName

func (s Tx_Record_Column) SetName(v string) error

func (Tx_Record_Column) SetType

func (s Tx_Record_Column) SetType(v string) error

func (Tx_Record_Column) SetValue

func (s Tx_Record_Column) SetValue(v []byte) error

func (Tx_Record_Column) String

func (s Tx_Record_Column) String() string

func (Tx_Record_Column) ToPtr

func (s Tx_Record_Column) ToPtr() capnp.Ptr

func (Tx_Record_Column) Type

func (s Tx_Record_Column) Type() (string, error)

func (Tx_Record_Column) TypeBytes

func (s Tx_Record_Column) TypeBytes() ([]byte, error)

func (Tx_Record_Column) Value

func (s Tx_Record_Column) Value() ([]byte, error)

type Tx_Record_Column_Future

type Tx_Record_Column_Future struct{ *capnp.Future }

Tx_Record_Column_Future is a wrapper for a Tx_Record_Column promised by a client call.

func (Tx_Record_Column_Future) Struct

type Tx_Record_Column_List

type Tx_Record_Column_List = capnp.StructList[Tx_Record_Column]

Tx_Record_Column_List is a list of Tx_Record_Column.

func NewTx_Record_Column_List

func NewTx_Record_Column_List(s *capnp.Segment, sz int32) (Tx_Record_Column_List, error)

NewTx_Record_Column creates a new list of Tx_Record_Column.

type Tx_Record_Future

type Tx_Record_Future struct{ *capnp.Future }

Tx_Record_Future is a wrapper for a Tx_Record promised by a client call.

func (Tx_Record_Future) Struct

func (f Tx_Record_Future) Struct() (Tx_Record, error)

type Tx_Record_List

type Tx_Record_List = capnp.StructList[Tx_Record]

Tx_Record_List is a list of Tx_Record.

func NewTx_Record_List

func NewTx_Record_List(s *capnp.Segment, sz int32) (Tx_Record_List, error)

NewTx_Record creates a new list of Tx_Record.

type Tx_Record_PrimaryKey

type Tx_Record_PrimaryKey capnp.Struct

func NewRootTx_Record_PrimaryKey

func NewRootTx_Record_PrimaryKey(s *capnp.Segment) (Tx_Record_PrimaryKey, error)

func NewTx_Record_PrimaryKey

func NewTx_Record_PrimaryKey(s *capnp.Segment) (Tx_Record_PrimaryKey, error)

func ReadRootTx_Record_PrimaryKey

func ReadRootTx_Record_PrimaryKey(msg *capnp.Message) (Tx_Record_PrimaryKey, error)

func (Tx_Record_PrimaryKey) DecodeFromPtr

func (Tx_Record_PrimaryKey) EncodeAsPtr

func (s Tx_Record_PrimaryKey) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr

func (Tx_Record_PrimaryKey) HasName

func (s Tx_Record_PrimaryKey) HasName() bool

func (Tx_Record_PrimaryKey) HasType

func (s Tx_Record_PrimaryKey) HasType() bool

func (Tx_Record_PrimaryKey) IsValid

func (s Tx_Record_PrimaryKey) IsValid() bool

func (Tx_Record_PrimaryKey) Message

func (s Tx_Record_PrimaryKey) Message() *capnp.Message

func (Tx_Record_PrimaryKey) Name

func (s Tx_Record_PrimaryKey) Name() (string, error)

func (Tx_Record_PrimaryKey) NameBytes

func (s Tx_Record_PrimaryKey) NameBytes() ([]byte, error)

func (Tx_Record_PrimaryKey) Segment

func (s Tx_Record_PrimaryKey) Segment() *capnp.Segment

func (Tx_Record_PrimaryKey) SetName

func (s Tx_Record_PrimaryKey) SetName(v string) error

func (Tx_Record_PrimaryKey) SetType

func (s Tx_Record_PrimaryKey) SetType(v string) error

func (Tx_Record_PrimaryKey) String

func (s Tx_Record_PrimaryKey) String() string

func (Tx_Record_PrimaryKey) ToPtr

func (s Tx_Record_PrimaryKey) ToPtr() capnp.Ptr

func (Tx_Record_PrimaryKey) Type

func (s Tx_Record_PrimaryKey) Type() (string, error)

func (Tx_Record_PrimaryKey) TypeBytes

func (s Tx_Record_PrimaryKey) TypeBytes() ([]byte, error)

type Tx_Record_PrimaryKey_Future

type Tx_Record_PrimaryKey_Future struct{ *capnp.Future }

Tx_Record_PrimaryKey_Future is a wrapper for a Tx_Record_PrimaryKey promised by a client call.

func (Tx_Record_PrimaryKey_Future) Struct

type Tx_Record_PrimaryKey_List

type Tx_Record_PrimaryKey_List = capnp.StructList[Tx_Record_PrimaryKey]

Tx_Record_PrimaryKey_List is a list of Tx_Record_PrimaryKey.

func NewTx_Record_PrimaryKey_List

func NewTx_Record_PrimaryKey_List(s *capnp.Segment, sz int32) (Tx_Record_PrimaryKey_List, error)

NewTx_Record_PrimaryKey creates a new list of Tx_Record_PrimaryKey.

Jump to

Keyboard shortcuts

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