github.com/tickoalcantara12/micro/v3@v3.0.0-20221007104245-9d75b9bcbab9/proto/config/config.proto (about)

     1  syntax = "proto3";
     2  
     3  package config;
     4  
     5  option go_package = "github.com/tickoalcantara12/micro/v3/proto/config;config";
     6  
     7  service Config {
     8  	rpc Get(GetRequest) returns (GetResponse) {}
     9  	rpc Set(SetRequest) returns (SetResponse) {}
    10  	rpc Delete(DeleteRequest) returns (DeleteResponse) {}
    11  	// These methods are here for backwards compatibility reasons
    12  	rpc Read(ReadRequest) returns (ReadResponse) {}
    13  }
    14  
    15  message Value {
    16  	string data = 1;
    17  	string format = 2;
    18  }
    19  
    20  message Options {
    21  	// Is it an encrypted value?
    22  	bool secret = 1;
    23  }
    24  
    25  message SetRequest {
    26  	string namespace = 1;
    27  	string path = 2;
    28  	Value value = 3;
    29  	Options options = 4;
    30  }
    31  
    32  message SetResponse {}
    33  
    34  message DeleteRequest {
    35  	string namespace = 1;
    36  	string path = 2;
    37  }
    38  
    39  message DeleteResponse {}
    40  
    41  message GetRequest {
    42  	string namespace = 1;
    43  	string path = 2;
    44  	Options options = 3;
    45  }
    46  
    47  message GetResponse {
    48  	Value value = 1;
    49  }
    50  
    51  // Below definitions are only here for backwards compatibility
    52  
    53  message ReadRequest {
    54  	string namespace = 1;
    55  	string path = 2;
    56  }
    57  
    58  message ReadResponse {
    59  	Change change = 1;
    60  }
    61  
    62  message Change {
    63  	string namespace = 1;
    64  	string path = 2;
    65  	ChangeSet changeSet = 3;
    66  }
    67  
    68  message ChangeSet {
    69  	string data = 1;
    70  	string checksum = 2;
    71  	string format = 3;
    72  	string source = 4;
    73  	int64 timestamp = 5;
    74  }