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

Method SetCloudMode

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

555// configured separately via PAD_CLOUD_OUTBOUND_SECRET or derived from the
556// last entry of this list — see cmd/pad/main.go for the resolution order.
557func (s *Server) SetCloudMode(secret string) {
558 s.cloudMode = true
559 for _, k := range strings.Split(secret, ",") {
560 k = strings.TrimSpace(k)
561 if k != "" {
562 s.cloudSecrets = append(s.cloudSecrets, k)
563 }
564 }
565 // Propagate to the email sender so transactional emails carry the
566 // getpad.dev marketing footer (docs/brand.md §7) on Cloud installs.
567 // Self-hosted deployments leave cloudMode false on the sender, keeping
568 // outgoing mail neutral so operators can ship under their own brand.
569 if s.email != nil {
570 s.email.SetCloudMode(true)
571 }
572}
573
574// CloudSidecar is the reverse pad → pad-cloud client interface. Concrete
575// implementation lives in internal/billing so server has no direct Stripe

Calls

no outgoing calls