payload

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 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 CSVLocation added in v0.4.12

type CSVLocation struct {
	StartLine int `json:"startLine"` // Line where the record starts
	Line      int `json:"line"`      // Line where the error occurred
	Column    int `json:"column"`    // Column (1-based byte index) where the error occurred
}

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 {
	Sum           *Hex               `json:"sum,omitempty"`
	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 {
	TableSum    *Hex       `json:"tableSum"`
	OldTableSum *Hex       `json:"oldTableSum"`
	ColDiff     *ColDiff   `json:"colDiff"`
	RowDiff     []*RowDiff `json:"rowDiff"`
}

type Error added in v0.4.12

type Error struct {
	// Message is always present if there's an error. Otherwise this object
	// will be empty.
	Message string `json:"message,omitempty"` // The actual error

	// CSV appears when the error is a CSV parsing error
	CSV *CSVLocation `json:"csv,omitempty"`
}

type GetCommitsResponse added in v0.4.0

type GetCommitsResponse struct {
	Sum  *Hex   `json:"sum,omitempty"`
	Root Commit `json:"root"`
}

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) String added in v0.5.0

func (x *Hex) String() string

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 {
	Offset1 *uint32 `json:"off1,omitempty"`
	Offset2 *uint32 `json:"off2,omitempty"`
}

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