syntax = "proto3"; package kratos.api; option go_package = "kra/internal/conf;conf"; import "google/protobuf/duration.proto"; message Bootstrap { Server server = 1; Data data = 2; AdminBackend admin = 3; } message Server { message HTTP { string network = 1; string addr = 2; google.protobuf.Duration timeout = 3; } message GRPC { string network = 1; string addr = 2; google.protobuf.Duration timeout = 3; } HTTP http = 1; GRPC grpc = 2; } message Data { message Database { string driver = 1; string source = 2; string host = 3; string port = 4; string user = 5; string password = 6; string name = 7; string config = 8; string path = 9; } message Redis { string network = 1; string addr = 2; google.protobuf.Duration read_timeout = 3; google.protobuf.Duration write_timeout = 4; } Database database = 1; Redis redis = 2; } // AdminBackend contains settings for the administration HTTP transport. message AdminBackend { string router_prefix = 1; JWT jwt = 2; Captcha captcha = 3; Local local = 4; Email email = 5; Storage storage = 6; // ConfigPath is populated by the entrypoint and is not required in YAML. string config_path = 7; message JWT { string signing_key = 1; google.protobuf.Duration expires_time = 2; google.protobuf.Duration buffer_time = 3; string issuer = 4; } message Captcha { int32 key_long = 1; int32 img_width = 2; int32 img_height = 3; google.protobuf.Duration store_expiration = 4; } message Local { string store_path = 1; string path_prefix = 2; } message Email { string to = 1; string from = 2; string host = 3; string secret = 4; string nickname = 5; int32 port = 6; bool is_ssl = 7; bool is_login_auth = 8; } message Storage { string type = 1; Qiniu qiniu = 2; ObjectStore aliyun_oss = 3; ObjectStore huawei_obs = 4; ObjectStore tencent_cos = 5; ObjectStore aws_s3 = 6; ObjectStore cloudflare_r2 = 7; ObjectStore minio = 8; } message Qiniu { string zone = 1; string bucket = 2; string base_url = 3; string access_key = 4; string secret_key = 5; bool use_https = 6; bool use_cdn_domains = 7; } // ObjectStore covers S3-compatible configuration used by public cloud // providers and self-hosted MinIO. message ObjectStore { string endpoint = 1; string region = 2; string bucket = 3; string access_key = 4; string secret_key = 5; string base_url = 6; string path_prefix = 7; bool use_ssl = 8; bool force_path_style = 9; string account_id = 10; } }