DEVELOPMENT ENVIRONMENT

~liljamo/emerwen-proto

9edfaafb0937f0cc7ba4cb3302b859a83bf34f1b — Jonni Liljamo 2 days ago e93a7ed
feat!: swap integer ids for strings
M go/proto/shared/target.pb.go => go/proto/shared/target.pb.go +4 -4
@@ 74,7 74,7 @@ type Target struct {
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	Id       uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	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"`
	// Types that are assignable to Method:


@@ 115,11 115,11 @@ func (*Target) Descriptor() ([]byte, []int) {
	return file_shared_target_proto_rawDescGZIP(), []int{0}
}

func (x *Target) GetId() uint32 {
func (x *Target) GetId() string {
	if x != nil {
		return x.Id
	}
	return 0
	return ""
}

func (x *Target) GetAddr() string {


@@ 267,7 267,7 @@ var file_shared_target_proto_rawDesc = []byte{
	0x0a, 0x13, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2e,
	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x65, 0x6d, 0x65, 0x72, 0x77, 0x65, 0x6e, 0x2e, 0x73,
	0x68, 0x61, 0x72, 0x65, 0x64, 0x22, 0xc7, 0x01, 0x0a, 0x06, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74,
	0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64,
	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,

M go/proto/shared/worker.pb.go => go/proto/shared/worker.pb.go +4 -4
@@ 25,7 25,7 @@ type Worker struct {
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	Id        uint32    `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Id        string    `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	AuthToken string    `protobuf:"bytes,2,opt,name=auth_token,json=authToken,proto3" json:"auth_token,omitempty"`
	Targets   []*Target `protobuf:"bytes,3,rep,name=targets,proto3" json:"targets,omitempty"`
	Name      string    `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`


@@ 61,11 61,11 @@ func (*Worker) Descriptor() ([]byte, []int) {
	return file_shared_worker_proto_rawDescGZIP(), []int{0}
}

func (x *Worker) GetId() uint32 {
func (x *Worker) GetId() string {
	if x != nil {
		return x.Id
	}
	return 0
	return ""
}

func (x *Worker) GetAuthToken() string {


@@ 96,7 96,7 @@ var file_shared_worker_proto_rawDesc = []byte{
	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x65, 0x6d, 0x65, 0x72, 0x77, 0x65, 0x6e, 0x2e, 0x73,
	0x68, 0x61, 0x72, 0x65, 0x64, 0x1a, 0x13, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2f, 0x74, 0x61,
	0x72, 0x67, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7d, 0x0a, 0x06, 0x57, 0x6f,
	0x72, 0x6b, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d,
	0x72, 0x6b, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
	0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x74, 0x6f, 0x6b,
	0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x54, 0x6f,
	0x6b, 0x65, 0x6e, 0x12, 0x30, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x03,

M go/proto/webtomaster.pb.go => go/proto/webtomaster.pb.go +4 -4
@@ 162,7 162,7 @@ type NewTargetRequest struct {
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	WorkerId uint32 `protobuf:"varint,1,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"`
	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"`


@@ 203,11 203,11 @@ func (*NewTargetRequest) Descriptor() ([]byte, []int) {
	return file_webtomaster_proto_rawDescGZIP(), []int{3}
}

func (x *NewTargetRequest) GetWorkerId() uint32 {
func (x *NewTargetRequest) GetWorkerId() string {
	if x != nil {
		return x.WorkerId
	}
	return 0
	return ""
}

func (x *NewTargetRequest) GetName() string {


@@ 573,7 573,7 @@ var file_webtomaster_proto_rawDesc = []byte{
	0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0xde, 0x01, 0x0a, 0x10,
	0x4e, 0x65, 0x77, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
	0x12, 0x1b, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20,
	0x01, 0x28, 0x0d, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a,
	0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a,
	0x04, 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,

M proto/shared/target.proto => proto/shared/target.proto +1 -1
@@ 4,7 4,7 @@ package emerwen.shared;
option go_package = "git.src.quest/~liljamo/emerwen-proto/go/proto/shared";

message Target {
    uint32 id = 1;
    string id = 1;
    string addr = 2;
    uint32 interval = 3;
    oneof method {

M proto/shared/worker.proto => proto/shared/worker.proto +1 -1
@@ 6,7 6,7 @@ option go_package = "git.src.quest/~liljamo/emerwen-proto/go/proto/shared";
import "shared/target.proto";

message Worker {
    uint32 id = 1;
    string id = 1;
    string auth_token = 2;
    repeated shared.Target targets = 3;
    string name = 4;

M proto/webtomaster.proto => proto/webtomaster.proto +1 -1
@@ 28,7 28,7 @@ message NewWorkerResponse {
}

message NewTargetRequest {
    uint32 worker_id = 1;
    string worker_id = 1;
    string name = 2;
    string addr = 3;
    uint32 interval = 4;

M proto/workertomaster.proto => proto/workertomaster.proto +1 -1
@@ 14,6 14,6 @@ message TargetsResponse {
}

message SetTargetStateRequest {
    uint32 id = 1;
    string id = 1;
    shared.TargetState state = 2;
}