DEVELOPMENT ENVIRONMENT

~liljamo/emerwen-proto

63eb26154b4659b77a2e2da9743d57e717a0b7b0 — Jonni Liljamo a day ago db7d4a8
feat!: swap out uint32 for int32, not a big deal
M go/proto/shared/target.pb.go => go/proto/shared/target.pb.go +6 -6
@@ 76,7 76,7 @@ type Target struct {

	Id       string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Addr     string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
	Interval uint32 `protobuf:"varint,3,opt,name=interval,proto3" json:"interval,omitempty"`
	Interval int32  `protobuf:"varint,3,opt,name=interval,proto3" json:"interval,omitempty"`
	// Types that are assignable to Method:
	//
	//	*Target_Ping


@@ 129,7 129,7 @@ func (x *Target) GetAddr() string {
	return ""
}

func (x *Target) GetInterval() uint32 {
func (x *Target) GetInterval() int32 {
	if x != nil {
		return x.Interval
	}


@@ 221,7 221,7 @@ type MethodGET struct {
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	OkCodes []uint32 `protobuf:"varint,1,rep,packed,name=ok_codes,json=okCodes,proto3" json:"ok_codes,omitempty"`
	OkCodes []int32 `protobuf:"varint,1,rep,packed,name=ok_codes,json=okCodes,proto3" json:"ok_codes,omitempty"`
}

func (x *MethodGET) Reset() {


@@ 254,7 254,7 @@ func (*MethodGET) Descriptor() ([]byte, []int) {
	return file_shared_target_proto_rawDescGZIP(), []int{2}
}

func (x *MethodGET) GetOkCodes() []uint32 {
func (x *MethodGET) GetOkCodes() []int32 {
	if x != nil {
		return x.OkCodes
	}


@@ 270,7 270,7 @@ var file_shared_target_proto_rawDesc = []byte{
	0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64,
	0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
	0x61, 0x64, 0x64, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c,
	0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c,
	0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c,
	0x12, 0x30, 0x0a, 0x04, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
	0x2e, 0x65, 0x6d, 0x65, 0x72, 0x77, 0x65, 0x6e, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2e,
	0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x50, 0x69, 0x6e, 0x67, 0x48, 0x00, 0x52, 0x04, 0x70, 0x69,


@@ 281,7 281,7 @@ var file_shared_target_proto_rawDesc = []byte{
	0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x22,
	0x0c, 0x0a, 0x0a, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x50, 0x69, 0x6e, 0x67, 0x22, 0x26, 0x0a,
	0x09, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x47, 0x45, 0x54, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x6b,
	0x5f, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x07, 0x6f, 0x6b,
	0x5f, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x6f, 0x6b,
	0x43, 0x6f, 0x64, 0x65, 0x73, 0x2a, 0x2c, 0x0a, 0x0b, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53,
	0x74, 0x61, 0x74, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x06,
	0x0a, 0x02, 0x55, 0x50, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57,

M go/proto/webtomaster.pb.go => go/proto/webtomaster.pb.go +6 -6
@@ 173,7 173,7 @@ type NewTargetRequest struct {
	WorkerId string `protobuf:"bytes,1,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"`
	Name     string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Addr     string `protobuf:"bytes,3,opt,name=addr,proto3" json:"addr,omitempty"`
	Interval uint32 `protobuf:"varint,4,opt,name=interval,proto3" json:"interval,omitempty"`
	Interval int32  `protobuf:"varint,4,opt,name=interval,proto3" json:"interval,omitempty"`
	// Types that are assignable to Method:
	//
	//	*NewTargetRequest_Ping


@@ 232,7 232,7 @@ func (x *NewTargetRequest) GetAddr() string {
	return ""
}

func (x *NewTargetRequest) GetInterval() uint32 {
func (x *NewTargetRequest) GetInterval() int32 {
	if x != nil {
		return x.Interval
	}


@@ 443,7 443,7 @@ type PatchTargetRequest struct {
	TargetId string  `protobuf:"bytes,1,opt,name=target_id,json=targetId,proto3" json:"target_id,omitempty"`
	Name     *string `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty"`
	Addr     *string `protobuf:"bytes,3,opt,name=addr,proto3,oneof" json:"addr,omitempty"`
	Interval *uint32 `protobuf:"varint,4,opt,name=interval,proto3,oneof" json:"interval,omitempty"`
	Interval *int32  `protobuf:"varint,4,opt,name=interval,proto3,oneof" json:"interval,omitempty"`
	// Types that are assignable to Method:
	//
	//	*PatchTargetRequest_Ping


@@ 502,7 502,7 @@ func (x *PatchTargetRequest) GetAddr() string {
	return ""
}

func (x *PatchTargetRequest) GetInterval() uint32 {
func (x *PatchTargetRequest) GetInterval() int32 {
	if x != nil && x.Interval != nil {
		return *x.Interval
	}


@@ 823,7 823,7 @@ var file_webtomaster_proto_rawDesc = []byte{
	0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
	0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
	0x61, 0x64, 0x64, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c,
	0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c,
	0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c,
	0x12, 0x30, 0x0a, 0x04, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
	0x2e, 0x65, 0x6d, 0x65, 0x72, 0x77, 0x65, 0x6e, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2e,
	0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x50, 0x69, 0x6e, 0x67, 0x48, 0x00, 0x52, 0x04, 0x70, 0x69,


@@ 853,7 853,7 @@ var file_webtomaster_proto_rawDesc = []byte{
	0x48, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x61,
	0x64, 0x64, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x04, 0x61, 0x64, 0x64,
	0x72, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c,
	0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76,
	0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x48, 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76,
	0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x04, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20,
	0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6d, 0x65, 0x72, 0x77, 0x65, 0x6e, 0x2e, 0x73, 0x68,
	0x61, 0x72, 0x65, 0x64, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x50, 0x69, 0x6e, 0x67, 0x48,

M proto/shared/target.proto => proto/shared/target.proto +2 -2
@@ 6,7 6,7 @@ option go_package = "git.src.quest/~liljamo/emerwen-proto/go/proto/shared";
message Target {
    string id = 1;
    string addr = 2;
    uint32 interval = 3;
    int32 interval = 3;
    oneof method {
        MethodPing ping = 4;
        MethodGET get = 5;


@@ 17,7 17,7 @@ message Target {
message MethodPing {}

message MethodGET {
    repeated uint32 ok_codes = 1;
    repeated int32 ok_codes = 1;
}

enum TargetState {

M proto/webtomaster.proto => proto/webtomaster.proto +2 -2
@@ 34,7 34,7 @@ message NewTargetRequest {
    string worker_id = 1;
    string name = 2;
    string addr = 3;
    uint32 interval = 4;
    int32 interval = 4;
    oneof method {
        shared.MethodPing ping = 5;
        shared.MethodGET get = 6;


@@ 60,7 60,7 @@ message PatchTargetRequest {
    string target_id = 1;
    optional string name = 2;
    optional string addr = 3;
    optional uint32 interval = 4;
    optional int32 interval = 4;
    oneof method {
        shared.MethodPing ping = 5;
        shared.MethodGET get = 6;