add protobuf definitions and build configuration
This commit is contained in:
commit
857f12b860
9 files changed
+633
No files matched your search
@@ -0,0 +1,186 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.12
|
||||
// protoc v7.36.2
|
||||
// source: operation.proto
|
||||
|
||||
package c2o
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type RequestType int32
|
||||
|
||||
const (
|
||||
RequestType_PING RequestType = 0
|
||||
RequestType_DEPLOYMENT RequestType = 1
|
||||
)
|
||||
|
||||
// Enum value maps for RequestType.
|
||||
var (
|
||||
RequestType_name = map[int32]string{
|
||||
0: "PING",
|
||||
1: "DEPLOYMENT",
|
||||
}
|
||||
RequestType_value = map[string]int32{
|
||||
"PING": 0,
|
||||
"DEPLOYMENT": 1,
|
||||
}
|
||||
)
|
||||
|
||||
func (x RequestType) Enum() *RequestType {
|
||||
p := new(RequestType)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x RequestType) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (RequestType) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_operation_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (RequestType) Type() protoreflect.EnumType {
|
||||
return &file_operation_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x RequestType) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use RequestType.Descriptor instead.
|
||||
func (RequestType) EnumDescriptor() ([]byte, []int) {
|
||||
return file_operation_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
type Message struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
|
||||
Type RequestType `protobuf:"varint,2,opt,name=type,proto3,enum=proto.RequestType" json:"type,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Message) Reset() {
|
||||
*x = Message{}
|
||||
mi := &file_operation_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Message) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Message) ProtoMessage() {}
|
||||
|
||||
func (x *Message) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_operation_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Message.ProtoReflect.Descriptor instead.
|
||||
func (*Message) Descriptor() ([]byte, []int) {
|
||||
return file_operation_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Message) GetRequestId() string {
|
||||
if x != nil {
|
||||
return x.RequestId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Message) GetType() RequestType {
|
||||
if x != nil {
|
||||
return x.Type
|
||||
}
|
||||
return RequestType_PING
|
||||
}
|
||||
|
||||
var File_operation_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_operation_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x0foperation.proto\x12\x05proto\"P\n" +
|
||||
"\aMessage\x12\x1d\n" +
|
||||
"\n" +
|
||||
"request_id\x18\x01 \x01(\tR\trequestId\x12&\n" +
|
||||
"\x04type\x18\x02 \x01(\x0e2\x12.proto.RequestTypeR\x04type*'\n" +
|
||||
"\vRequestType\x12\b\n" +
|
||||
"\x04PING\x10\x00\x12\x0e\n" +
|
||||
"\n" +
|
||||
"DEPLOYMENT\x10\x01B\x1aZ\x18beejay.kim/fog/model/c2ob\x06proto3"
|
||||
|
||||
var (
|
||||
file_operation_proto_rawDescOnce sync.Once
|
||||
file_operation_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_operation_proto_rawDescGZIP() []byte {
|
||||
file_operation_proto_rawDescOnce.Do(func() {
|
||||
file_operation_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_operation_proto_rawDesc), len(file_operation_proto_rawDesc)))
|
||||
})
|
||||
return file_operation_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_operation_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_operation_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_operation_proto_goTypes = []any{
|
||||
(RequestType)(0), // 0: proto.RequestType
|
||||
(*Message)(nil), // 1: proto.Message
|
||||
}
|
||||
var file_operation_proto_depIdxs = []int32{
|
||||
0, // 0: proto.Message.type:type_name -> proto.RequestType
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_operation_proto_init() }
|
||||
func file_operation_proto_init() {
|
||||
if File_operation_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_operation_proto_rawDesc), len(file_operation_proto_rawDesc)),
|
||||
NumEnums: 1,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_operation_proto_goTypes,
|
||||
DependencyIndexes: file_operation_proto_depIdxs,
|
||||
EnumInfos: file_operation_proto_enumTypes,
|
||||
MessageInfos: file_operation_proto_msgTypes,
|
||||
}.Build()
|
||||
File_operation_proto = out.File
|
||||
file_operation_proto_goTypes = nil
|
||||
file_operation_proto_depIdxs = nil
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
syntax = "proto3";
|
||||
package proto;
|
||||
|
||||
option go_package = "beejay.kim/fog/model/c2o";
|
||||
|
||||
enum RequestType {
|
||||
PING = 0;
|
||||
DEPLOYMENT = 1;
|
||||
}
|
||||
|
||||
message Message {
|
||||
string request_id = 1;
|
||||
RequestType type = 2;
|
||||
}
|
||||
Reference in new issue
Block a user