-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdata.go
More file actions
28 lines (22 loc) · 791 Bytes
/
Copy pathdata.go
File metadata and controls
28 lines (22 loc) · 791 Bytes
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
package api
import (
"reflect"
"github.com/Aize-Public/forego/ctx"
)
// the client request object used to Marshal a request to a server
type ClientRequest interface {
Marshal(c ctx.C, name string, into reflect.Value) error
}
// the client response object used to unmarshal the response from the server
type ClientResponse interface {
Unmarshal(c ctx.C, name string, from reflect.Value) error
}
// the server request object used to Unmarshal the request from the client
type ServerRequest interface {
Unmarshal(c ctx.C, name string, into reflect.Value) error
Auth(c ctx.C, into reflect.Value, required bool) error
}
// the server response object used to marshal the response to the client
type ServerResponse interface {
Marshal(c ctx.C, name string, into reflect.Value) error
}