forked from stellar/go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
receive.go
29 lines (23 loc) · 786 Bytes
/
receive.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package compliance
import (
"encoding/json"
"github.com/caoxuwen/go/services/internal/bridge-compliance-shared/http/helpers"
)
// ReceiveRequest represents request sent to /receive endpoint of compliance server
type ReceiveRequest struct {
Memo string `form:"memo" valid:"required"`
}
// Validate is additional validation method to validate special fields.
func (request *ReceiveRequest) Validate(params ...interface{}) error {
return nil
}
// ReceiveResponse represents response returned by /receive endpoint
type ReceiveResponse struct {
helpers.SuccessResponse
// The AuthData hash of this memo.
Data string `json:"data"`
}
// Marshal marshals ReceiveResponse
func (response *ReceiveResponse) Marshal() ([]byte, error) {
return json.MarshalIndent(response, "", " ")
}