DEVELOPMENT ENVIRONMENT

~liljamo/emerwen-proto

06cafd5cb729e9dceb80e337dcd404ca9ccd6874 — Jonni Liljamo 3 days ago 94e8fb6
fix: go package naming
8 files changed, 30 insertions(+), 28 deletions(-)

R go/{shared/target.pb.go => proto/shared/target.pb.go}
R go/{shared/worker.pb.go => proto/shared/worker.pb.go}
R go/{webtomaster.pb.go => proto/webtomaster.pb.go}
R go/{webtomaster_grpc.pb.go => proto/webtomaster_grpc.pb.go}
M justfile
M proto/shared/target.proto
M proto/shared/worker.proto
M proto/webtomaster.proto
R go/shared/target.pb.go => go/proto/shared/target.pb.go +5 -5
@@ 4,7 4,7 @@
// 	protoc        v5.28.3
// source: shared/target.proto

package target
package shared

import (
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"


@@ 276,11 276,11 @@ var file_shared_target_proto_rawDesc = []byte{
	0x43, 0x6f, 0x64, 0x65, 0x73, 0x42, 0x08, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 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, 0x4e, 0x10, 0x02, 0x42, 0x30, 0x5a,
	0x2e, 0x67, 0x69, 0x74, 0x2e, 0x73, 0x72, 0x63, 0x2e, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2f, 0x7e,
	0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x02, 0x42, 0x36, 0x5a,
	0x34, 0x67, 0x69, 0x74, 0x2e, 0x73, 0x72, 0x63, 0x2e, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2f, 0x7e,
	0x6c, 0x69, 0x6c, 0x6a, 0x61, 0x6d, 0x6f, 0x2f, 0x65, 0x6d, 0x65, 0x72, 0x77, 0x65, 0x6e, 0x2d,
	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x62,
	0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73,
	0x68, 0x61, 0x72, 0x65, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}

var (

R go/shared/worker.pb.go => go/proto/shared/worker.pb.go +11 -10
@@ 4,10 4,9 @@
// 	protoc        v5.28.3
// source: shared/worker.proto

package worker
package shared

import (
	target "git.src.quest/~liljamo/emerwen-proto/go/target"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	reflect "reflect"


@@ 26,9 25,9 @@ type Worker struct {
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	Id        uint32           `protobuf:"varint,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.Target `protobuf:"bytes,3,rep,name=targets,proto3" json:"targets,omitempty"`
	Id        uint32    `protobuf:"varint,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"`
}

func (x *Worker) Reset() {


@@ 75,7 74,7 @@ func (x *Worker) GetAuthToken() string {
	return ""
}

func (x *Worker) GetTargets() []*target.Target {
func (x *Worker) GetTargets() []*Target {
	if x != nil {
		return x.Targets
	}


@@ 95,10 94,11 @@ var file_shared_worker_proto_rawDesc = []byte{
	0x6b, 0x65, 0x6e, 0x12, 0x30, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x03,
	0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6d, 0x65, 0x72, 0x77, 0x65, 0x6e, 0x2e, 0x73,
	0x68, 0x61, 0x72, 0x65, 0x64, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x07, 0x74, 0x61,
	0x72, 0x67, 0x65, 0x74, 0x73, 0x42, 0x30, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x2e, 0x73, 0x72, 0x63,
	0x72, 0x67, 0x65, 0x74, 0x73, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x2e, 0x73, 0x72, 0x63,
	0x2e, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2f, 0x7e, 0x6c, 0x69, 0x6c, 0x6a, 0x61, 0x6d, 0x6f, 0x2f,
	0x65, 0x6d, 0x65, 0x72, 0x77, 0x65, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f,
	0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
	0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x62, 0x06, 0x70,
	0x72, 0x6f, 0x74, 0x6f, 0x33,
}

var (


@@ 115,8 115,8 @@ func file_shared_worker_proto_rawDescGZIP() []byte {

var file_shared_worker_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_shared_worker_proto_goTypes = []any{
	(*Worker)(nil),        // 0: emerwen.shared.Worker
	(*target.Target)(nil), // 1: emerwen.shared.Target
	(*Worker)(nil), // 0: emerwen.shared.Worker
	(*Target)(nil), // 1: emerwen.shared.Target
}
var file_shared_worker_proto_depIdxs = []int32{
	1, // 0: emerwen.shared.Worker.targets:type_name -> emerwen.shared.Target


@@ 132,6 132,7 @@ func file_shared_worker_proto_init() {
	if File_shared_worker_proto != nil {
		return
	}
	file_shared_target_proto_init()
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{

R go/webtomaster.pb.go => go/proto/webtomaster.pb.go +8 -7
@@ 4,10 4,10 @@
// 	protoc        v5.28.3
// source: webtomaster.proto

package _go
package proto

import (
	worker "git.src.quest/~liljamo/emerwen-proto/go/worker"
	shared "git.src.quest/~liljamo/emerwen-proto/go/proto/shared"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	emptypb "google.golang.org/protobuf/types/known/emptypb"


@@ 27,7 27,7 @@ type WorkersResponse struct {
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	Workers []*worker.Worker `protobuf:"bytes,1,rep,name=workers,proto3" json:"workers,omitempty"`
	Workers []*shared.Worker `protobuf:"bytes,1,rep,name=workers,proto3" json:"workers,omitempty"`
}

func (x *WorkersResponse) Reset() {


@@ 60,7 60,7 @@ func (*WorkersResponse) Descriptor() ([]byte, []int) {
	return file_webtomaster_proto_rawDescGZIP(), []int{0}
}

func (x *WorkersResponse) GetWorkers() []*worker.Worker {
func (x *WorkersResponse) GetWorkers() []*shared.Worker {
	if x != nil {
		return x.Workers
	}


@@ 85,10 85,11 @@ var file_webtomaster_proto_rawDesc = []byte{
	0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45,
	0x6d, 0x70, 0x74, 0x79, 0x1a, 0x24, 0x2e, 0x65, 0x6d, 0x65, 0x72, 0x77, 0x65, 0x6e, 0x2e, 0x77,
	0x65, 0x62, 0x74, 0x6f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x65,
	0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x29, 0x5a, 0x27, 0x67, 0x69,
	0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x69,
	0x74, 0x2e, 0x73, 0x72, 0x63, 0x2e, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2f, 0x7e, 0x6c, 0x69, 0x6c,
	0x6a, 0x61, 0x6d, 0x6f, 0x2f, 0x65, 0x6d, 0x65, 0x72, 0x77, 0x65, 0x6e, 0x2d, 0x70, 0x72, 0x6f,
	0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
	0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f,
	0x74, 0x6f, 0x33,
}

var (


@@ 106,7 107,7 @@ func file_webtomaster_proto_rawDescGZIP() []byte {
var file_webtomaster_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_webtomaster_proto_goTypes = []any{
	(*WorkersResponse)(nil), // 0: emerwen.webtomaster.WorkersResponse
	(*worker.Worker)(nil),   // 1: emerwen.shared.Worker
	(*shared.Worker)(nil),   // 1: emerwen.shared.Worker
	(*emptypb.Empty)(nil),   // 2: google.protobuf.Empty
}
var file_webtomaster_proto_depIdxs = []int32{

R go/webtomaster_grpc.pb.go => go/proto/webtomaster_grpc.pb.go +1 -1
@@ 4,7 4,7 @@
// - protoc             v5.28.3
// source: webtomaster.proto

package _go
package proto

import (
	context "context"

M justfile => justfile +2 -2
@@ 2,7 2,7 @@ _default:
    just --list

compile-protos-go:
    protoc --go_out=go --go_opt=paths=source_relative \
        --go-grpc_out=go --go-grpc_opt=paths=source_relative \
    protoc --go_out=go/proto --go_opt=paths=source_relative \
        --go-grpc_out=go/proto --go-grpc_opt=paths=source_relative \
        --proto_path=proto \
        proto/webtomaster.proto proto/shared/target.proto proto/shared/worker.proto

M proto/shared/target.proto => proto/shared/target.proto +1 -1
@@ 1,7 1,7 @@
syntax = "proto3";
package emerwen.shared;

option go_package = "git.src.quest/~liljamo/emerwen-proto/go/target";
option go_package = "git.src.quest/~liljamo/emerwen-proto/go/proto/shared";

message Target {
    uint32 id = 1;

M proto/shared/worker.proto => proto/shared/worker.proto +1 -1
@@ 1,7 1,7 @@
syntax = "proto3";
package emerwen.shared;

option go_package = "git.src.quest/~liljamo/emerwen-proto/go/worker";
option go_package = "git.src.quest/~liljamo/emerwen-proto/go/proto/shared";

import "shared/target.proto";


M proto/webtomaster.proto => proto/webtomaster.proto +1 -1
@@ 1,7 1,7 @@
syntax = "proto3";
package emerwen.webtomaster;

option go_package = "git.src.quest/~liljamo/emerwen-proto/go";
option go_package = "git.src.quest/~liljamo/emerwen-proto/go/proto";

import "google/protobuf/empty.proto";
import "shared/worker.proto";