All Downloads are FREE. Search and download functionalities are using the official Maven repository.

xyz.block.ftl.schema.v1.schema.proto Maven / Gradle / Ivy

// Code generated by go2proto. DO NOT EDIT.
syntax = "proto3";

package xyz.block.ftl.schema.v1;

import "google/protobuf/timestamp.proto";

option go_package = "github.com/block/ftl/common/protos/xyz/block/ftl/schema/v1;schemapb";
option java_multiple_files = true;

message AWSIAMAuthDatabaseConnector {
  optional Position pos = 1;
  string username = 2;
  string endpoint = 3;
  string database = 4;
}

// AliasKind is the kind of alias.
enum AliasKind {
  ALIAS_KIND_UNSPECIFIED = 0;
  ALIAS_KIND_JSON = 1;
}

message Any {
  optional Position pos = 1;
}

message Array {
  optional Position pos = 1;
  Type element = 2;
}

message Bool {
  optional Position pos = 1;
}

message Bytes {
  optional Position pos = 1;
}

message Config {
  optional Position pos = 1;
  repeated string comments = 2;
  string name = 3;
  Type type = 4;
}

message DSNDatabaseConnector {
  optional Position pos = 1;
  string dsn = 2;
}

// A Data structure.
message Data {
  optional Position pos = 1;
  repeated string comments = 2;
  bool export = 3;
  string name = 4;
  repeated TypeParameter type_parameters = 5;
  repeated Field fields = 6;
  repeated Metadata metadata = 7;
}

message Database {
  optional Position pos = 1;
  optional DatabaseRuntime runtime = 31634;
  repeated string comments = 2;
  string type = 4;
  string name = 3;
  repeated Metadata metadata = 5;
}

message DatabaseConnector {
  oneof value {
    AWSIAMAuthDatabaseConnector awsiam_auth_database_connector = 2;
    DSNDatabaseConnector dsn_database_connector = 1;
  }
}

message DatabaseRuntime {
  optional DatabaseRuntimeConnections connections = 1;
}

message DatabaseRuntimeConnections {
  DatabaseConnector read = 1;
  DatabaseConnector write = 2;
}

message DatabaseRuntimeConnectionsEvent {
  DatabaseRuntimeConnections connections = 1;
}

message DatabaseRuntimeEvent {
  string id = 1;
  DatabaseRuntimeEventPayload payload = 2;
}

message DatabaseRuntimeEventPayload {
  oneof value {
    DatabaseRuntimeConnectionsEvent database_runtime_connections_event = 1;
  }
}

// Decl represents user-defined data types in the schema grammar.
message Decl {
  oneof value {
    Config config = 6;
    Data data = 1;
    Database database = 3;
    Enum enum = 4;
    Secret secret = 7;
    Topic topic = 9;
    TypeAlias type_alias = 5;
    Verb verb = 2;
  }
}

message Enum {
  optional Position pos = 1;
  repeated string comments = 2;
  bool export = 3;
  string name = 4;
  optional Type type = 5;
  repeated EnumVariant variants = 6;
}

message EnumVariant {
  optional Position pos = 1;
  repeated string comments = 2;
  string name = 3;
  Value value = 4;
}

message Field {
  optional Position pos = 1;
  repeated string comments = 3;
  string name = 2;
  Type type = 4;
  repeated Metadata metadata = 5;
}

message Float {
  optional Position pos = 1;
}

enum FromOffset {
  FROM_OFFSET_UNSPECIFIED = 0;
  FROM_OFFSET_BEGINNING = 1;
  FROM_OFFSET_LATEST = 2;
}

message IngressPathComponent {
  oneof value {
    IngressPathLiteral ingress_path_literal = 1;
    IngressPathParameter ingress_path_parameter = 2;
  }
}

message IngressPathLiteral {
  optional Position pos = 1;
  string text = 2;
}

message IngressPathParameter {
  optional Position pos = 1;
  string name = 2;
}

message Int {
  optional Position pos = 1;
}

message IntValue {
  optional Position pos = 1;
  int64 value = 2;
}

message Map {
  optional Position pos = 1;
  Type key = 2;
  Type value = 3;
}

// Metadata represents a metadata Node in the schema grammar.
message Metadata {
  oneof value {
    MetadataAlias alias = 5;
    MetadataArtefact artefact = 14;
    MetadataCalls calls = 1;
    MetadataConfig config = 10;
    MetadataCronJob cron_job = 3;
    MetadataDatabases databases = 4;
    MetadataEncoding encoding = 9;
    MetadataIngress ingress = 2;
    MetadataPublisher publisher = 12;
    MetadataRetry retry = 6;
    MetadataSQLMigration sql_migration = 13;
    MetadataSecrets secrets = 11;
    MetadataSubscriber subscriber = 7;
    MetadataTypeMap type_map = 8;
  }
}

message MetadataAlias {
  optional Position pos = 1;
  AliasKind kind = 2;
  string alias = 3;
}

message MetadataArtefact {
  optional Position pos = 1;
  string path = 2;
  string digest = 3;
  bool executable = 4;
}

// MetadataCalls represents a metadata block with a list of calls.
message MetadataCalls {
  optional Position pos = 1;
  repeated Ref calls = 2;
}

// MetadataConfig represents a metadata block with a list of config items that are used.
message MetadataConfig {
  optional Position pos = 1;
  repeated Ref config = 2;
}

message MetadataCronJob {
  optional Position pos = 1;
  string cron = 2;
}

message MetadataDatabases {
  optional Position pos = 1;
  repeated Ref calls = 2;
}

message MetadataEncoding {
  optional Position pos = 1;
  string type = 2;
  bool lenient = 3;
}

