export function isSupportedGatewaySecretInputPath(
path: string,
): path is SupportedGatewaySecretInputPath { return ALL_GATEWAY_SECRET_INPUT_PATHS.includes(path as SupportedGatewaySecretInputPath);
}
export function readGatewaySecretInputValue(
config: OpenClawConfig,
path: SupportedGatewaySecretInputPath,
): unknown { if (path === "gateway.auth.token") { return config.gateway?.auth?.token;
} if (path === "gateway.auth.password") { return config.gateway?.auth?.password;
} if (path === "gateway.remote.token") { return config.gateway?.remote?.token;
} return config.gateway?.remote?.password;
}
export function assignResolvedGatewaySecretInput(params: {
config: OpenClawConfig;
path: SupportedGatewaySecretInputPath;
value: string | undefined;
}): void { const { config, path, value } = params; if (path === "gateway.auth.token") { if (config.gateway?.auth) {
config.gateway.auth.token = value;
} return;
} if (path === "gateway.auth.password") { if (config.gateway?.auth) {
config.gateway.auth.password = value;
} return;
} if (path === "gateway.remote.token") { if (config.gateway?.remote) {
config.gateway.remote.token = value;
} return;
} if (config.gateway?.remote) {
config.gateway.remote.password = value;
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.