syntax = "proto3"; package v1; import "google/protobuf/wrappers.proto"; import "model.proto"; option go_package = "github.com/polarismesh/specification/source/go/api/v1/config_manage"; option java_package = "com.tencent.polaris.specification.api.v1.config.manage"; option java_outer_classname = "ConfigFileProto"; message ConfigFileGroup { google.protobuf.UInt64Value id = 1; google.protobuf.StringValue name = 2; google.protobuf.StringValue namespace = 3; google.protobuf.StringValue comment = 4; google.protobuf.StringValue create_time = 5; google.protobuf.StringValue create_by = 6; google.protobuf.StringValue modify_time = 7; google.protobuf.StringValue modify_by = 8; google.protobuf.UInt64Value fileCount = 9; repeated google.protobuf.StringValue user_ids = 10 [ json_name = "user_ids" ]; repeated google.protobuf.StringValue group_ids = 11 [ json_name = "group_ids" ]; repeated google.protobuf.StringValue remove_user_ids = 13 [ json_name = "remove_user_ids" ]; repeated google.protobuf.StringValue remove_group_ids = 14 [ json_name = "remove_group_ids" ]; google.protobuf.BoolValue editable = 15; google.protobuf.StringValue owner = 16; google.protobuf.StringValue business = 17; google.protobuf.StringValue department = 18; map metadata = 19; // 删除操作标志位 google.protobuf.BoolValue deleteable = 20; } message ConfigFile { google.protobuf.UInt64Value id = 1; google.protobuf.StringValue name = 2; google.protobuf.StringValue namespace = 3; google.protobuf.StringValue group = 4; google.protobuf.StringValue content = 5; google.protobuf.StringValue format = 6; google.protobuf.StringValue comment = 7; google.protobuf.StringValue status = 8; repeated ConfigFileTag tags = 9; google.protobuf.StringValue create_time = 10; google.protobuf.StringValue create_by = 11; google.protobuf.StringValue modify_time = 12; google.protobuf.StringValue modify_by = 13; google.protobuf.StringValue release_time = 14; google.protobuf.StringValue release_by = 15; // 是否为加密配置文件 google.protobuf.BoolValue encrypted = 16; // 加密算法 google.protobuf.StringValue encrypt_algo = 17; } message ConfigFileTag { google.protobuf.StringValue key = 1; google.protobuf.StringValue value = 2; } message ConfigFileRelease { google.protobuf.UInt64Value id = 1; google.protobuf.StringValue name = 2; google.protobuf.StringValue namespace = 3; google.protobuf.StringValue group = 4; google.protobuf.StringValue file_name = 5; google.protobuf.StringValue content = 6; google.protobuf.StringValue comment = 7; google.protobuf.StringValue md5 = 8; google.protobuf.UInt64Value version = 9; google.protobuf.StringValue create_time = 10; google.protobuf.StringValue create_by = 11; google.protobuf.StringValue modify_time = 12; google.protobuf.StringValue modify_by = 13; repeated ConfigFileTag tags = 14; // 当前生效配置 google.protobuf.BoolValue active = 15; google.protobuf.StringValue format = 16; google.protobuf.StringValue release_description = 17; google.protobuf.StringValue release_type = 18; // 配置灰度发布时需要匹配的客户端标签信息 repeated ClientLabel beta_labels = 19; } message ConfigFileReleaseHistory { google.protobuf.UInt64Value id = 1; google.protobuf.StringValue name = 2; google.protobuf.StringValue namespace = 3; google.protobuf.StringValue group = 4; google.protobuf.StringValue file_name = 5; google.protobuf.StringValue content = 6; google.protobuf.StringValue format = 7; google.protobuf.StringValue comment = 8; google.protobuf.StringValue md5 = 9; google.protobuf.StringValue type = 10; google.protobuf.StringValue status = 11; repeated ConfigFileTag tags = 12; google.protobuf.StringValue create_time = 13; google.protobuf.StringValue create_by = 14; google.protobuf.StringValue modify_time = 15; google.protobuf.StringValue modify_by = 16; // 配置发布失败的原因 google.protobuf.StringValue reason = 17; google.protobuf.StringValue release_description = 18; } message ConfigFileTemplate { google.protobuf.UInt64Value id = 1; google.protobuf.StringValue name = 2; google.protobuf.StringValue content = 3; google.protobuf.StringValue format = 4; google.protobuf.StringValue comment = 5; google.protobuf.StringValue create_time = 6; google.protobuf.StringValue create_by = 7; google.protobuf.StringValue modify_time = 8; google.protobuf.StringValue modify_by = 9; } message ClientConfigFileInfo { google.protobuf.StringValue namespace = 1; google.protobuf.StringValue group = 2; google.protobuf.StringValue file_name = 3; google.protobuf.StringValue content = 4; google.protobuf.UInt64Value version = 5; google.protobuf.StringValue md5 = 6; repeated ConfigFileTag tags = 7; // 是否为加密配置文件 google.protobuf.BoolValue encrypted = 8; // 公钥,用于加密数据密钥 google.protobuf.StringValue public_key = 9; // 配置文件版本名称 google.protobuf.StringValue name = 10; // 配置文件的发布时间 google.protobuf.StringValue release_time = 11 [ json_name = "release_time" ]; } message ClientWatchConfigFileRequest { google.protobuf.StringValue client_ip = 1; google.protobuf.StringValue service_name = 2; repeated ClientConfigFileInfo watch_files = 3; } message ConfigFileExportRequest { google.protobuf.StringValue namespace = 1; repeated google.protobuf.StringValue groups = 2; repeated google.protobuf.StringValue names = 3; } message ConfigFilePublishInfo { google.protobuf.StringValue release_name = 1 [ json_name = "release_name" ]; google.protobuf.StringValue namespace = 2; google.protobuf.StringValue group = 3; google.protobuf.StringValue file_name = 4 [ json_name = "file_name" ]; google.protobuf.StringValue content = 5; google.protobuf.StringValue comment = 6; google.protobuf.StringValue format = 7; google.protobuf.StringValue release_description = 8 [ json_name = "release_description" ]; google.protobuf.StringValue create_by = 11 [ json_name = "create_by" ]; google.protobuf.StringValue modify_by = 13 [ json_name = "modify_by" ]; repeated ConfigFileTag tags = 14; google.protobuf.StringValue md5 = 15; // 是否为加密配置文件 google.protobuf.BoolValue encrypted = 16; // 加密算法 google.protobuf.StringValue encrypt_algo = 17; } message ConfigFileGroupRequest { google.protobuf.StringValue revision = 1; ConfigFileGroup config_file_group = 2 [ json_name = "config_file_group" ]; // 配置标签 map client_labels = 12 [ json_name = "client_labels" ]; } message ConfigDiscoverRequest { enum ConfigDiscoverRequestType { UNKNOWN = 0; CONFIG_FILE = 1; CONFIG_FILE_Names = 2; CONFIG_FILE_GROUPS = 3; } ConfigDiscoverRequestType type = 1; ClientConfigFileInfo config_file = 2 [ json_name = "config_file" ]; string revision = 3; } message ConfigDiscoverResponse { enum ConfigDiscoverResponseType { UNKNOWN = 0; CONFIG_FILE = 1; CONFIG_FILE_Names = 2; CONFIG_FILE_GROUPS = 3; } uint32 code = 1; string info = 2; string revision = 3; ConfigDiscoverResponseType type = 4; ClientConfigFileInfo config_file = 5 [ json_name = "config_file" ]; repeated ClientConfigFileInfo config_file_names = 6 [ json_name = "config_file_names" ]; repeated ConfigFileGroup config_file_groups = 7 [ json_name = "config_file_groups" ]; }