feat: buf formatting and linting

This commit is contained in:
Johan Siebens
2022-10-31 07:28:25 +01:00
parent e41bac5a41
commit c73b7e13e0
31 changed files with 1374 additions and 944 deletions
+3 -5
View File
@@ -1,11 +1,10 @@
syntax = "proto3";
package ionscale.v1;
option go_package = "github.com/jsiebens/ionscale/pkg/gen/ionscale/v1;ionscalev1";
import "google/protobuf/struct.proto";
import "ionscale/v1/ref.proto";
option go_package = "github.com/jsiebens/ionscale/pkg/gen/ionscale/v1;ionscalev1";
message GetACLPolicyRequest {
uint64 tailnet_id = 1;
@@ -20,8 +19,7 @@ message SetACLPolicyRequest {
ACLPolicy policy = 2;
}
message SetACLPolicyResponse {
}
message SetACLPolicyResponse {}
message ACLPolicy {
map<string, string> hosts = 1;
@@ -48,4 +46,4 @@ message SSHRule {
repeated string src = 2;
repeated string dst = 3;
repeated string users = 4;
}
}
+4 -4
View File
@@ -1,13 +1,13 @@
syntax = "proto3";
package ionscale.v1;
option go_package = "github.com/jsiebens/ionscale/pkg/gen/ionscale/v1;ionscalev1";
message AuthenticationRequest {
}
message AuthenticateRequest {}
message AuthenticationResponse {
message AuthenticateResponse {
string auth_url = 1;
string token = 2;
optional uint64 tailnet_id = 3;
}
}
+5 -5
View File
@@ -1,19 +1,19 @@
syntax = "proto3";
package ionscale.v1;
option go_package = "github.com/jsiebens/ionscale/pkg/gen/ionscale/v1;ionscalev1";
import "google/protobuf/timestamp.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
import "ionscale/v1/ref.proto";
option go_package = "github.com/jsiebens/ionscale/pkg/gen/ionscale/v1;ionscalev1";
message GetAuthKeyRequest {
uint64 auth_key_id = 1;
}
message GetAuthKeyResponse {
AuthKey authKey = 1;
AuthKey auth_key = 1;
}
message CreateAuthKeyRequest {
@@ -50,4 +50,4 @@ message AuthKey {
google.protobuf.Timestamp created_at = 5;
optional google.protobuf.Timestamp expires_at = 6;
Ref tailnet = 7;
}
}
+3 -4
View File
@@ -1,6 +1,7 @@
syntax = "proto3";
package ionscale.v1;
option go_package = "github.com/jsiebens/ionscale/pkg/gen/ionscale/v1;ionscalev1";
message GetDefaultDERPMapRequest {}
@@ -17,8 +18,6 @@ message SetDefaultDERPMapResponse {
bytes value = 1;
}
message ResetDefaultDERPMapRequest {
}
message ResetDefaultDERPMapRequest {}
message ResetDefaultDERPMapResponse {
}
message ResetDefaultDERPMapResponse {}
+4 -8
View File
@@ -1,10 +1,8 @@
syntax = "proto3";
package ionscale.v1;
option go_package = "github.com/jsiebens/ionscale/pkg/gen/ionscale/v1;ionscalev1";
import "google/protobuf/timestamp.proto";
import "google/protobuf/duration.proto";
option go_package = "github.com/jsiebens/ionscale/pkg/gen/ionscale/v1;ionscalev1";
message GetDNSConfigRequest {
uint64 tailnet_id = 1;
@@ -27,15 +25,13 @@ message EnableHttpsCertificatesRequest {
uint64 tailnet_id = 1;
}
message EnableHttpsCertificatesResponse {
}
message EnableHttpsCertificatesResponse {}
message DisableHttpsCertificatesRequest {
uint64 tailnet_id = 1;
}
message DisableHttpsCertificatesResponse {
}
message DisableHttpsCertificatesResponse {}
message DNSConfig {
bool magic_dns = 1;
@@ -47,4 +43,4 @@ message DNSConfig {
message Routes {
repeated string routes = 1;
}
}
+3 -3
View File
@@ -1,6 +1,7 @@
syntax = "proto3";
package ionscale.v1;
option go_package = "github.com/jsiebens/ionscale/pkg/gen/ionscale/v1;ionscalev1";
message GetIAMPolicyRequest {
@@ -16,12 +17,11 @@ message SetIAMPolicyRequest {
IAMPolicy policy = 2;
}
message SetIAMPolicyResponse {
}
message SetIAMPolicyResponse {}
message IAMPolicy {
repeated string subs = 1;
repeated string emails = 2;
repeated string filters = 3;
map<string, string> roles = 4;
}
}
+46 -48
View File
@@ -1,73 +1,71 @@
syntax = "proto3";
package ionscale.v1;
option go_package = "github.com/jsiebens/ionscale/pkg/gen/ionscale/v1;ionscalev1";
import "google/protobuf/timestamp.proto";
import "google/protobuf/duration.proto";
import "ionscale/v1/version.proto";
import "ionscale/v1/acl.proto";
import "ionscale/v1/auth.proto";
import "ionscale/v1/tailnets.proto";
import "ionscale/v1/users.proto";
import "ionscale/v1/auth_keys.proto";
import "ionscale/v1/machines.proto";
import "ionscale/v1/routes.proto";
import "ionscale/v1/derp.proto";
import "ionscale/v1/dns.proto";
import "ionscale/v1/iam.proto";
import "ionscale/v1/acl.proto";
import "ionscale/v1/derp.proto";
import "ionscale/v1/machines.proto";
import "ionscale/v1/routes.proto";
import "ionscale/v1/tailnets.proto";
import "ionscale/v1/users.proto";
import "ionscale/v1/version.proto";
option go_package = "github.com/jsiebens/ionscale/pkg/gen/ionscale/v1;ionscalev1";
service IonscaleService {
rpc GetVersion (GetVersionRequest) returns (GetVersionResponse) {}
rpc GetVersion(GetVersionRequest) returns (GetVersionResponse) {}
rpc Authenticate (AuthenticationRequest) returns (stream AuthenticationResponse) {}
rpc Authenticate(AuthenticateRequest) returns (stream AuthenticateResponse) {}
rpc GetDefaultDERPMap (GetDefaultDERPMapRequest) returns (GetDefaultDERPMapResponse) {}
rpc SetDefaultDERPMap (SetDefaultDERPMapRequest) returns (SetDefaultDERPMapResponse) {}
rpc ResetDefaultDERPMap (ResetDefaultDERPMapRequest) returns (ResetDefaultDERPMapResponse) {}
rpc GetDefaultDERPMap(GetDefaultDERPMapRequest) returns (GetDefaultDERPMapResponse) {}
rpc SetDefaultDERPMap(SetDefaultDERPMapRequest) returns (SetDefaultDERPMapResponse) {}
rpc ResetDefaultDERPMap(ResetDefaultDERPMapRequest) returns (ResetDefaultDERPMapResponse) {}
rpc CreateTailnet (CreateTailnetRequest) returns (CreateTailnetResponse) {}
rpc GetTailnet (GetTailnetRequest) returns (GetTailnetResponse) {}
rpc ListTailnets (ListTailnetRequest) returns (ListTailnetResponse) {}
rpc DeleteTailnet (DeleteTailnetRequest) returns (DeleteTailnetResponse) {}
rpc GetDERPMap (GetDERPMapRequest) returns (GetDERPMapResponse) {}
rpc SetDERPMap (SetDERPMapRequest) returns (SetDERPMapResponse) {}
rpc ResetDERPMap (ResetDERPMapRequest) returns (ResetDERPMapResponse) {}
rpc EnabledFileSharing (EnableFileSharingRequest) returns (EnableFileSharingResponse) {}
rpc DisableFileSharing (DisableFileSharingRequest) returns (DisableFileSharingResponse) {}
rpc EnabledServiceCollection (EnableServiceCollectionRequest) returns (EnableServiceCollectionResponse) {}
rpc DisableServiceCollection (DisableServiceCollectionRequest) returns (DisableServiceCollectionResponse) {}
rpc EnabledSSH (EnableSSHRequest) returns (EnableSSHResponse) {}
rpc DisableSSH (DisableSSHRequest) returns (DisableSSHResponse) {}
rpc CreateTailnet(CreateTailnetRequest) returns (CreateTailnetResponse) {}
rpc GetTailnet(GetTailnetRequest) returns (GetTailnetResponse) {}
rpc ListTailnets(ListTailnetsRequest) returns (ListTailnetsResponse) {}
rpc DeleteTailnet(DeleteTailnetRequest) returns (DeleteTailnetResponse) {}
rpc GetDERPMap(GetDERPMapRequest) returns (GetDERPMapResponse) {}
rpc SetDERPMap(SetDERPMapRequest) returns (SetDERPMapResponse) {}
rpc ResetDERPMap(ResetDERPMapRequest) returns (ResetDERPMapResponse) {}
rpc EnableFileSharing(EnableFileSharingRequest) returns (EnableFileSharingResponse) {}
rpc DisableFileSharing(DisableFileSharingRequest) returns (DisableFileSharingResponse) {}
rpc EnableServiceCollection(EnableServiceCollectionRequest) returns (EnableServiceCollectionResponse) {}
rpc DisableServiceCollection(DisableServiceCollectionRequest) returns (DisableServiceCollectionResponse) {}
rpc EnableSSH(EnableSSHRequest) returns (EnableSSHResponse) {}
rpc DisableSSH(DisableSSHRequest) returns (DisableSSHResponse) {}
rpc GetDNSConfig (GetDNSConfigRequest) returns (GetDNSConfigResponse) {}
rpc SetDNSConfig (SetDNSConfigRequest) returns (SetDNSConfigResponse) {}
rpc GetDNSConfig(GetDNSConfigRequest) returns (GetDNSConfigResponse) {}
rpc SetDNSConfig(SetDNSConfigRequest) returns (SetDNSConfigResponse) {}
rpc GetIAMPolicy (GetIAMPolicyRequest) returns (GetIAMPolicyResponse) {}
rpc SetIAMPolicy (SetIAMPolicyRequest) returns (SetIAMPolicyResponse) {}
rpc GetIAMPolicy(GetIAMPolicyRequest) returns (GetIAMPolicyResponse) {}
rpc SetIAMPolicy(SetIAMPolicyRequest) returns (SetIAMPolicyResponse) {}
rpc GetACLPolicy (GetACLPolicyRequest) returns (GetACLPolicyResponse) {}
rpc SetACLPolicy (SetACLPolicyRequest) returns (SetACLPolicyResponse) {}
rpc GetACLPolicy(GetACLPolicyRequest) returns (GetACLPolicyResponse) {}
rpc SetACLPolicy(SetACLPolicyRequest) returns (SetACLPolicyResponse) {}
rpc GetAuthKey (GetAuthKeyRequest) returns (GetAuthKeyResponse) {}
rpc CreateAuthKey (CreateAuthKeyRequest) returns (CreateAuthKeyResponse) {}
rpc DeleteAuthKey (DeleteAuthKeyRequest) returns (DeleteAuthKeyResponse) {}
rpc ListAuthKeys (ListAuthKeysRequest) returns (ListAuthKeysResponse) {}
rpc GetAuthKey(GetAuthKeyRequest) returns (GetAuthKeyResponse) {}
rpc CreateAuthKey(CreateAuthKeyRequest) returns (CreateAuthKeyResponse) {}
rpc DeleteAuthKey(DeleteAuthKeyRequest) returns (DeleteAuthKeyResponse) {}
rpc ListAuthKeys(ListAuthKeysRequest) returns (ListAuthKeysResponse) {}
rpc ListUsers(ListUsersRequest) returns (ListUsersResponse) {}
rpc DeleteUser(DeleteUserRequest) returns (DeleteUserResponse) {}
rpc GetMachine (GetMachineRequest) returns (GetMachineResponse) {}
rpc ListMachines (ListMachinesRequest) returns (ListMachinesResponse) {}
rpc GetMachine(GetMachineRequest) returns (GetMachineResponse) {}
rpc ListMachines(ListMachinesRequest) returns (ListMachinesResponse) {}
rpc ExpireMachine(ExpireMachineRequest) returns (ExpireMachineResponse) {}
rpc DeleteMachine(DeleteMachineRequest) returns (DeleteMachineResponse) {}
rpc SetMachineKeyExpiry(SetMachineKeyExpiryRequest) returns (SetMachineKeyExpiryResponse) {}
rpc GetMachineRoutes (GetMachineRoutesRequest) returns (GetMachineRoutesResponse) {}
rpc EnableMachineRoutes (EnableMachineRoutesRequest) returns (GetMachineRoutesResponse) {}
rpc DisableMachineRoutes (DisableMachineRoutesRequest) returns (GetMachineRoutesResponse) {}
rpc EnableExitNode (EnableExitNodeRequest) returns (GetMachineRoutesResponse) {}
rpc DisableExitNode (DisableExitNodeRequest) returns (GetMachineRoutesResponse) {}
rpc EnableHttpsCertificates (EnableHttpsCertificatesRequest) returns (EnableHttpsCertificatesResponse) {}
rpc DisableHttpsCertificates (DisableHttpsCertificatesRequest) returns (DisableHttpsCertificatesResponse) {}
rpc GetMachineRoutes(GetMachineRoutesRequest) returns (GetMachineRoutesResponse) {}
rpc EnableMachineRoutes(EnableMachineRoutesRequest) returns (EnableMachineRoutesResponse) {}
rpc DisableMachineRoutes(DisableMachineRoutesRequest) returns (DisableMachineRoutesResponse) {}
rpc EnableExitNode(EnableExitNodeRequest) returns (EnableExitNodeResponse) {}
rpc DisableExitNode(DisableExitNodeRequest) returns (DisableExitNodeResponse) {}
rpc EnableHttpsCertificates(EnableHttpsCertificatesRequest) returns (EnableHttpsCertificatesResponse) {}
rpc DisableHttpsCertificates(DisableHttpsCertificatesRequest) returns (DisableHttpsCertificatesResponse) {}
}
+2 -3
View File
@@ -1,13 +1,12 @@
syntax = "proto3";
package ionscale.v1;
option go_package = "github.com/jsiebens/ionscale/pkg/gen/ionscale/v1;ionscalev1";
import "google/protobuf/timestamp.proto";
import "google/protobuf/duration.proto";
import "ionscale/v1/ref.proto";
option go_package = "github.com/jsiebens/ionscale/pkg/gen/ionscale/v1;ionscalev1";
message ListMachinesRequest {
uint64 tailnet_id = 1;
}
+2 -1
View File
@@ -1,9 +1,10 @@
syntax = "proto3";
package ionscale.v1;
option go_package = "github.com/jsiebens/ionscale/pkg/gen/ionscale/v1;ionscalev1";
message Ref {
uint64 id = 1;
string name = 2;
}
}
+31 -5
View File
@@ -1,6 +1,7 @@
syntax = "proto3";
package ionscale.v1;
option go_package = "github.com/jsiebens/ionscale/pkg/gen/ionscale/v1;ionscalev1";
message GetMachineRoutesRequest {
@@ -8,10 +9,8 @@ message GetMachineRoutesRequest {
}
message GetMachineRoutesResponse {
repeated string advertised_routes = 1;
repeated string enabled_routes = 2;
bool advertised_exit_node = 3;
bool enabled_exit_node = 4;
uint64 machine_id = 1;
MachineRoutes routes = 2;
}
message EnableMachineRoutesRequest {
@@ -20,15 +19,42 @@ message EnableMachineRoutesRequest {
bool replace = 3;
}
message EnableMachineRoutesResponse {
uint64 machine_id = 1;
MachineRoutes routes = 2;
}
message DisableMachineRoutesRequest {
uint64 machine_id = 1;
repeated string routes = 2;
}
message DisableMachineRoutesResponse {
uint64 machine_id = 1;
MachineRoutes routes = 2;
}
message EnableExitNodeRequest {
uint64 machine_id = 1;
}
message EnableExitNodeResponse {
uint64 machine_id = 1;
MachineRoutes routes = 2;
}
message DisableExitNodeRequest {
uint64 machine_id = 1;
}
}
message DisableExitNodeResponse {
uint64 machine_id = 1;
MachineRoutes routes = 2;
}
message MachineRoutes {
repeated string advertised_routes = 1;
repeated string enabled_routes = 2;
bool advertised_exit_node = 3;
bool enabled_exit_node = 4;
}
+11 -19
View File
@@ -1,10 +1,11 @@
syntax = "proto3";
package ionscale.v1;
option go_package = "github.com/jsiebens/ionscale/pkg/gen/ionscale/v1;ionscalev1";
import "ionscale/v1/iam.proto";
option go_package = "github.com/jsiebens/ionscale/pkg/gen/ionscale/v1;ionscalev1";
message Tailnet {
uint64 id = 1;
string name = 2;
@@ -27,10 +28,9 @@ message GetTailnetResponse {
Tailnet tailnet = 1;
}
message ListTailnetRequest {
}
message ListTailnetsRequest {}
message ListTailnetResponse {
message ListTailnetsResponse {
repeated Tailnet tailnet = 1;
}
@@ -62,48 +62,40 @@ message ResetDERPMapRequest {
uint64 tailnet_id = 1;
}
message ResetDERPMapResponse {
}
message ResetDERPMapResponse {}
message EnableFileSharingRequest {
uint64 tailnet_id = 1;
}
message EnableFileSharingResponse {
}
message EnableFileSharingResponse {}
message DisableFileSharingRequest {
uint64 tailnet_id = 1;
}
message DisableFileSharingResponse {
}
message DisableFileSharingResponse {}
message EnableServiceCollectionRequest {
uint64 tailnet_id = 1;
}
message EnableServiceCollectionResponse {
}
message EnableServiceCollectionResponse {}
message DisableServiceCollectionRequest {
uint64 tailnet_id = 1;
}
message DisableServiceCollectionResponse {
}
message DisableServiceCollectionResponse {}
message EnableSSHRequest {
uint64 tailnet_id = 1;
}
message EnableSSHResponse {
}
message EnableSSHResponse {}
message DisableSSHRequest {
uint64 tailnet_id = 1;
}
message DisableSSHResponse {
}
message DisableSSHResponse {}
+2 -1
View File
@@ -1,6 +1,7 @@
syntax = "proto3";
package ionscale.v1;
option go_package = "github.com/jsiebens/ionscale/pkg/gen/ionscale/v1;ionscalev1";
message User {
@@ -21,4 +22,4 @@ message DeleteUserRequest {
uint64 user_id = 1;
}
message DeleteUserResponse {}
message DeleteUserResponse {}
+3 -3
View File
@@ -1,12 +1,12 @@
syntax = "proto3";
package ionscale.v1;
option go_package = "github.com/jsiebens/ionscale/pkg/gen/ionscale/v1;ionscalev1";
message GetVersionRequest {
}
message GetVersionRequest {}
message GetVersionResponse {
string version = 1;
string revision = 2;
}
}