Documentation ¶
Index ¶
- func HexSliceToBytesSlice(sl []*Hex) [][]byte
- type BlockFormat
- type CSVLocation
- type Commit
- type CommitResponse
- type CreateTransactionRequest
- type CreateTransactionResponse
- type DiffResponse
- type Error
- type GetCommitsResponse
- type GetRefsResponse
- type GetTableResponse
- type GetTransactionResponse
- type Hex
- type ReceivePackRequest
- type ReceivePackResponse
- type RowDiff
- type Table
- type TxBranch
- type Update
- type UpdateTransactionRequest
- type UploadPackRequest
- type UploadPackResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HexSliceToBytesSlice ¶
Types ¶
type BlockFormat ¶
type BlockFormat string
const ( BlockFormatCSV BlockFormat = "csv" BlockFormatBinary BlockFormat = "binary" )
type CSVLocation ¶
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 }
func (*CSVLocation) Equal ¶ added in v0.13.0
func (a *CSVLocation) Equal(b *CSVLocation) bool
type Commit ¶
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 CreateTransactionRequest ¶ added in v0.10.1
type CreateTransactionResponse ¶ added in v0.10.1
type CreateTransactionResponse struct {
ID string `json:"id"`
}
type DiffResponse ¶
type DiffResponse struct { TableSum *Hex `json:"tableSum"` OldTableSum *Hex `json:"oldTableSum"` OldPK []uint32 `json:"oldPK,omitempty"` PK []uint32 `json:"pk,omitempty"` OldColumns []string `json:"oldColumns"` Columns []string `json:"columns"` RowDiff []*RowDiff `json:"rowDiff"` DataProfile *diffprof.TableProfileDiff `json:"dataProfile,omitempty"` }
type Error ¶
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 ¶
type GetRefsResponse ¶
type GetTableResponse ¶
type GetTransactionResponse ¶ added in v0.10.1
type Hex ¶
type Hex [16]byte
func BytesSliceToHexSlice ¶ added in v0.11.0
func BytesToHex ¶
func (*Hex) MarshalJSON ¶
func (*Hex) UnmarshalJSON ¶
type ReceivePackRequest ¶
type ReceivePackResponse ¶
type UpdateTransactionRequest ¶ added in v0.10.1
type UploadPackRequest ¶
type UploadPackRequest struct { // Wants is the list of wanted commits. Unless Depth is also specified, all // ancestors of Wants that are not present on the client will also be sent. // In an /upload-pack/ session, Wants must not be empty in the first request // and be empty in subsequent requests. Wants []*Hex `json:"wants,omitempty"` // Haves is the list of non-partial commits present on the client. The server // look at this list to figure out the minimal set of commits to send. By // default each request has a maximum of 32 haves. Haves []*Hex `json:"haves,omitempty"` // Depth is the maximum depth pass which the commits will only be transfered // shallowly rather than in full. A shallow commit transfer excludes its table // so while the commit history is still available, you won't be able to access // their data until you have pulled such commits in full. A Depth of 0 means // all missing commits will be transfered in full Depth int `json:"depth,omitempty"` // Done when set to true, signifies that the client is done with negotiation // and would like to receive all the commits that the server thinks are missing // on the client side. Done is typically set to true when the client has already // exhausted its history or has sent 256 haves and still not done with negotiation Done bool `json:"done,omitempty"` // TableACKs is the list of tables present on both the client and the server. The // server will not send tables in this list. TableACKs []*Hex `json:"tableACKs,omitempty"` }
UploadPackRequest is a request to the /upload-pack/ endpoint
type UploadPackResponse ¶
type UploadPackResponse struct { // ACKs is the list of commits that are present (but not necessarily in full) on the // server. The client can safely remove these commits and their ancestors from // negotiation. ACKs []*Hex `json:"acks,omitempty"` // TableHaves is the list of tables present on the server. The client put one entry // for each table that it haves in tableACKs in the next request TableHaves []*Hex `json:"tableHaves,omitempty"` }
UploadPackResponse is a possible response from the /upload-pack/ endpoint. It's primary purpose is to let the client know which commits the server acknowledge is present and to nudge the client to continue negotiation. When negotiation is finished, the server will send a Packfile with all the missing objects instead.
Click to show internal directories.
Click to hide internal directories.