mirror of
https://codeberg.org/cunicu/cunicu.git
synced 2025-11-02 01:22:35 +08:00
57 lines
1.3 KiB
Protocol Buffer
57 lines
1.3 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package cunicu.rpc;
|
|
option go_package = "github.com/stv0g/cunicu/pkg/proto/rpc";
|
|
|
|
import "core/interface.proto";
|
|
import "common.proto";
|
|
import "rpc/event.proto";
|
|
import "rpc/invitation.proto";
|
|
|
|
message GetStatusParams {
|
|
string interface = 1;
|
|
bytes peer = 2;
|
|
}
|
|
|
|
message GetStatusResp {
|
|
repeated core.Interface interfaces = 1;
|
|
}
|
|
|
|
message SetConfigParams {
|
|
map<string, string> settings = 1;
|
|
}
|
|
|
|
message GetConfigParams {
|
|
string key_filter = 1;
|
|
}
|
|
|
|
message GetConfigResp {
|
|
map<string, string> settings = 1;
|
|
}
|
|
|
|
message AddPeerParams {
|
|
string interface = 1;
|
|
bytes public_key = 2;
|
|
string name = 3;
|
|
}
|
|
|
|
message AddPeerResp {
|
|
Invitation invitation = 1;
|
|
core.Interface interface = 2;
|
|
}
|
|
|
|
service Daemon {
|
|
rpc GetBuildInfo(Empty) returns (BuildInfo) {}
|
|
rpc StreamEvents(Empty) returns (stream Event) {}
|
|
rpc UnWait(Empty) returns (Empty) {}
|
|
rpc Stop(Empty) returns (Empty) {}
|
|
rpc Restart(Empty) returns (Empty) {}
|
|
rpc Sync(Empty) returns (Empty) {}
|
|
rpc GetStatus(GetStatusParams) returns (GetStatusResp) {}
|
|
|
|
rpc SetConfig(SetConfigParams) returns (Empty) {}
|
|
rpc GetConfig(GetConfigParams) returns (GetConfigResp) {}
|
|
rpc ReloadConfig(Empty) returns (Empty) {}
|
|
|
|
rpc AddPeer(AddPeerParams) returns (AddPeerResp) {}
|
|
} |