mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-30 00:09:07 +01:00
📝 Add docstrings to mdm_integration
Docstrings generation was requested by @riccardomanfrin. * https://github.com/netbirdio/netbird/pull/6374#issuecomment-4658991606 The following files were modified: * `client/cmd/debug.go` * `client/cmd/root.go` * `client/internal/profilemanager/config.go` * `client/mdm/policy.go` * `client/mdm/policy_darwin.go` * `client/mdm/policy_mobile.go` * `client/mdm/policy_other.go` * `client/mdm/policy_windows.go` * `client/mdm/ticker.go` * `client/server/mdm.go` * `client/server/server.go` * `client/ui/client_ui.go` * `docs/netbird-macos.sh`
This commit is contained in:
+10
-1
@@ -363,7 +363,16 @@ func (s *Server) SetConfig(callerCtx context.Context, msg *proto.SetConfigReques
|
||||
// fields (DNS labels, NAT external IPs). Extracted from SetConfig to
|
||||
// keep the handler's cognitive complexity below the SonarCube
|
||||
// threshold; the body of this function is intentionally linear and
|
||||
// branchy because each proto field is its own optional case.
|
||||
// setConfigInputFromRequest builds a profilemanager.ConfigInput from a SetConfigRequest proto.
|
||||
//
|
||||
// It translates each provided proto field into the corresponding ConfigInput field,
|
||||
// preserving the request's semantics for "clean" vs explicit-empty slices/bytes and
|
||||
// converting optional numeric fields into typed pointers where applicable.
|
||||
//
|
||||
// msg: the incoming SetConfigRequest whose fields are mapped into the returned ConfigInput.
|
||||
//
|
||||
// Returns the constructed ConfigInput and a non-nil error if the active profile file path
|
||||
// cannot be determined.
|
||||
func setConfigInputFromRequest(msg *proto.SetConfigRequest) (profilemanager.ConfigInput, error) {
|
||||
var config profilemanager.ConfigInput
|
||||
|
||||
|
||||
Reference in New Issue
Block a user