From 65f76cd6956556b6b94e60b80c5317a21baa0cea Mon Sep 17 00:00:00 2001 From: Timm Fitschen <t.fitschen@indiscale.com> Date: Wed, 4 Aug 2021 14:24:29 +0200 Subject: [PATCH] STY: formatting --- Makefile | 5 ++ proto/caosdb/entity/v1alpha1/main.proto | 62 ++++++++++++++++--------- 2 files changed, 46 insertions(+), 21 deletions(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..99bee6f --- /dev/null +++ b/Makefile @@ -0,0 +1,5 @@ +ALL: + @echo "THIS IS ONLY FOR DEVELOPMENT. DON'T USE IT" + +formatting: + clang-format -i $$(find proto/ -type f -iname "*.proto") diff --git a/proto/caosdb/entity/v1alpha1/main.proto b/proto/caosdb/entity/v1alpha1/main.proto index 2727696..9145096 100644 --- a/proto/caosdb/entity/v1alpha1/main.proto +++ b/proto/caosdb/entity/v1alpha1/main.proto @@ -121,7 +121,8 @@ enum MessageCode { // TODO(tf) Could not move file to it's target folder. MESSAGE_CODE_CANNOT_MOVE_FILE_TO_TARGET_PATH = 31; - // TODO(tf) Cannot parse value to datetime format (yyyy-mm-dd'T'hh:mm:ss[.fffffffff][TimeZone]). + // TODO(tf) Cannot parse value to datetime format + // (yyyy-mm-dd'T'hh:mm:ss[.fffffffff][TimeZone]). MESSAGE_CODE_CANNOT_PARSE_DATETIME_VALUE = 32; // TODO(tf) Cannot parse value to double. @@ -130,7 +131,8 @@ enum MessageCode { // TODO(tf) Cannot parse value to integer. MESSAGE_CODE_CANNOT_PARSE_INT_VALUE = 34; - // TODO(tf) Cannot parse value to boolean (either 'true' or 'false', ignoring case). + // TODO(tf) Cannot parse value to boolean (either 'true' or 'false', ignoring + // case). MESSAGE_CODE_CANNOT_PARSE_BOOL_VALUE = 35; // TODO(tf) Could not connect to MySQL server. @@ -139,7 +141,8 @@ enum MessageCode { // TODO(tf) Please check if your MySQL has all required procedures installed. MESSAGE_CODE_MYSQL_PROCEDURE_EXCEPTION = 37; - // TODO(tf) This error occurred while parsing the xml. Probably it has a wrong encoding. + // TODO(tf) This error occurred while parsing the xml. Probably it has a wrong + // encoding. MESSAGE_CODE_REQUEST_HAS_WRONG_ENCODING = 38; // TODO(tf) Request body didn't contain the expected Elements. @@ -154,10 +157,12 @@ enum MessageCode { // TODO(tf) Could not move file to tmp folder. MESSAGE_CODE_CANNOT_MOVE_FILE_TO_TMP = 42; - // TODO(tf) Insufficient read permission for this file. Please make it readable. + // TODO(tf) Insufficient read permission for this file. Please make it + // readable. MESSAGE_CODE_CANNOT_READ_FILE = 43; - // TODO(tf) Insufficient read permission for this file's thumbnail. Please make it readable. + // TODO(tf) Insufficient read permission for this file's thumbnail. Please + // make it readable. MESSAGE_CODE_CANNOT_READ_THUMBNAIL = 44; // TODO(tf) No file representation submitted. @@ -172,7 +177,8 @@ enum MessageCode { // TODO(tf) DESCRIPTION? MESSAGE_CODE_UNKNOWN_JOB = 48; - // TODO(tf) Name is already in use. Choose a different name or reuse an existing entity. + // TODO(tf) Name is already in use. Choose a different name or reuse an + // existing entity. MESSAGE_CODE_NAME_IS_NOT_UNIQUE = 49; // TODO(tf) This entity cannot be identified uniquely due to name dublicates @@ -184,19 +190,22 @@ enum MessageCode { // TODO(tf) This entity is empty. MESSAGE_CODE_ENTITY_IS_EMPTY = 52; - // TODO(tf) An unknown error occured during the transaction and it was rolled back. + // TODO(tf) An unknown error occured during the transaction and it was rolled + // back. MESSAGE_CODE_TRANSACTION_ROLL_BACK = 53; // TODO(tf) The file upload failed for an unknown reason. MESSAGE_CODE_FILE_UPLOAD_FAILED = 54; - // TODO(tf) Unknown unit. Values with this unit cannot be converted to other units when used in search queries. + // TODO(tf) Unknown unit. Values with this unit cannot be converted to other + // units when used in search queries. MESSAGE_CODE_UNKNOWN_UNIT = 55; // TODO(tf) You are not allowed to do this. MESSAGE_CODE_AUTHORIZATION_ERROR = 56; - // TODO(tf) Reference not qualified. The value of this Reference Property is to be a child of its data type. + // TODO(tf) Reference not qualified. The value of this Reference Property is + // to be a child of its data type. MESSAGE_CODE_REFERENCE_IS_NOT_ALLOWED_BY_DATATYPE = 57; // TODO(tf) Cannot parse EntityACL. @@ -208,25 +217,32 @@ enum MessageCode { // TODO(tf) This data type cannot be identified due to name duplicates. MESSAGE_CODE_DATA_TYPE_NAME_DUPLICATES = 60; - // TODO(tf) This entity cannot be identified as it didn't come with a name or id. + // TODO(tf) This entity cannot be identified as it didn't come with a name or + // id. MESSAGE_CODE_ENTITY_HAS_NO_NAME_OR_ID = 61; // TODO(tf) Affiliation is not defined for this child-parent constellation. MESSAGE_CODE_AFFILIATION_ERROR = 62; - // TODO(tf) An error occured during the parsing of this query. Maybe you use a wrong syntax? + // TODO(tf) An error occured during the parsing of this query. Maybe you use a + // wrong syntax? MESSAGE_CODE_QUERY_PARSING_ERROR = 63; - // TODO(tf) A property which has 'name' as its parent must have a TEXT data type. + // TODO(tf) A property which has 'name' as its parent must have a TEXT data + // type. MESSAGE_CODE_NAME_PROPERTIES_MUST_BE_TEXT = 64; - // TODO(tf) This entity had parent duplicates. That is meaningless and only one parent had been inserted. + // TODO(tf) This entity had parent duplicates. That is meaningless and only + // one parent had been inserted. MESSAGE_CODE_PARENT_DUPLICATES_WARNING = 65; - // TODO(tf) This entity had parent duplicates. Parent duplicates are meaningless and would be ignored (and inserted only once). But these parents had diverging inheritance instructions which cannot be processed. + // TODO(tf) This entity had parent duplicates. Parent duplicates are + // meaningless and would be ignored (and inserted only once). But these + // parents had diverging inheritance instructions which cannot be processed. MESSAGE_CODE_PARENT_DUPLICATES_ERROR = 66; - // TODO(tf) One or more entities are not qualified. None of them have been inserted/updated/deleted. + // TODO(tf) One or more entities are not qualified. None of them have been + // inserted/updated/deleted. MESSAGE_CODE_ATOMICITY_ERROR = 67; // TODO(tf) There is no such role '" + role + "'. @@ -244,7 +260,8 @@ enum MessageCode { // TODO(tf) This reference cannot be identified due to name duplicates. MESSAGE_CODE_REFERENCE_NAME_DUPLICATES = 72; - // TODO(tf) The datatype which is to be inherited could not be detected due to divergent datatypes of at least two parents. + // TODO(tf) The datatype which is to be inherited could not be detected due to + // divergent datatypes of at least two parents. MESSAGE_CODE_DATATYPE_INHERITANCE_AMBIGUOUS = 73; // TODO(tf) This datatype does not accept collections of values (e.g. Lists). @@ -253,7 +270,8 @@ enum MessageCode { // TODO(tf) This unit cannot be parsed. MESSAGE_CODE_CANNOT_PARSE_UNIT = 75; - // TODO(tf) This property is an additional property which has no corresponding property among the properties of the parents. + // TODO(tf) This property is an additional property which has no corresponding + // property among the properties of the parents. MESSAGE_CODE_ADDITIONAL_PROPERTY = 76; // TODO(tf) This property overrides the datatype. @@ -368,7 +386,6 @@ message Parent { repeated Message infos = 6; } - // Response to a retrieve request message RetrieveResponse { // Payload of the retrieval @@ -384,7 +401,8 @@ message RetrieveResponse { // CaosDB Query message Query { - // The string representation of the query, e.g. "FIND Person WITH name = Aisha" + // The string representation of the query, e.g. "FIND Person WITH name = + // Aisha" string query = 1; } @@ -414,7 +432,8 @@ message QueryOrIdRequest { } } -// Single response containing either an id, a COUNT query result, a SELECT-table or complete entities. +// Single response containing either an id, a COUNT query result, a SELECT-table +// or complete entities. message TransactionResponse { // We wrap these together in order to make this a repeatable field in the // MultiTransactionResponse. @@ -480,5 +499,6 @@ message IdResponse { // Entity Transaction Service service EntityTransactionService { // Issue multiple mixed requests - rpc MultiTransaction(MultiTransactionRequest) returns (MultiTransactionResponse); + rpc MultiTransaction(MultiTransactionRequest) + returns (MultiTransactionResponse); } -- GitLab