summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Paul <n@nc0.fr>2023-04-25 12:08:12 +0200
committerNicolas Paul <n@nc0.fr>2023-04-25 12:08:12 +0200
commitafef100dbf70c34d94056f6aff7714355d9e423c (patch)
treeb35c283e56bd6e019851769d622f82fcdaeee471
parent8c2948e788cb7ec8499cff3b926e091a1d36c964 (diff)
Change domain
-rw-r--r--api/nc0/clawflake/generator/v3/generator.pb.go242
-rw-r--r--api/nc0/clawflake/generator/v3/generator.proto (renamed from api/nicolaspl/clawflake/generator/v3/generator.proto)8
-rw-r--r--api/nc0/clawflake/generator/v3/generator_grpc.pb.go (renamed from api/nicolaspl/clawflake/generator/v3/generator_grpc.pb.go)10
-rw-r--r--api/nicolaspl/clawflake/generator/v3/generator.pb.go245
-rw-r--r--cmd/generator/generator.go2
-rw-r--r--cmd/generator/main.go2
-rw-r--r--cmd/testclient/main.go2
7 files changed, 254 insertions, 257 deletions
diff --git a/api/nc0/clawflake/generator/v3/generator.pb.go b/api/nc0/clawflake/generator/v3/generator.pb.go
new file mode 100644
index 0000000..37e1d04
--- /dev/null
+++ b/api/nc0/clawflake/generator/v3/generator.pb.go
@@ -0,0 +1,242 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc v3.21.12
+// source: api/nc0/clawflake/generator/v3/generator.proto
+
+package v3
+
+import (
+ _ "google.golang.org/genproto/googleapis/api/annotations"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+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)
+)
+
+// The request of a Generate RPC.
+type GenerateRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The amount of ID numbers to generate.
+ // The value should be in the interval [1, 4096].
+ // Values not in the interval will not be coerced and the request will be
+ // aborted.
+ Amount uint32 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"`
+}
+
+func (x *GenerateRequest) Reset() {
+ *x = GenerateRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_nc0_clawflake_generator_v3_generator_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GenerateRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GenerateRequest) ProtoMessage() {}
+
+func (x *GenerateRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_api_nc0_clawflake_generator_v3_generator_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GenerateRequest.ProtoReflect.Descriptor instead.
+func (*GenerateRequest) Descriptor() ([]byte, []int) {
+ return file_api_nc0_clawflake_generator_v3_generator_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *GenerateRequest) GetAmount() uint32 {
+ if x != nil {
+ return x.Amount
+ }
+ return 0
+}
+
+// The response of a Generate RPC.
+type GenerateResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The generate ID numbers.
+ IdNumbers []string `protobuf:"bytes,1,rep,name=id_numbers,json=idNumbers,proto3" json:"id_numbers,omitempty"`
+}
+
+func (x *GenerateResponse) Reset() {
+ *x = GenerateResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_nc0_clawflake_generator_v3_generator_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GenerateResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GenerateResponse) ProtoMessage() {}
+
+func (x *GenerateResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_api_nc0_clawflake_generator_v3_generator_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GenerateResponse.ProtoReflect.Descriptor instead.
+func (*GenerateResponse) Descriptor() ([]byte, []int) {
+ return file_api_nc0_clawflake_generator_v3_generator_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *GenerateResponse) GetIdNumbers() []string {
+ if x != nil {
+ return x.IdNumbers
+ }
+ return nil
+}
+
+var File_api_nc0_clawflake_generator_v3_generator_proto protoreflect.FileDescriptor
+
+var file_api_nc0_clawflake_generator_v3_generator_proto_rawDesc = []byte{
+ 0x0a, 0x2e, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x63, 0x30, 0x2f, 0x63, 0x6c, 0x61, 0x77, 0x66, 0x6c,
+ 0x61, 0x6b, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x33,
+ 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x12, 0x1a, 0x6e, 0x63, 0x30, 0x2e, 0x63, 0x6c, 0x61, 0x77, 0x66, 0x6c, 0x61, 0x6b, 0x65, 0x2e,
+ 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1c, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f,
+ 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2e, 0x0a, 0x0f, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e,
+ 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x61, 0x6d,
+ 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x36, 0x0a, 0x10, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x69, 0x64, 0x5f, 0x6e,
+ 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41,
+ 0x06, 0x52, 0x09, 0x69, 0x64, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x32, 0xa0, 0x01, 0x0a,
+ 0x10, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
+ 0x65, 0x12, 0x8b, 0x01, 0x0a, 0x08, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x12, 0x2b,
+ 0x2e, 0x6e, 0x63, 0x30, 0x2e, 0x63, 0x6c, 0x61, 0x77, 0x66, 0x6c, 0x61, 0x6b, 0x65, 0x2e, 0x67,
+ 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x65, 0x6e, 0x65,
+ 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6e, 0x63,
+ 0x30, 0x2e, 0x63, 0x6c, 0x61, 0x77, 0x66, 0x6c, 0x61, 0x6b, 0x65, 0x2e, 0x67, 0x65, 0x6e, 0x65,
+ 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
+ 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02,
+ 0x15, 0x22, 0x10, 0x2f, 0x76, 0x33, 0x2f, 0x69, 0x64, 0x73, 0x3a, 0x67, 0x65, 0x6e, 0x65, 0x72,
+ 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x42,
+ 0x82, 0x01, 0x0a, 0x1d, 0x66, 0x72, 0x2e, 0x6e, 0x63, 0x30, 0x2e, 0x63, 0x6c, 0x61, 0x77, 0x66,
+ 0x6c, 0x61, 0x6b, 0x65, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76,
+ 0x33, 0x42, 0x0e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74,
+ 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x67, 0x6f, 0x2e, 0x6e, 0x63, 0x30, 0x2e, 0x66, 0x72, 0x2f, 0x63,
+ 0x6c, 0x61, 0x77, 0x66, 0x6c, 0x61, 0x6b, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x63, 0x30,
+ 0x2f, 0x63, 0x6c, 0x61, 0x77, 0x66, 0x6c, 0x61, 0x6b, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72,
+ 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x33, 0xaa, 0x02, 0x1a, 0x4e, 0x63, 0x30, 0x2e, 0x43, 0x6c,
+ 0x61, 0x77, 0x66, 0x6c, 0x61, 0x6b, 0x65, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f,
+ 0x72, 0x2e, 0x56, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_api_nc0_clawflake_generator_v3_generator_proto_rawDescOnce sync.Once
+ file_api_nc0_clawflake_generator_v3_generator_proto_rawDescData = file_api_nc0_clawflake_generator_v3_generator_proto_rawDesc
+)
+
+func file_api_nc0_clawflake_generator_v3_generator_proto_rawDescGZIP() []byte {
+ file_api_nc0_clawflake_generator_v3_generator_proto_rawDescOnce.Do(func() {
+ file_api_nc0_clawflake_generator_v3_generator_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_nc0_clawflake_generator_v3_generator_proto_rawDescData)
+ })
+ return file_api_nc0_clawflake_generator_v3_generator_proto_rawDescData
+}
+
+var file_api_nc0_clawflake_generator_v3_generator_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_api_nc0_clawflake_generator_v3_generator_proto_goTypes = []interface{}{
+ (*GenerateRequest)(nil), // 0: nc0.clawflake.generator.v3.GenerateRequest
+ (*GenerateResponse)(nil), // 1: nc0.clawflake.generator.v3.GenerateResponse
+}
+var file_api_nc0_clawflake_generator_v3_generator_proto_depIdxs = []int32{
+ 0, // 0: nc0.clawflake.generator.v3.GeneratorService.Generate:input_type -> nc0.clawflake.generator.v3.GenerateRequest
+ 1, // 1: nc0.clawflake.generator.v3.GeneratorService.Generate:output_type -> nc0.clawflake.generator.v3.GenerateResponse
+ 1, // [1:2] is the sub-list for method output_type
+ 0, // [0:1] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_api_nc0_clawflake_generator_v3_generator_proto_init() }
+func file_api_nc0_clawflake_generator_v3_generator_proto_init() {
+ if File_api_nc0_clawflake_generator_v3_generator_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_api_nc0_clawflake_generator_v3_generator_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GenerateRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_nc0_clawflake_generator_v3_generator_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GenerateResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_api_nc0_clawflake_generator_v3_generator_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_api_nc0_clawflake_generator_v3_generator_proto_goTypes,
+ DependencyIndexes: file_api_nc0_clawflake_generator_v3_generator_proto_depIdxs,
+ MessageInfos: file_api_nc0_clawflake_generator_v3_generator_proto_msgTypes,
+ }.Build()
+ File_api_nc0_clawflake_generator_v3_generator_proto = out.File
+ file_api_nc0_clawflake_generator_v3_generator_proto_rawDesc = nil
+ file_api_nc0_clawflake_generator_v3_generator_proto_goTypes = nil
+ file_api_nc0_clawflake_generator_v3_generator_proto_depIdxs = nil
+}
diff --git a/api/nicolaspl/clawflake/generator/v3/generator.proto b/api/nc0/clawflake/generator/v3/generator.proto
index ce41d85..605790c 100644
--- a/api/nicolaspl/clawflake/generator/v3/generator.proto
+++ b/api/nc0/clawflake/generator/v3/generator.proto
@@ -1,14 +1,14 @@
syntax = "proto3";
-package nicolaspl.clawflake.generator.v3;
+package nc0.clawflake.generator.v3;
import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
-option csharp_namespace = "NicolasPl.Clawflake.Generator.V3";
-option go_package = "go.nicolaspl.com/clawflake/api/nc0/clawflake/generator/v3";
-option java_package = "com.nicolaspl.clawflake.generator.v3";
+option csharp_namespace = "Nc0.Clawflake.Generator.V3";
+option go_package = "go.nc0.fr/clawflake/api/nc0/clawflake/generator/v3";
+option java_package = "fr.nc0.clawflake.generator.v3";
option java_multiple_files = true;
option java_outer_classname = "GeneratorProto";
diff --git a/api/nicolaspl/clawflake/generator/v3/generator_grpc.pb.go b/api/nc0/clawflake/generator/v3/generator_grpc.pb.go
index 3b5e79e..fe9432a 100644
--- a/api/nicolaspl/clawflake/generator/v3/generator_grpc.pb.go
+++ b/api/nc0/clawflake/generator/v3/generator_grpc.pb.go
@@ -2,7 +2,7 @@
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.21.12
-// source: api/nicolaspl/clawflake/generator/v3/generator.proto
+// source: api/nc0/clawflake/generator/v3/generator.proto
package v3
@@ -36,7 +36,7 @@ func NewGeneratorServiceClient(cc grpc.ClientConnInterface) GeneratorServiceClie
func (c *generatorServiceClient) Generate(ctx context.Context, in *GenerateRequest, opts ...grpc.CallOption) (*GenerateResponse, error) {
out := new(GenerateResponse)
- err := c.cc.Invoke(ctx, "/nicolaspl.clawflake.generator.v3.GeneratorService/Generate", in, out, opts...)
+ err := c.cc.Invoke(ctx, "/nc0.clawflake.generator.v3.GeneratorService/Generate", in, out, opts...)
if err != nil {
return nil, err
}
@@ -82,7 +82,7 @@ func _GeneratorService_Generate_Handler(srv interface{}, ctx context.Context, de
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/nicolaspl.clawflake.generator.v3.GeneratorService/Generate",
+ FullMethod: "/nc0.clawflake.generator.v3.GeneratorService/Generate",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GeneratorServiceServer).Generate(ctx, req.(*GenerateRequest))
@@ -94,7 +94,7 @@ func _GeneratorService_Generate_Handler(srv interface{}, ctx context.Context, de
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var GeneratorService_ServiceDesc = grpc.ServiceDesc{
- ServiceName: "nicolaspl.clawflake.generator.v3.GeneratorService",
+ ServiceName: "nc0.clawflake.generator.v3.GeneratorService",
HandlerType: (*GeneratorServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
@@ -103,5 +103,5 @@ var GeneratorService_ServiceDesc = grpc.ServiceDesc{
},
},
Streams: []grpc.StreamDesc{},
- Metadata: "api/nicolaspl/clawflake/generator/v3/generator.proto",
+ Metadata: "api/nc0/clawflake/generator/v3/generator.proto",
}
diff --git a/api/nicolaspl/clawflake/generator/v3/generator.pb.go b/api/nicolaspl/clawflake/generator/v3/generator.pb.go
deleted file mode 100644
index d02f45c..0000000
--- a/api/nicolaspl/clawflake/generator/v3/generator.pb.go
+++ /dev/null
@@ -1,245 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// versions:
-// protoc-gen-go v1.28.1
-// protoc v3.21.12
-// source: api/nicolaspl/clawflake/generator/v3/generator.proto
-
-package v3
-
-import (
- _ "google.golang.org/genproto/googleapis/api/annotations"
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
- reflect "reflect"
- sync "sync"
-)
-
-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)
-)
-
-// The request of a Generate RPC.
-type GenerateRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // The amount of ID numbers to generate.
- // The value should be in the interval [1, 4096].
- // Values not in the interval will not be coerced and the request will be
- // aborted.
- Amount uint32 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"`
-}
-
-func (x *GenerateRequest) Reset() {
- *x = GenerateRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_api_nicolaspl_clawflake_generator_v3_generator_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *GenerateRequest) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*GenerateRequest) ProtoMessage() {}
-
-func (x *GenerateRequest) ProtoReflect() protoreflect.Message {
- mi := &file_api_nicolaspl_clawflake_generator_v3_generator_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use GenerateRequest.ProtoReflect.Descriptor instead.
-func (*GenerateRequest) Descriptor() ([]byte, []int) {
- return file_api_nicolaspl_clawflake_generator_v3_generator_proto_rawDescGZIP(), []int{0}
-}
-
-func (x *GenerateRequest) GetAmount() uint32 {
- if x != nil {
- return x.Amount
- }
- return 0
-}
-
-// The response of a Generate RPC.
-type GenerateResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // The generate ID numbers.
- IdNumbers []string `protobuf:"bytes,1,rep,name=id_numbers,json=idNumbers,proto3" json:"id_numbers,omitempty"`
-}
-
-func (x *GenerateResponse) Reset() {
- *x = GenerateResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_api_nicolaspl_clawflake_generator_v3_generator_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *GenerateResponse) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*GenerateResponse) ProtoMessage() {}
-
-func (x *GenerateResponse) ProtoReflect() protoreflect.Message {
- mi := &file_api_nicolaspl_clawflake_generator_v3_generator_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use GenerateResponse.ProtoReflect.Descriptor instead.
-func (*GenerateResponse) Descriptor() ([]byte, []int) {
- return file_api_nicolaspl_clawflake_generator_v3_generator_proto_rawDescGZIP(), []int{1}
-}
-
-func (x *GenerateResponse) GetIdNumbers() []string {
- if x != nil {
- return x.IdNumbers
- }
- return nil
-}
-
-var File_api_nicolaspl_clawflake_generator_v3_generator_proto protoreflect.FileDescriptor
-
-var file_api_nicolaspl_clawflake_generator_v3_generator_proto_rawDesc = []byte{
- 0x0a, 0x34, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x69, 0x63, 0x6f, 0x6c, 0x61, 0x73, 0x70, 0x6c, 0x2f,
- 0x63, 0x6c, 0x61, 0x77, 0x66, 0x6c, 0x61, 0x6b, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
- 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x20, 0x6e, 0x69, 0x63, 0x6f, 0x6c, 0x61, 0x73, 0x70,
- 0x6c, 0x2e, 0x63, 0x6c, 0x61, 0x77, 0x66, 0x6c, 0x61, 0x6b, 0x65, 0x2e, 0x67, 0x65, 0x6e, 0x65,
- 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61,
- 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
- 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c,
- 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x22, 0x2e, 0x0a, 0x0f, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x0d, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74,
- 0x22, 0x36, 0x0a, 0x10, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70,
- 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x69, 0x64, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65,
- 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x06, 0x52, 0x09, 0x69,
- 0x64, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x32, 0xac, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x6e,
- 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x97, 0x01,
- 0x0a, 0x08, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x12, 0x31, 0x2e, 0x6e, 0x69, 0x63,
- 0x6f, 0x6c, 0x61, 0x73, 0x70, 0x6c, 0x2e, 0x63, 0x6c, 0x61, 0x77, 0x66, 0x6c, 0x61, 0x6b, 0x65,
- 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x65,
- 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e,
- 0x6e, 0x69, 0x63, 0x6f, 0x6c, 0x61, 0x73, 0x70, 0x6c, 0x2e, 0x63, 0x6c, 0x61, 0x77, 0x66, 0x6c,
- 0x61, 0x6b, 0x65, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x33,
- 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x22, 0x10, 0x2f, 0x76, 0x33, 0x2f, 0x69,
- 0x64, 0x73, 0x3a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0xda, 0x41,
- 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x96, 0x01, 0x0a, 0x24, 0x63, 0x6f, 0x6d, 0x2e,
- 0x6e, 0x69, 0x63, 0x6f, 0x6c, 0x61, 0x73, 0x70, 0x6c, 0x2e, 0x63, 0x6c, 0x61, 0x77, 0x66, 0x6c,
- 0x61, 0x6b, 0x65, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x33,
- 0x42, 0x0e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f,
- 0x50, 0x01, 0x5a, 0x39, 0x67, 0x6f, 0x2e, 0x6e, 0x69, 0x63, 0x6f, 0x6c, 0x61, 0x73, 0x70, 0x6c,
- 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6c, 0x61, 0x77, 0x66, 0x6c, 0x61, 0x6b, 0x65, 0x2f, 0x61,
- 0x70, 0x69, 0x2f, 0x6e, 0x63, 0x30, 0x2f, 0x63, 0x6c, 0x61, 0x77, 0x66, 0x6c, 0x61, 0x6b, 0x65,
- 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x33, 0xaa, 0x02, 0x20,
- 0x4e, 0x69, 0x63, 0x6f, 0x6c, 0x61, 0x73, 0x50, 0x6c, 0x2e, 0x43, 0x6c, 0x61, 0x77, 0x66, 0x6c,
- 0x61, 0x6b, 0x65, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x33,
- 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
-
-var (
- file_api_nicolaspl_clawflake_generator_v3_generator_proto_rawDescOnce sync.Once
- file_api_nicolaspl_clawflake_generator_v3_generator_proto_rawDescData = file_api_nicolaspl_clawflake_generator_v3_generator_proto_rawDesc
-)
-
-func file_api_nicolaspl_clawflake_generator_v3_generator_proto_rawDescGZIP() []byte {
- file_api_nicolaspl_clawflake_generator_v3_generator_proto_rawDescOnce.Do(func() {
- file_api_nicolaspl_clawflake_generator_v3_generator_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_nicolaspl_clawflake_generator_v3_generator_proto_rawDescData)
- })
- return file_api_nicolaspl_clawflake_generator_v3_generator_proto_rawDescData
-}
-
-var file_api_nicolaspl_clawflake_generator_v3_generator_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
-var file_api_nicolaspl_clawflake_generator_v3_generator_proto_goTypes = []interface{}{
- (*GenerateRequest)(nil), // 0: nicolaspl.clawflake.generator.v3.GenerateRequest
- (*GenerateResponse)(nil), // 1: nicolaspl.clawflake.generator.v3.GenerateResponse
-}
-var file_api_nicolaspl_clawflake_generator_v3_generator_proto_depIdxs = []int32{
- 0, // 0: nicolaspl.clawflake.generator.v3.GeneratorService.Generate:input_type -> nicolaspl.clawflake.generator.v3.GenerateRequest
- 1, // 1: nicolaspl.clawflake.generator.v3.GeneratorService.Generate:output_type -> nicolaspl.clawflake.generator.v3.GenerateResponse
- 1, // [1:2] is the sub-list for method output_type
- 0, // [0:1] is the sub-list for method input_type
- 0, // [0:0] is the sub-list for extension type_name
- 0, // [0:0] is the sub-list for extension extendee
- 0, // [0:0] is the sub-list for field type_name
-}
-
-func init() { file_api_nicolaspl_clawflake_generator_v3_generator_proto_init() }
-func file_api_nicolaspl_clawflake_generator_v3_generator_proto_init() {
- if File_api_nicolaspl_clawflake_generator_v3_generator_proto != nil {
- return
- }
- if !protoimpl.UnsafeEnabled {
- file_api_nicolaspl_clawflake_generator_v3_generator_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GenerateRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_api_nicolaspl_clawflake_generator_v3_generator_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GenerateResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
- type x struct{}
- out := protoimpl.TypeBuilder{
- File: protoimpl.DescBuilder{
- GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_api_nicolaspl_clawflake_generator_v3_generator_proto_rawDesc,
- NumEnums: 0,
- NumMessages: 2,
- NumExtensions: 0,
- NumServices: 1,
- },
- GoTypes: file_api_nicolaspl_clawflake_generator_v3_generator_proto_goTypes,
- DependencyIndexes: file_api_nicolaspl_clawflake_generator_v3_generator_proto_depIdxs,
- MessageInfos: file_api_nicolaspl_clawflake_generator_v3_generator_proto_msgTypes,
- }.Build()
- File_api_nicolaspl_clawflake_generator_v3_generator_proto = out.File
- file_api_nicolaspl_clawflake_generator_v3_generator_proto_rawDesc = nil
- file_api_nicolaspl_clawflake_generator_v3_generator_proto_goTypes = nil
- file_api_nicolaspl_clawflake_generator_v3_generator_proto_depIdxs = nil
-}
diff --git a/cmd/generator/generator.go b/cmd/generator/generator.go
index ab331ed..78ee42f 100644
--- a/cmd/generator/generator.go
+++ b/cmd/generator/generator.go
@@ -5,7 +5,7 @@ import (
"fmt"
"github.com/google/uuid"
- generatorpb "go.nicolaspl.com/clawflake/api/nicolaspl/clawflake/generator/v3"
+ generatorpb "go.nc0.fr/clawflake/api/nc0/clawflake/generator/v3"
"go.uber.org/zap"
"google.golang.org/genproto/googleapis/rpc/errdetails"
"google.golang.org/grpc/codes"
diff --git a/cmd/generator/main.go b/cmd/generator/main.go
index 4815a95..22165a1 100644
--- a/cmd/generator/main.go
+++ b/cmd/generator/main.go
@@ -6,7 +6,7 @@ import (
"flag"
"net"
- generatorpb "go.nicolaspl.com/clawflake/api/nicolaspl/clawflake/generator/v3"
+ generatorpb "go.nc0.fr/clawflake/api/nc0/clawflake/generator/v3"
"go.uber.org/zap"
"google.golang.org/grpc"
diff --git a/cmd/testclient/main.go b/cmd/testclient/main.go
index 802e794..135cc3f 100644
--- a/cmd/testclient/main.go
+++ b/cmd/testclient/main.go
@@ -5,7 +5,7 @@ import (
"flag"
"fmt"
- generatorpb "go.nicolaspl.com/clawflake/api/nicolaspl/clawflake/generator/v3"
+ generatorpb "go.nc0.fr/clawflake/api/nc0/clawflake/generator/v3"
"go.uber.org/zap"
"google.golang.org/grpc"