MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / SetCloudMode

Method SetCloudMode

internal/server/server.go:472–487  ·  view source on GitHub ↗

SetCloudMode enables cloud mode with the shared sidecar secret(s). Accepts a comma-separated list of secrets for rotation support: "new-key,old-key" — both are accepted for INBOUND calls from pad-cloud. The OUTBOUND direction (pad → pad-cloud, see SetCloudSidecar) is configured separately via PAD_CL

(secret string)

Source from the content-addressed store, hash-verified

470// configured separately via PAD_CLOUD_OUTBOUND_SECRET or derived from the
471// last entry of this list — see cmd/pad/main.go for the resolution order.
472func (s *Server) SetCloudMode(secret string) {
473 s.cloudMode = true
474 for _, k := range strings.Split(secret, ",") {
475 k = strings.TrimSpace(k)
476 if k != "" {
477 s.cloudSecrets = append(s.cloudSecrets, k)
478 }
479 }
480 // Propagate to the email sender so transactional emails carry the
481 // getpad.dev marketing footer (docs/brand.md §7) on Cloud installs.
482 // Self-hosted deployments leave cloudMode false on the sender, keeping
483 // outgoing mail neutral so operators can ship under their own brand.
484 if s.email != nil {
485 s.email.SetCloudMode(true)
486 }
487}
488
489// CloudSidecar is the reverse pad → pad-cloud client interface. Concrete
490// implementation lives in internal/billing so server has no direct Stripe

Calls

no outgoing calls