Skip to content

Commit d3da793

Browse files
Copilotleogenius360
andcommitted
Fix import paths, directory naming, and apply Buf formatting
Co-authored-by: leogenius360 <87181162+leogenius360@users.noreply.github.com>
1 parent d273dd5 commit d3da793

File tree

16 files changed

+179
-179
lines changed

16 files changed

+179
-179
lines changed

buf.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@ modules:
55
lint:
66
use:
77
- STANDARD
8-
- COMMENTS
98
- UNARY_RPC
109
except:
1110
- PACKAGE_VERSION_SUFFIX
11+
- COMMENT_FIELD
12+
- COMMENT_ENUM_VALUE
13+
- COMMENT_MESSAGE
14+
- COMMENT_SERVICE
15+
- COMMENT_RPC
1216
enum_zero_value_suffix: _UNSPECIFIED
1317
rpc_allow_same_request_response: false
1418
rpc_allow_google_protobuf_empty_requests: false
@@ -20,5 +24,3 @@ breaking:
2024
ignore:
2125
- proto/core/v2
2226
ignore_unstable_packages: true
23-
deps:
24-
- buf.build/googleapis/googleapis

proto/access-policy/v1/access_policy.proto renamed to proto/access_policy/v1/access_policy.proto

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ syntax = "proto3";
22

33
package access_policy.v1;
44

5+
import "core/v1/common.proto";
6+
7+
option csharp_namespace = "GeniusTechSpace.Protobuf.AccessPolicy.V1";
58
option go_package = "github.com/geniustechspace/protobuf/gen/go/access_policy/v1;accesspolicyv1";
69
option java_multiple_files = true;
710
option java_package = "com.geniustechspace.protobuf.accesspolicy.v1";
8-
option csharp_namespace = "GeniusTechSpace.Protobuf.AccessPolicy.V1";
9-
10-
import "google/protobuf/timestamp.proto";
11-
import "proto/core/v1/common.proto";
1211