message MetadataIngress {
  optional Position pos = 1;
  string type = 2;
  string method = 3;
  repeated IngressPathComponent path = 4;
}

message MetadataPublisher {
  optional Position pos = 1;
  repeated Ref topics = 2;
}

message MetadataRetry {
  optional Position pos = 1;
  optional int64 count = 2;
  string min_backoff = 3;
  string max_backoff = 4;
  optional Ref catch = 5;
}

message MetadataSQLMigration {
  optional Position pos = 1;
  string digest = 2;
}

// MetadataSecrets represents a metadata block with a list of config items that are used.
message MetadataSecrets {
  optional Position pos = 1;
  repeated Ref secrets = 2;
}

message MetadataSubscriber {
  optional Position pos = 1;
  Ref topic = 2;
  FromOffset from_offset = 3;
  bool dead_letter = 4;
}

message MetadataTypeMap {
  optional Position pos = 1;
  string runtime = 2;
  string native_name = 3;
}

message Module {
  optional Position pos = 1;
  repeated string comments = 2;
  bool builtin = 3;
  string name = 4;
  repeated Metadata metadata = 6;
  repeated Decl decls = 5;
  ModuleRuntime runtime = 31634;
}

// ModuleRuntime is runtime configuration for a module that can be dynamically updated.
message ModuleRuntime {
  ModuleRuntimeBase base = 1;
  optional ModuleRuntimeScaling scaling = 2;
  optional ModuleRuntimeDeployment deployment = 3;
}

message ModuleRuntimeBase {
  google.protobuf.Timestamp create_time = 1;
  string language = 2;
  optional string os = 3;
  optional string arch = 4;
  optional string image = 5;
}

message ModuleRuntimeDeployment {
  string endpoint = 1;
  string deployment_key = 2;
}

message ModuleRuntimeEvent {
  oneof value {
    ModuleRuntimeBase module_runtime_base = 1;
    ModuleRuntimeDeployment module_runtime_deployment = 3;
    ModuleRuntimeScaling module_runtime_scaling = 2;
  }
}

message ModuleRuntimeScaling {
  int32 min_replicas = 1;
}

// Optional represents a Type whose value may be optional.
message Optional {
  optional Position pos = 1;
  optional Type type = 2;
}

message Position {
  string filename = 1;
  int64 line = 2;
  int64 column = 3;
}

// Ref is an untyped reference to a symbol.
message Ref {
  optional Position pos = 1;
  string module = 3;
  string name = 2;
  repeated Type type_parameters = 4;
}

// RuntimeEvent is an event modifying a runtime part of the schema.
message RuntimeEvent {
  oneof value {
    DatabaseRuntimeEvent database_runtime_event = 5;
    ModuleRuntimeBase module_runtime_base = 1;
    ModuleRuntimeDeployment module_runtime_deployment = 3;
    ModuleRuntimeScaling module_runtime_scaling = 2;
    TopicRuntimeEvent topic_runtime_event = 6;
    VerbRuntimeEvent verb_runtime_event = 4;
  }
}

message Schema {
  optional Position pos = 1;
  repeated Module modules = 2;
}

message Secret {
  optional Position pos = 1;
  repeated string comments = 2;
  string name = 3;
  Type type = 4;
}

message String {
  optional Position pos = 1;
}

message StringValue {
  optional Position pos = 1;
  string value = 2;
}

message Time {
  optional Position pos = 1;
}

message Topic {
  optional Position pos = 1;
  optional TopicRuntime runtime = 31634;
  repeated string comments = 2;
  bool export = 3;
  string name = 4;
  Type event = 5;
}

message TopicRuntime {
  repeated string kafka_brokers = 1;
  string topic_id = 2;
}

message TopicRuntimeEvent {
  string id = 1;
  TopicRuntime payload = 2;
}

// Type represents a Type Node in the schema grammar.
message Type {
  oneof value {
    Any any = 9;
    Array array = 7;
    Bool bool = 5;
    Bytes bytes = 4;
    Float float = 2;
    Int int = 1;
    Map map = 8;
    Optional optional = 12;
    Ref ref = 11;
    String string = 3;
    Time time = 6;
    Unit unit = 10;
  }
}

message TypeAlias {
  optional Position pos = 1;
  repeated string comments = 2;
  bool export = 3;
  string name = 4;
  Type type = 5;
  repeated Metadata metadata = 6;
}

message TypeParameter {
  optional Position pos = 1;
  string name = 2;
}

message TypeValue {
  optional Position pos = 1;
  Type value = 2;
}

message Unit {
  optional Position pos = 1;
}

// Value represents a value Node in the schema grammar.
message Value {
  oneof value {
    IntValue int_value = 2;
    StringValue string_value = 1;
    TypeValue type_value = 3;
  }
}

message Verb {
  optional Position pos = 1;
  repeated string comments = 2;
  bool export = 3;
  string name = 4;
  Type request = 5;
  Type response = 6;
  repeated Metadata metadata = 7;
  optional VerbRuntime runtime = 31634;
}

message VerbRuntime {
  VerbRuntimeBase base = 1;
  optional VerbRuntimeSubscription subscription = 2;
}

message VerbRuntimeBase {
  optional google.protobuf.Timestamp create_time = 1;
  optional google.protobuf.Timestamp start_time = 2;
}

message VerbRuntimeEvent {
  string id = 1;
  VerbRuntimePayload payload = 2;
}

message VerbRuntimePayload {
  oneof value {
    VerbRuntimeBase verb_runtime_base = 1;
    VerbRuntimeSubscription verb_runtime_subscription = 2;
  }
}

message VerbRuntimeSubscription {
  repeated string kafka_brokers = 1;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy