Skip to content

Commit 1049de5

Browse files
committed
litrpc+server: show cfg in ListAutopilotFeatures
We pass on default configuration to litrpc in order to display them in the list features call.
1 parent 930bb86 commit 1049de5

File tree

4 files changed

+76
-54
lines changed

4 files changed

+76
-54
lines changed

litrpc/lit-autopilot.pb.go

Lines changed: 65 additions & 53 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

litrpc/lit-autopilot.proto

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,11 @@ message Feature {
161161
feature rules set contains a rule that Litd is unaware of.
162162
*/
163163
bool requires_upgrade = 5;
164+
165+
/*
166+
The JSON-marshaled representation of a feature's default configuration.
167+
*/
168+
string default_config = 6;
164169
}
165170

166171
message RuleValues {
@@ -196,4 +201,4 @@ message Permissions {
196201
A list of the permissions required for this method.
197202
*/
198203
repeated MacaroonPermission operations = 2;
199-
}
204+
}

litrpc/lit-autopilot.swagger.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,10 @@
265265
"requires_upgrade": {
266266
"type": "boolean",
267267
"description": "A boolean indicating if the user would need to upgrade their Litd version in\norder to subscribe to the Autopilot feature. This will be true if the\nfeature rules set contains a rule that Litd is unaware of."
268+
},
269+
"default_config": {
270+
"type": "string",
271+
"description": "The JSON-marshaled representation of a feature's default configuration."
268272
}
269273
}
270274
},

session_rpcserver.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,7 @@ func (s *sessionRpcServer) ListAutopilotFeatures(ctx context.Context,
815815
Rules: rules,
816816
PermissionsList: marshalPerms(f.Permissions),
817817
RequiresUpgrade: upgrade,
818+
DefaultConfig: string(f.DefaultConfig),
818819
}
819820
}
820821

0 commit comments

Comments
 (0)