payload

package
v0.3.10 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HexSliceToBytesSlice

func HexSliceToBytesSlice(sl []*Hex) [][]byte

Types

type BlockFormat added in v0.3.11

type BlockFormat string
const (
	BlockFormatCSV    BlockFormat = "csv"
	BlockFormatBinary BlockFormat = "binary"
)

type ColDiff

type ColDiff struct {
	OldPK      []uint32 `json:"oldPK,omitempty"`
	PK         []uint32 `json:"pk,omitempty"`
	OldColumns []string `json:"oldColumns"`
	Columns    []string `json:"columns"`
}

type CommitResponse

type CommitResponse struct {
	Sum *Hex `json:"sum,omitempty"`
}

type DiffResponse

type DiffResponse struct {
	ColDiff *ColDiff   `json:"colDiff"`
	RowDiff []*RowDiff `json:"rowDiff"`
}

type GetCommitResponse

type GetCommitResponse struct {
	AuthorName  string    `json:"authorName,omitempty"`
	AuthorEmail string    `json:"authorEmail,omitempty"`
	Message     string    `json:"message,omitempty"`
	Table       *Hex      `json:"table"`
	Time        time.Time `json:"time,omitempty"`
	Parents     []*Hex    `json:"parents,omitempty"`
}

type GetRefsResponse

type GetRefsResponse struct {
	Refs map[string]*Hex `json:"refs"`
}

type GetTableResponse

type GetTableResponse struct {
	Columns   []string `json:"columns"`
	PK        []uint32 `json:"pk,omitempty"`
	RowsCount uint32   `json:"rowsCount"`
}

type Hex

type Hex [16]byte

func AppendHex

func AppendHex(sl []*Hex, b []byte) []*Hex

func BytesToHex

func BytesToHex(b []byte) *Hex

func (*Hex) MarshalJSON

func (x *Hex) MarshalJSON() ([]byte, error)

func (*Hex) UnmarshalJSON

func (x *Hex) UnmarshalJSON(b []byte) error

type ReceivePackRequest

type ReceivePackRequest struct {
	Updates map[string]*Update `json:"updates"`
}

type ReceivePackResponse

type ReceivePackResponse struct {
	Updates map[string]*Update `json:"updates"`
}

type RowDiff

type RowDiff struct {
	PK        *Hex   `json:"pk,omitempty"`
	Sum       *Hex   `json:"sum,omitempty"`
	OldSum    *Hex   `json:"oldSum,omitempty"`
	Offset    uint32 `json:"offset"`
	OldOffset uint32 `json:"oldOffset"`
}

type Update

type Update struct {
	Sum    *Hex   `json:"sum,omitempty"`
	OldSum *Hex   `json:"oldSum,omitempty"`
	ErrMsg string `json:"errMsg,omitempty"`
}

type UploadPackRequest

type UploadPackRequest struct {
	Wants []*Hex `json:"wants,omitempty"`
	Haves []*Hex `json:"haves,omitempty"`
	Done  bool   `json:"done,omitempty"`
}

type UploadPackResponse

type UploadPackResponse struct {
	ACKs []*Hex `json:"acks,omitempty"`
}

Jump to

Keyboard shortcuts

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