syntax = "proto3"; import "google/protobuf/struct.proto"; option go_package = "github.com/formancehq/membership/internal/grpc/generated"; package server; service Server { rpc Join(stream Message) returns (stream Order) {} } message ConnectRequest { string id = 1; map tags = 2; string baseUrl = 3; bool production = 4; } message Order { reserved 5; oneof message { Connected connected = 1; Stack existingStack = 2; DeletedStack deletedStack = 3; Ping ping = 4; DisabledStack disabledStack = 6; EnabledStack enabledStack = 7; } } message Message { oneof message { StatusChanged statusChanged = 1; Pong pong = 2; AddedVersion addedVersion = 3; DeletedVersion deletedVersion = 4; UpdatedVersion updatedVersion = 5; ModuleStatusChanged moduleStatusChanged = 6; ModuleDeleted moduleDeleted = 7; DeletedStack stackDeleted = 8; } } message Connected {} message Ping {} message Pong {} message Stack { string clusterName = 1; string seed = 2; AuthConfig authConfig = 3; repeated AuthClient staticClients = 4; StargateConfig stargateConfig = 5; bool disabled = 6; reserved 7; string versions = 8; bool enableAudit = 9; map additionalLabels = 10; map additionalAnnotations = 11; repeated Module modules = 12; } message Module { string name = 1; } enum StackStatus { Progressing = 0; Ready = 1; Deleted = 2; Disabled = 3; } message VersionKind { string version = 1; string kind = 2; } message ModuleStatusChanged { string clusterName = 1; google.protobuf.Struct status = 2; VersionKind vk = 3; } message ModuleDeleted { string clusterName = 1; VersionKind vk = 2; } message StatusChanged { string clusterName = 1; StackStatus status = 2; google.protobuf.Struct statuses = 3; VersionKind vk = 4; } message StargateConfig { bool enabled = 1; string url = 2; } message DeletedStack { string clusterName = 1; } message DisabledStack { string clusterName = 1; } message EnabledStack { string clusterName = 1; } message AuthConfig { string clientId = 1; string clientSecret = 2; string issuer = 3; } message AuthClient { bool public = 1; string id = 2; } message AddedVersion { string name = 1; map versions = 2; } message UpdatedVersion { string name = 1; map versions = 2; } message DeletedVersion { string name = 1; }