sample_chain/peer/shim/response.go

23 lines
279 B
Go

package shim
import pb "schain/proto"
const (
OK = 200
ERROR = 500
)
func Success(payload []byte) pb.Response {
return pb.Response{
Status: OK,
Payload: payload,
}
}
func Error(msg string) pb.Response {
return pb.Response{
Status: ERROR,
Message: msg,
}
}