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

Method SetCloudMode

internal/server/server.go:428–443  ·  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

426// configured separately via PAD_CLOUD_OUTBOUND_SECRET or derived from the
427// last entry of this list — see cmd/pad/main.go for the resolution order.
428func (s *Server) SetCloudMode(secret string) {
429 s.cloudMode = true
430 for _, k := range strings.Split(secret, ",") {
431 k = strings.TrimSpace(k)
432 if k != "" {
433 s.cloudSecrets = append(s.cloudSecrets, k)
434 }
435 }
436 // Propagate to the email sender so transactional emails carry the
437 // getpad.dev marketing footer (docs/brand.md §7) on Cloud installs.
438 // Self-hosted deployments leave cloudMode false on the sender, keeping
439 // outgoing mail neutral so operators can ship under their own brand.
440 if s.email != nil {
441 s.email.SetCloudMode(true)
442 }
443}
444
445// CloudSidecar is the reverse pad → pad-cloud client interface. Concrete
446// implementation lives in internal/billing so server has no direct Stripe

Calls

no outgoing calls