Not impl endpoints

This commit is contained in:
bel
2020-04-12 16:56:14 +00:00
parent 79600941be
commit 0b4ecd1916
23 changed files with 213 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
package transaction
import "net/http"
func Read(w http.ResponseWriter, r *http.Request) {
http.Error(w, "not impl", http.StatusNotImplemented)
}

View File

@@ -0,0 +1,5 @@
package transaction
import "local/cheqbooq/server/balance"
type ReadRequest balance.ReadRequest

View File

@@ -0,0 +1,3 @@
package transaction
type ReadResponse map[string]map[string]Transaction

View File

@@ -0,0 +1,10 @@
package transaction
import "encoding/json"
type Transaction struct {
Account string `json:"account"`
Amount float32 `json:"amount"`
Timestamp int64 `json:"timestamp"`
Meta json.RawMessage `json:"meta"`
}

View File

@@ -0,0 +1,7 @@
package transaction
import "net/http"
func Write(w http.ResponseWriter, r *http.Request) {
http.Error(w, "not impl", http.StatusNotImplemented)
}

View File

@@ -0,0 +1,7 @@
package transaction
type WriteRequest map[string][]struct {
Op string `json:"op"`
Path string `json:"path"`
Value interface{} `json:"value"`
}

View File

@@ -0,0 +1,6 @@
package transaction
type WriteResponse map[string][]struct {
OK bool `json:"ok"`
Message string `json:"message,omitempty"`
}