| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 | syntax = "proto3";package node;option go_package = "google.golang.org/protobuf/types/known/nodepb";service NodeService {    rpc Login(LoginRequest) returns (LoginResponse);    rpc CreateNode(CreateNodeReq) returns (CreateNodeRes);    rpc ReadNode(ReadNodeReq) returns (ReadNodeRes);    rpc UpdateNode(UpdateNodeReq) returns (UpdateNodeRes);    rpc DeleteNode(DeleteNodeReq) returns (DeleteNodeRes);    rpc GetPeers(GetPeersReq) returns (stream GetPeersRes);    rpc CheckIn(CheckInReq) returns (CheckInRes);}message LoginRequest {  string macaddress = 1;  string password = 2;  string network = 3;}message LoginResponse { string accesstoken = 1; }message Node {    string id = 1;    string name = 2;    string address = 3;    string address6 = 26;    int32 listenport = 4;    string publickey = 5;    string endpoint = 6;    string macaddress = 7;    string password = 8;    string nodenetwork = 9;    bool ispending = 10;    string postup = 11;    string postdown = 12;    int32 keepalive = 13;    bool saveconfig = 14;    string accesskey = 15;    string interface = 16;    string lastcheckin = 17;    string lastmodified = 18;    int32 checkininterval = 19;    string localaddress = 20;    string postchanges = 21;    string allowedips = 22;    bool islocal = 23;    bool isdualstack = 27;    bool dnsoff = 24;    string localrange = 25;}message CheckInResponse {    bool success = 1;    bool needpeerupdate = 2;    bool needconfigupdate = 3;    string nodemessage = 4;    bool ispending = 5;    bool needkeyupdate = 6;    bool needdelete = 7;}message PeersResponse {    bool isgateway = 1;    string gatewayrange = 2;    string publickey = 5;    string endpoint = 6;    string address = 3;    string address6 = 8;    int32 listenport = 4;    string localaddress = 7;    int32 keepalive = 13;}message CreateNodeReq {    Node node = 1; // Node id blank}message CreateNodeRes {    Node node = 1; // Node id filled in}message UpdateNodeReq {    Node node = 1;}message UpdateNodeRes {    Node node = 1;}message ReadNodeReq {    string macaddress = 1;    string network = 2;}message ReadNodeRes {    Node node = 1;}message DeleteNodeReq {    string macaddress = 1;    string networkName = 2;}message DeleteNodeRes {    bool success = 1;}message GetPeersReq {    string macaddress = 1;    string network = 2;}message GetPeersRes {    PeersResponse peers = 1;}message CheckInReq {    Node node = 1; //   bool postchanges = 2;}message CheckInRes {    CheckInResponse checkinresponse = 1;}
 |