func (h *SecretKeysHandler) GetSecretKeys(_ context.Context, sessionID int) (keybase1.SecretKeys, error) { ctx := engine.Context{ LogUI: h.getLogUI(sessionID), SecretUI: h.getSecretUI(sessionID), } eng := engine.NewSecretKeysEngine(h.G()) err := engine.RunEngine(eng, &ctx) if err != nil { return keybase1.SecretKeys{}, err } return eng.Result(), nil }
func (h *SecretKeysHandler) GetSecretKeys(_ context.Context, sessionID int) (keybase1.SecretKeys, error) { if h.G().Env.GetRunMode() == libkb.ProductionRunMode { return keybase1.SecretKeys{}, errors.New("GetSecretKeys is a devel-only RPC") } ctx := engine.Context{ LogUI: h.getLogUI(sessionID), SecretUI: h.getSecretUI(sessionID, h.G()), SessionID: sessionID, } eng := engine.NewSecretKeysEngine(h.G()) err := engine.RunEngine(eng, &ctx) if err != nil { return keybase1.SecretKeys{}, err } return eng.Result(), nil }