add standard OK response
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
d05e73a315
commit
f8a1a95310
70
events.pb.go
70
events.pb.go
|
@ -32,6 +32,7 @@ const (
|
||||||
Event_DEMO Event_EventType = 6
|
Event_DEMO Event_EventType = 6
|
||||||
Event_GET Event_EventType = 7
|
Event_GET Event_EventType = 7
|
||||||
Event_LOGIN Event_EventType = 8
|
Event_LOGIN Event_EventType = 8
|
||||||
|
Event_OK Event_EventType = 9
|
||||||
)
|
)
|
||||||
|
|
||||||
var Event_EventType_name = map[int32]string{
|
var Event_EventType_name = map[int32]string{
|
||||||
|
@ -44,6 +45,7 @@ var Event_EventType_name = map[int32]string{
|
||||||
6: "DEMO",
|
6: "DEMO",
|
||||||
7: "GET",
|
7: "GET",
|
||||||
8: "LOGIN",
|
8: "LOGIN",
|
||||||
|
9: "OK",
|
||||||
}
|
}
|
||||||
|
|
||||||
var Event_EventType_value = map[string]int32{
|
var Event_EventType_value = map[string]int32{
|
||||||
|
@ -56,6 +58,7 @@ var Event_EventType_value = map[string]int32{
|
||||||
"DEMO": 6,
|
"DEMO": 6,
|
||||||
"GET": 7,
|
"GET": 7,
|
||||||
"LOGIN": 8,
|
"LOGIN": 8,
|
||||||
|
"OK": 9,
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x Event_EventType) String() string {
|
func (x Event_EventType) String() string {
|
||||||
|
@ -433,38 +436,39 @@ func init() {
|
||||||
func init() { proto.RegisterFile("events.proto", fileDescriptor_8f22242cb04491f9) }
|
func init() { proto.RegisterFile("events.proto", fileDescriptor_8f22242cb04491f9) }
|
||||||
|
|
||||||
var fileDescriptor_8f22242cb04491f9 = []byte{
|
var fileDescriptor_8f22242cb04491f9 = []byte{
|
||||||
// 528 bytes of a gzipped FileDescriptorProto
|
// 536 bytes of a gzipped FileDescriptorProto
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x53, 0xcd, 0x6e, 0xd3, 0x40,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x53, 0xcd, 0x6e, 0xd3, 0x40,
|
||||||
0x18, 0xc4, 0x7f, 0xb1, 0xfd, 0xa5, 0x54, 0xd6, 0x0a, 0xd0, 0xca, 0xed, 0x21, 0xea, 0x85, 0x9c,
|
0x18, 0xc4, 0xff, 0xf6, 0xd7, 0x52, 0x59, 0x2b, 0x40, 0x2b, 0xb7, 0x87, 0xa8, 0x17, 0x72, 0xaa,
|
||||||
0x22, 0x54, 0x44, 0xef, 0x85, 0xb8, 0x21, 0x52, 0xf3, 0xa3, 0x55, 0x28, 0xc7, 0xca, 0x49, 0x96,
|
0x50, 0x11, 0xbd, 0x17, 0xe2, 0x96, 0x88, 0xe6, 0x47, 0xab, 0x50, 0x8e, 0x95, 0x93, 0x2c, 0xc5,
|
||||||
0x62, 0xc5, 0xeb, 0xb5, 0x76, 0xd7, 0x89, 0x72, 0xe7, 0x09, 0x78, 0x21, 0xee, 0x3c, 0x15, 0xda,
|
0x8a, 0xd7, 0x6b, 0xed, 0xae, 0x13, 0xe5, 0xc0, 0x8d, 0x27, 0xe0, 0xa5, 0x90, 0x78, 0x2a, 0xb4,
|
||||||
0xb5, 0x9d, 0x46, 0x22, 0xdc, 0xb8, 0x44, 0xdf, 0x7c, 0x33, 0x93, 0xd9, 0x1d, 0xdb, 0x70, 0x46,
|
0x6b, 0x3b, 0x8d, 0x44, 0xb8, 0x71, 0x89, 0xbe, 0xf9, 0x66, 0x26, 0xb3, 0x3b, 0xb6, 0xe1, 0x98,
|
||||||
0xb7, 0xb4, 0x50, 0x72, 0x50, 0x0a, 0xae, 0x38, 0xea, 0xee, 0x32, 0x35, 0xd7, 0xd3, 0xb2, 0xfa,
|
0xae, 0x69, 0xa9, 0xe4, 0x45, 0x25, 0xb8, 0xe2, 0xe8, 0x68, 0x93, 0xab, 0xa9, 0x9e, 0xe6, 0xf5,
|
||||||
0x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, 0xb8, 0x68, 0xba, 0xad, 0x81, 0xae, 0x50, 0x16, 0x59, 0x59, 0x52, 0x25, 0xb1, 0xd7,
|
0x55, 0x28, 0x04, 0x17, 0x6d, 0xb7, 0x0d, 0xd0, 0x15, 0xca, 0x32, 0xaf, 0x2a, 0xaa, 0x24, 0xf6,
|
||||||
0x73, 0x74, 0x85, 0x2d, 0x8e, 0x7f, 0x58, 0xe0, 0x37, 0x77, 0x6a, 0x12, 0xac, 0xbf, 0x12, 0xec,
|
0x7a, 0x8e, 0xae, 0xb0, 0xc3, 0xc9, 0x0f, 0x0b, 0x82, 0xf6, 0x4e, 0x6d, 0x82, 0xf5, 0x57, 0x82,
|
||||||
0xa3, 0x84, 0x0b, 0x08, 0x15, 0x57, 0x69, 0xfe, 0xb8, 0x2a, 0x2b, 0x13, 0xed, 0x90, 0xc0, 0x2c,
|
0xbd, 0x97, 0x70, 0x0a, 0x91, 0xe2, 0x2a, 0x2b, 0x1e, 0x16, 0x55, 0x6d, 0xa2, 0x1d, 0x12, 0x9a,
|
||||||
0x3e, 0x95, 0xd5, 0x33, 0xc9, 0x28, 0x33, 0x47, 0x68, 0xc9, 0x09, 0x65, 0x9a, 0xcc, 0xf9, 0x53,
|
0xc5, 0x87, 0xaa, 0x7e, 0x22, 0x19, 0x65, 0xe6, 0x08, 0x1d, 0x39, 0xa2, 0x4c, 0x93, 0x05, 0x7f,
|
||||||
0x56, 0x3c, 0x56, 0xa2, 0x7d, 0xc4, 0x81, 0x59, 0x7c, 0x11, 0x79, 0xfc, 0xdb, 0x02, 0xfb, 0x61,
|
0xcc, 0xcb, 0x87, 0x5a, 0x74, 0x8f, 0x38, 0x34, 0x8b, 0xcf, 0xa2, 0x48, 0x7e, 0x5b, 0x60, 0xdf,
|
||||||
0x72, 0x74, 0x02, 0xe7, 0x9f, 0x27, 0x88, 0x21, 0xf8, 0xce, 0xa5, 0x3a, 0xba, 0xfb, 0x01, 0x6b,
|
0x8f, 0xf6, 0x4e, 0xe0, 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0x9f, 0xcf, 0xbe, 0x26, 0x64, 0x36, 0x8d, 0x6c, 0x74, 0x06, 0x41, 0x0d,
|
0xd2, 0xd8, 0x42, 0x47, 0x10, 0x4c, 0x27, 0x5f, 0x52, 0x32, 0x19, 0xc7, 0x36, 0x3a, 0x86, 0xb0,
|
||||||
0xee, 0xee, 0x22, 0x07, 0xbd, 0x84, 0xf0, 0xf3, 0xf8, 0x63, 0x42, 0xa6, 0xb7, 0x8b, 0x24, 0x72,
|
0x01, 0x37, 0x37, 0xb1, 0x83, 0x9e, 0x43, 0xf4, 0x71, 0xf8, 0x3e, 0x25, 0xe3, 0xeb, 0x59, 0x1a,
|
||||||
0xb5, 0x72, 0x32, 0x1e, 0x11, 0x0d, 0x3c, 0x14, 0x80, 0x3b, 0x4c, 0x26, 0xb3, 0xa8, 0xa3, 0xff,
|
0xbb, 0x5a, 0x39, 0x1a, 0xde, 0x12, 0x0d, 0x3c, 0x14, 0x82, 0x3b, 0x48, 0x47, 0x93, 0xd8, 0xd7,
|
||||||
0x75, 0x94, 0x2c, 0x22, 0x1f, 0x85, 0xe0, 0xdd, 0xcf, 0x46, 0xe3, 0x69, 0x14, 0x2c, 0x3b, 0xe6,
|
0xff, 0x7a, 0x9b, 0xce, 0xe2, 0x00, 0x45, 0xe0, 0xdd, 0x4d, 0x6e, 0x87, 0xe3, 0x38, 0x44, 0x3e,
|
||||||
0xab, 0x7e, 0xff, 0x27, 0x00, 0x00, 0xff, 0xff, 0xb7, 0x1a, 0x0e, 0x0e, 0xe5, 0x03, 0x00, 0x00,
|
0xd8, 0x93, 0x4f, 0x71, 0x34, 0xf7, 0xcd, 0xd7, 0xfd, 0xf6, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff,
|
||||||
|
0x4a, 0xac, 0x74, 0xbe, 0xed, 0x03, 0x00, 0x00,
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,8 +22,9 @@ message Event {
|
||||||
HIBERNATE = 4;
|
HIBERNATE = 4;
|
||||||
MIGRATE = 5;
|
MIGRATE = 5;
|
||||||
DEMO = 6;
|
DEMO = 6;
|
||||||
GET = 7;
|
GET = 7; // request something
|
||||||
LOGIN = 8;
|
LOGIN = 8; // attempt to login
|
||||||
|
OK = 9; // everything is ok
|
||||||
}
|
}
|
||||||
|
|
||||||
message Response {
|
message Response {
|
||||||
|
|
|
@ -76,3 +76,25 @@ func MakeLoginEvent() *Event {
|
||||||
e.Comment ="this should return a protobuf with the token"
|
e.Comment ="this should return a protobuf with the token"
|
||||||
return e
|
return e
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func MakeOkResponse() *Event {
|
||||||
|
log.Println("CreateSampleEvent() is generating a example protobuf Event")
|
||||||
|
|
||||||
|
e := &Event{
|
||||||
|
Id: 1234,
|
||||||
|
Email: "test+protobuf@wit.com",
|
||||||
|
Comment: "this is a sample event",
|
||||||
|
Type: Event_OK,
|
||||||
|
Results: []*Event_Response{
|
||||||
|
{Name: "fooadd", Type: Event_OK},
|
||||||
|
{Name: "foodelete", Type: Event_DELETE},
|
||||||
|
{
|
||||||
|
Name: "foopoweron",
|
||||||
|
Type: Event_POWERON,
|
||||||
|
Error: "No error happened",
|
||||||
|
Id: 54321,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
return e
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue