Commit from GitHub Actions (Generate Clients & Examples)

This commit is contained in:
crufter
2021-11-11 11:57:36 +00:00
parent fff15c6f5b
commit 0aa4c208dd
5 changed files with 32 additions and 5 deletions

View File

@@ -34,12 +34,24 @@ func (t *DbService) Delete(request *DeleteRequest) (*DeleteResponse, error) {
return rsp, t.client.Call("db", "Delete", request, rsp)
}
//
func (t *DbService) ListTables(request *ListTablesRequest) (*ListTablesResponse, error) {
rsp := &ListTablesResponse{}
return rsp, t.client.Call("db", "ListTables", request, rsp)
}
// Read data from a table. Lookup can be by ID or via querying any field in the record.
func (t *DbService) Read(request *ReadRequest) (*ReadResponse, error) {
rsp := &ReadResponse{}
return rsp, t.client.Call("db", "Read", request, rsp)
}
//
func (t *DbService) RenameTable(request *RenameTableRequest) (*RenameTableResponse, error) {
rsp := &RenameTableResponse{}
return rsp, t.client.Call("db", "RenameTable", request, rsp)
}
// Truncate the records in a table
func (t *DbService) Truncate(request *TruncateRequest) (*TruncateResponse, error) {
rsp := &TruncateResponse{}
@@ -84,6 +96,13 @@ type DeleteRequest struct {
type DeleteResponse struct {
}
type ListTablesRequest struct {
}
type ListTablesResponse struct {
Tables []string `json:"tables"`
}
type ReadRequest struct {
// Read by id. Equivalent to 'id == "your-id"'
Id string `json:"id"`
@@ -110,6 +129,14 @@ type ReadResponse struct {
Records []map[string]interface{} `json:"records"`
}
type RenameTableRequest struct {
From string `json:"from"`
To string `json:"to"`
}
type RenameTableResponse struct {
}
type TruncateRequest struct {
// Optional table name. Defaults to 'default'
Table string `json:"table"`

View File

@@ -78,5 +78,5 @@
"prepare": "npm run build"
},
"types": "index.d.ts",
"version": "1.0.706"
"version": "1.0.717"
}