1312
// Permission represents a specific action that can be performed
1413
message Permission {
@@ -175,25 +174,25 @@ message CheckPermissionResponse {
175174
service AccessPolicyService {
176175
// Create a new role
177176
rpc CreateRole(CreateRoleRequest) returns (CreateRoleResponse);
178-
177+
179178
// Get a role by ID
180179
rpc GetRole(GetRoleRequest) returns (GetRoleResponse);
181-
180+
182181
// Update a role
183182
rpc UpdateRole(UpdateRoleRequest) returns (UpdateRoleResponse);
184-
183+
185184
// Delete a role
186185
rpc DeleteRole(DeleteRoleRequest) returns (DeleteRoleResponse);
187-
186+
188187
// List roles
189188
rpc ListRoles(ListRolesRequest) returns (ListRolesResponse);
190-
189+
191190
// Assign a role to a user
192191
rpc AssignRole(AssignRoleRequest) returns (AssignRoleResponse);
193-
192+
194193
// Revoke a role from a user
195194
rpc RevokeRole(RevokeRoleRequest) returns (RevokeRoleResponse);
196-
195+
197196
// Check if a user has permission
198197
rpc CheckPermission(CheckPermissionRequest) returns (CheckPermissionResponse);
199198
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ syntax = "proto3";
22

33
package access_policy.v1;
44

5+
import "google/protobuf/timestamp.proto";
6+
7+
option csharp_namespace = "GeniusTechSpace.Protobuf.AccessPolicy.V1";
58
option go_package = "github.com/geniustechspace/protobuf/gen/go/access_policy/v1;accesspolicyv1";
69
option java_multiple_files = true;
710
option java_package = "com.geniustechspace.protobuf.accesspolicy.v1";
8-
option csharp_namespace = "GeniusTechSpace.Protobuf.AccessPolicy.V1";
9-
10-
import "google/protobuf/timestamp.proto";
1111

1212
// RoleCreatedEvent is triggered when a new role is created
1313
message RoleCreatedEvent {

proto/auth/v1/auth.proto

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ syntax = "proto3";
22

33
package auth.v1;
44

5+
import "google/protobuf/timestamp.proto";
6+
7+
option csharp_namespace = "GeniusTechSpace.Protobuf.Auth.V1";
58
option go_package = "github.com/geniustechspace/protobuf/gen/go/auth/v1;authv1";
69
option java_multiple_files = true;
710
option java_package = "com.geniustechspace.protobuf.auth.v1";
8-
option csharp_namespace = "GeniusTechSpace.Protobuf.Auth.V1";
9-
10-
import "google/protobuf/timestamp.proto";
11-
import "proto/core/v1/common.proto";
1211

1312
// Credentials for authentication
1413
message Credentials {
@@ -91,14 +90,14 @@ message LogoutResponse {
9190
bool success = 1;
9291
}
9392

94-
// Password reset request
95-
message PasswordResetRequest {
93+
// Request password reset request
94+
message RequestPasswordResetRequest {
9695
string email = 1;
9796
string tenant_id = 2;
9897
}
9998

100-
// Password reset response
101-
message PasswordResetResponse {
99+
// Request password reset response
100+
message RequestPasswordResetResponse {
102101
bool success = 1;
103102
string reset_token = 2;
104103
}
@@ -118,19 +117,19 @@ message ConfirmPasswordResetResponse {
118117
service AuthService {
119118
// Authenticate user with credentials
120119
rpc Authenticate(AuthenticateRequest) returns (AuthenticateResponse);
121-
120+
122121
// Refresh access token using refresh token
123122
rpc RefreshToken(RefreshTokenRequest) returns (RefreshTokenResponse);
124-
123+
125124
// Validate access token
126125
rpc ValidateToken(ValidateTokenRequest) returns (ValidateTokenResponse);
127-
126+
128127
// Logout and invalidate session
129128
rpc Logout(LogoutRequest) returns (LogoutResponse);
130-
129+
131130
// Request password reset
132-
rpc RequestPasswordReset(PasswordResetRequest) returns (PasswordResetResponse);
133-
131+
rpc RequestPasswordReset(RequestPasswordResetRequest) returns (RequestPasswordResetResponse);
132+
134133
// Confirm password reset with token
135134
rpc ConfirmPasswordReset(ConfirmPasswordResetRequest) returns (ConfirmPasswordResetResponse);
136135
}

proto/auth/v1/events.proto

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ syntax = "proto3";
22

33
package auth.v1;
44

5+
import "google/protobuf/timestamp.proto";
6+
7+
option csharp_namespace = "GeniusTechSpace.Protobuf.Auth.V1";
58
option go_package = "github.com/geniustechspace/protobuf/gen/go/auth/v1;authv1";
69
option java_multiple_files = true;
710
option java_package = "com.geniustechspace.protobuf.auth.v1";
8-
option csharp_namespace = "GeniusTechSpace.Protobuf.Auth.V1";
9-
10-
import "google/protobuf/timestamp.proto";
1111

1212
// UserAuthenticatedEvent is triggered when a user successfully authenticates
1313
message UserAuthenticatedEvent {

proto/billing/v1/billing.proto

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ syntax = "proto3";
22

33
package billing.v1;
44

5+
import "core/v1/common.proto";
6+
import "google/protobuf/timestamp.proto";
7+
8+
option csharp_namespace = "GeniusTechSpace.Protobuf.Billing.V1";
59
option go_package = "github.com/geniustechspace/protobuf/gen/go/billing/v1;billingv1";
610
option java_multiple_files = true;
711
option java_package = "com.geniustechspace.protobuf.billing.v1";
8-
option csharp_namespace = "GeniusTechSpace.Protobuf.Billing.V1";
9-
10-
import "google/protobuf/timestamp.proto";
11-
import "proto/core/v1/common.proto";
1212

1313
// Subscription represents a tenant's subscription
1414
message Subscription {
@@ -231,28 +231,28 @@ message ListPaymentMethodsResponse {
231231
service BillingService {
232232
// Create a new subscription
233233
rpc CreateSubscription(CreateSubscriptionRequest) returns (CreateSubscriptionResponse);
234-
234+
235235
// Get a subscription by ID
236236
rpc GetSubscription(GetSubscriptionRequest) returns (GetSubscriptionResponse);
237-
237+
238238
// Update a subscription
239239
rpc UpdateSubscription(UpdateSubscriptionRequest) returns (UpdateSubscriptionResponse);
240-
240+
241241
// Cancel a subscription
242242
rpc CancelSubscription(CancelSubscriptionRequest) returns (CancelSubscriptionResponse);
243-
243+
244244
// List invoices
245245
rpc ListInvoices(ListInvoicesRequest) returns (ListInvoicesResponse);
246-
246+
247247
// Get an invoice by ID
248248
rpc GetInvoice(GetInvoiceRequest) returns (GetInvoiceResponse);
249-
249+
250250
// Pay an invoice
251251
rpc PayInvoice(PayInvoiceRequest) returns (PayInvoiceResponse);
252-
252+
253253
// Add a payment method
254254
rpc AddPaymentMethod(AddPaymentMethodRequest) returns (AddPaymentMethodResponse);
255-
255+
256256
// List payment methods
257257
rpc ListPaymentMethods(ListPaymentMethodsRequest) returns (ListPaymentMethodsResponse);
258258
}

proto/billing/v1/events.proto

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ syntax = "proto3";
22

33
package billing.v1;
44

5+
import "billing/v1/billing.proto";
6+
import "core/v1/common.proto";
7+
import "google/protobuf/timestamp.proto";
8+
9+
option csharp_namespace = "GeniusTechSpace.Protobuf.Billing.V1";
510
option go_package = "github.com/geniustechspace/protobuf/gen/go/billing/v1;billingv1";
611
option java_multiple_files = true;
712
option java_package = "com.geniustechspace.protobuf.billing.v1";
8-
option csharp_namespace = "GeniusTechSpace.Protobuf.Billing.V1";
9-
10-
import "google/protobuf/timestamp.proto";
11-
import "proto/core/v1/common.proto";
12-
import "proto/billing/v1/billing.proto";
1313

1414
// SubscriptionCreatedEvent is triggered when a new subscription is created
1515
message SubscriptionCreatedEvent {

proto/core/v1/common.proto

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@ syntax = "proto3";
22

33
package core.v1;
44

5+
import "google/protobuf/timestamp.proto";
6+
7+
option csharp_namespace = "GeniusTechSpace.Protobuf.Core.V1";
58
option go_package = "github.com/geniustechspace/protobuf/gen/go/core/v1;corev1";
69
option java_multiple_files = true;
710
option java_package = "com.geniustechspace.protobuf.core.v1";
8-
option csharp_namespace = "GeniusTechSpace.Protobuf.Core.V1";
9-
10-
import "google/protobuf/timestamp.proto";
1111

1212
// TenantContext provides multi-tenant isolation for all requests
1313
message TenantContext {
1414
// Unique identifier for the tenant
1515
string tenant_id = 1;
16-
16+
1717
// Tenant name for display purposes
1818
string tenant_name = 2;
19-
19+
2020
// Tenant tier (free, pro, enterprise)
2121
string tier = 3;
22-
22+
2323
// Tenant status (active, suspended, deleted)
2424
string status = 4;
2525
}
@@ -28,25 +28,25 @@ message TenantContext {
2828
message Metadata {
2929
// Unique identifier
3030
string id = 1;
31-
31+
3232
// Creation timestamp
3333
google.protobuf.Timestamp created_at = 2;
34-
34+
3535
// Last update timestamp
3636
google.protobuf.Timestamp updated_at = 3;
37-
37+
3838
// ID of user who created the entity
3939
string created_by = 4;
40-
40+
4141
// ID of user who last updated the entity
4242
string updated_by = 5;
43-
43+
4444
// Version for optimistic locking
4545
int64 version = 6;
46-
46+
4747
// Soft delete flag
4848
bool deleted = 7;
49-
49+
5050
// Deletion timestamp
5151
google.protobuf.Timestamp deleted_at = 8;
5252
}
@@ -55,13 +55,13 @@ message Metadata {
5555
message PaginationRequest {
5656
// Page number (0-indexed)
5757
int32 page = 1;
58-
58+
5959
// Number of items per page
6060
int32 page_size = 2;
61-
61+
6262
// Sort field
6363
string sort_by = 3;
64-
64+
6565
// Sort order (asc, desc)
6666
string sort_order = 4;
6767
}
@@ -70,19 +70,19 @@ message PaginationRequest {
7070
message PaginationResponse {
7171
// Current page number
7272
int32 page = 1;
73-
73+
7474
// Number of items per page
7575
int32 page_size = 2;
76-
76+
7777
// Total number of items
7878
int64 total_items = 3;
79-
79+
8080
// Total number of pages
8181
int32 total_pages = 4;
82-
82+
8383
// Has next page
8484
bool has_next = 5;
85-
85+
8686
// Has previous page
8787
bool has_previous = 6;
8888
}
@@ -109,7 +109,7 @@ message ContactInfo {
109109
message Money {
110110
// Currency code (ISO 4217)
111111
string currency = 1;
112-
112+
113113
// Amount in smallest currency unit (e.g., cents)
114114
int64 amount = 2;
115115
}
@@ -118,13 +118,13 @@ message Money {
118118
message ErrorDetail {
119119
// Error code
120120
string code = 1;
121-
121+
122122
// Human-readable error message
123123
string message = 2;
124-
124+
125125
// Field that caused the error
126126
string field = 3;
127-
127+
128128
// Additional error metadata
129129
map<string, string> metadata = 4;
130130
}
@@ -133,16 +133,16 @@ message ErrorDetail {
133133
message ErrorResponse {
134134
// HTTP status code
135135
int32 status = 1;
136-
136+
137137
// Error message
138138
string message = 2;
139-
139+
140140
// Detailed error information
141141
repeated ErrorDetail details = 3;
142-
142+
143143
// Request ID for tracking
144144
string request_id = 4;
145-
145+
146146
// Timestamp of the error
147147
google.protobuf.Timestamp timestamp = 5;
148148
}

0 commit comments

Comments
 (0)