Not impl endpoints
This commit is contained in:
7
server/transaction/read.go
Normal file
7
server/transaction/read.go
Normal 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)
|
||||
}
|
||||
5
server/transaction/readrequest.go
Normal file
5
server/transaction/readrequest.go
Normal file
@@ -0,0 +1,5 @@
|
||||
package transaction
|
||||
|
||||
import "local/cheqbooq/server/balance"
|
||||
|
||||
type ReadRequest balance.ReadRequest
|
||||
3
server/transaction/readresponse.go
Normal file
3
server/transaction/readresponse.go
Normal file
@@ -0,0 +1,3 @@
|
||||
package transaction
|
||||
|
||||
type ReadResponse map[string]map[string]Transaction
|
||||
10
server/transaction/transaction.go
Normal file
10
server/transaction/transaction.go
Normal 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"`
|
||||
}
|
||||
7
server/transaction/write.go
Normal file
7
server/transaction/write.go
Normal 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)
|
||||
}
|
||||
7
server/transaction/writerequest.go
Normal file
7
server/transaction/writerequest.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package transaction
|
||||
|
||||
type WriteRequest map[string][]struct {
|
||||
Op string `json:"op"`
|
||||
Path string `json:"path"`
|
||||
Value interface{} `json:"value"`
|
||||
}
|
||||
6
server/transaction/writeresponse.go
Normal file
6
server/transaction/writeresponse.go
Normal file
@@ -0,0 +1,6 @@
|
||||
package transaction
|
||||
|
||||
type WriteResponse map[string][]struct {
|
||||
OK bool `json:"ok"`
|
||||
Message string `json:"message,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user