github.com/Kindred87/Obsidian@v0.0.0-20210809203756-86936424b848/api/obsidian.proto (about)

     1  syntax = "proto3";
     2  
     3  option go_package = "github.com/Kindred/Obsidian/api";
     4  
     5  package api;
     6  
     7  service Obsidian {
     8      rpc AddDatasource(DatasourceAddRequest) returns (Response) {}
     9      rpc CheckForDatasource(CheckDatasourceRequest) returns (CheckDatasourceResponse) {}
    10      rpc HTMLNodeHelper(HTMLNodeRequest) returns (HTMlNodeResponse) {}
    11      rpc HTMLSearch(HTMLSearchRequest) returns (HTMLSearchResponse) {}
    12  }
    13  
    14  message Response {
    15      string Message = 1;
    16  }
    17  
    18  // For specifying parameters of a new datasource
    19  message DatasourceAddRequest {
    20  
    21      bool overwrite_existing_config = 1;
    22      string datasource_name = 2;
    23      bool search_in_program_directory = 3;
    24      repeated string directories_to_search = 4;
    25      FileType file_extension = 5;
    26      repeated FileSpec filename_specifications = 6;
    27      bool require_all_value_specifications = 7;
    28      repeated ValueSpec value_specifications = 8;
    29  }
    30  
    31  enum FileType {
    32      CSV = 0;
    33      XLXS = 1;
    34      HTML = 2;
    35  }
    36  
    37  message FileSpec {
    38      string Filename =  1;
    39      bool FilenameIsSubstring =  2;
    40  }
    41  
    42  message ValueSpec {
    43      string Value = 1;
    44      bool IsSubstring = 2;
    45      int32 InRow = 3;
    46      int32 InColumn = 4;
    47      bool AnyPage = 5;
    48      int32 OnPage = 6;
    49  }
    50  
    51  message CheckDatasourceRequest {
    52      string DatasourceAlias = 1;
    53  }
    54  
    55  message CheckDatasourceResponse {
    56      string Message = 1;
    57      string FilePath = 2;
    58  }
    59  
    60  message HTMLNodeRequest {
    61      bool Help = 1;
    62      string DatasourceAlias = 2;
    63      int32 ParentLimit = 3;
    64      repeated string ValuesToFind = 4;
    65  }
    66  
    67  message HTMlNodeResponse {
    68      repeated string Message = 1;
    69      repeated HTMLNodeList NodeList = 2;
    70  }
    71  
    72  message HTMLNodeList {
    73      string Name = 1;
    74      repeated string Nodes = 2;
    75  }
    76  
    77  message HTMLSearchRequest {
    78      string DatasourceAlias = 1;
    79      repeated HTMLSearchGroup SearchGroups = 2;
    80  }
    81  
    82  message HTMLSearchGroup {
    83      repeated string Values = 1;
    84  }
    85  
    86  message HTMLSearchResponse {
    87      repeated string Message = 1;
    88      repeated HTMLNodeList Results = 2;
    89  }
    90  
    91