payload

package
v0.4.11 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 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 AuthenticateRequest added in v0.4.0

type AuthenticateRequest struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type AuthenticateResponse added in v0.4.0

type AuthenticateResponse struct {
	IDToken string `json:"idToken"`
}

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 Commit added in v0.4.0

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

type CommitResponse

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

type DiffResponse

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

type GetCommitsResponse added in v0.4.0

type GetCommitsResponse struct {
	Commits map[string]*Commit `json:"commits"`
}

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 Table added in v0.4.11

type Table struct {
	Sum       *Hex     `json:"sum,omitempty"`
	Columns   []string `json:"columns"`
	PK        []uint32 `json:"pk,omitempty"`
	RowsCount uint32   `json:"rowsCount"`
}

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