public

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 116 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Event payload can be up to 512k in size
	MaxEventSize = config.MaxWebhookPayloadSize

	// The size of the stage execution outputs can be up to 4k
	MaxExecutionOutputsSize = 4 * 1024
)
View Source
const HideLicenseExpiryBannerEnv = "SUPERPLANE_LICENSE_HIDE_EXPIRY_BANNER"

HideLicenseExpiryBannerEnv hides the license expiry banner when it is "yes" or "true". The default is "no", so the banner stays visible.

View Source
const MaxLicenseRequestBytes = 64 * 1024

MaxLicenseRequestBytes limits the install request body. A license is much smaller than this limit.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountLicense

type AccountLicense struct {
	Edition          string     `json:"edition"`
	Features         []string   `json:"features"`
	State            string     `json:"state,omitempty"`
	ExpiresAt        *time.Time `json:"expires_at,omitempty"`
	HideExpiryBanner bool       `json:"hide_expiry_banner,omitempty"`
}

AccountLicense tells the UI which Enterprise features are available. Only installation administrators receive the license state and expiry.

type AccountLinkedAccountResponse

type AccountLinkedAccountResponse struct {
	Provider   string `json:"provider"`
	ProviderID string `json:"provider_id"`
	Username   string `json:"username"`
	Name       string `json:"name,omitempty"`
	AvatarURL  string `json:"avatar_url,omitempty"`
	Active     bool   `json:"active"`
}

AccountLinkedAccountResponse describes an identity the member owns on another service. It is not a sign-in method, so it carries no email or token.

type AccountOrganizationPendingDeletion

type AccountOrganizationPendingDeletion struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type AccountProviderResponse

type AccountProviderResponse struct {
	Provider string `json:"provider"`
	Email    string `json:"email,omitempty"`
	Username string `json:"username,omitempty"`
}

type AccountResponse

type AccountResponse struct {
	ID                           string                               `json:"id"`
	Name                         string                               `json:"name"`
	Email                        string                               `json:"email"`
	AvatarURL                    string                               `json:"avatar_url"`
	InstallationAdmin            bool                                 `json:"installation_admin"`
	HasPassword                  bool                                 `json:"has_password"`
	Providers                    []AccountProviderResponse            `json:"providers"`
	LinkedAccounts               []AccountLinkedAccountResponse       `json:"linked_accounts"`
	OrganizationsPendingDeletion []AccountOrganizationPendingDeletion `json:"organizations_pending_deletion"`
	SupportSession               *AccountSupportSession               `json:"support_session,omitempty"`
	License                      AccountLicense                       `json:"license"`
	BillingEnabled               bool                                 `json:"billing_enabled"`
}

type AccountSupportSession

type AccountSupportSession struct {
	Active   bool   `json:"active"`
	UserName string `json:"user_name,omitempty"`
}

type OrganizationCreationRequest

type OrganizationCreationRequest struct {
	Name string `json:"name"`
}

type Server

type Server struct {
	Router *mux.Router

	BasePath        string
	BaseURL         string
	WebhooksBaseURL string
	// contains filtered or unexported fields
}

func NewServer

func NewServer(
	encryptor crypto.Encryptor,
	registry *registry.Registry,
	jwtSigner *jwt.Signer,
	oidcProvider oidc.Provider,
	basePath string,
	baseURL string,
	webhooksBaseURL string,
	appEnv string,
	templateDir string,
	authorizationService authorization.Authorization,
	blockSignup bool,
	middlewares ...mux.MiddlewareFunc,
) (*Server, error)

func (*Server) Close

func (s *Server) Close()

func (*Server) HandleBitbucketForgeDelivery

func (s *Server) HandleBitbucketForgeDelivery(w http.ResponseWriter, r *http.Request)

HandleBitbucketForgeDelivery accepts a Forge lifecycle, scheduled, or bootstrap call. The Forge Invocation Token is the credential. The system token is encrypted and cached. It is never written to the log.

func (*Server) HandleBitbucketForgeEvent

func (s *Server) HandleBitbucketForgeEvent(w http.ResponseWriter, r *http.Request)

func (*Server) HandleBitbucketForgeUninstall

func (s *Server) HandleBitbucketForgeUninstall(w http.ResponseWriter, r *http.Request)

HandleBitbucketForgeUninstall accepts the Forge preUninstall call. Forge has no uninstall lifecycle event, so this route always clears the cached system token.

func (*Server) HandleGitHubAppCreated

func (s *Server) HandleGitHubAppCreated(w http.ResponseWriter, r *http.Request)

func (*Server) HandleGitHubAppManifest

func (s *Server) HandleGitHubAppManifest(w http.ResponseWriter, r *http.Request)

func (*Server) HandleGitHubAppSetup

func (s *Server) HandleGitHubAppSetup(w http.ResponseWriter, r *http.Request)

HandleGitHubAppSetup handles only GitHub's installation and repository settings redirect. Signed webhooks are authoritative for catalog state.

func (*Server) HandleGitHubAppWebhook

func (s *Server) HandleGitHubAppWebhook(w http.ResponseWriter, r *http.Request)

HandleGitHubAppWebhook validates the public App signature and updates the global catalog. Repository events reach nodes through the repository hook that WebhookProvisioner registers for each webhook, so this endpoint does not deliver them.

func (*Server) HandleIntegrationRequest added in v0.5.0

func (s *Server) HandleIntegrationRequest(w http.ResponseWriter, r *http.Request)

func (*Server) HandleJiraOAuthCallback

func (s *Server) HandleJiraOAuthCallback(w http.ResponseWriter, r *http.Request)

HandleJiraOAuthCallback finishes SuperPlane's hosted Atlassian OAuth app. Atlassian sends every grant to this one callback. The CSRF state finds the pending SuperPlane connection and is consumed on this first attempt.

func (*Server) HandleLinearAppWebhook

func (s *Server) HandleLinearAppWebhook(w http.ResponseWriter, r *http.Request)

HandleLinearAppWebhook receives events from a Linear OAuth application webhook. One URL serves every workspace that authorized the application. SuperPlane verifies the signing secret, then runs the triggers that listen to that team.

func (*Server) HandleLinearOAuthCallback

func (s *Server) HandleLinearOAuthCallback(w http.ResponseWriter, r *http.Request)

HandleLinearOAuthCallback finishes SuperPlane's hosted Linear OAuth app. Linear sends every grant to this one callback. The CSRF state finds the pending SuperPlane connection and is consumed on this first attempt.

func (*Server) HandleMCPOAuthCallback

func (s *Server) HandleMCPOAuthCallback(w http.ResponseWriter, r *http.Request)

func (*Server) HandleMCPOAuthClientMetadata

func (s *Server) HandleMCPOAuthClientMetadata(w http.ResponseWriter, r *http.Request)

func (*Server) HandleSentryAppInstall

func (s *Server) HandleSentryAppInstall(w http.ResponseWriter, r *http.Request)

HandleSentryAppInstall starts a public SuperPlane Sentry app install. The CSRF state finds the pending SuperPlane connection, then the browser opens Sentry.

func (*Server) HandleSentryAppSetup

func (s *Server) HandleSentryAppSetup(w http.ResponseWriter, r *http.Request)

HandleSentryAppSetup finishes a public SuperPlane Sentry app install. Sentry sends every install to this one Redirect URL. The CSRF cookie or the signed-in user finds the pending SuperPlane connection.

func (*Server) HandleSentryAppWebhook

func (s *Server) HandleSentryAppWebhook(w http.ResponseWriter, r *http.Request)

HandleSentryAppWebhook receives issue events for the public SuperPlane Sentry app. One Sentry install can map to more than one SuperPlane connection.

func (*Server) HandleWebhook

func (s *Server) HandleWebhook(w http.ResponseWriter, r *http.Request)

func (*Server) HealthCheck

func (s *Server) HealthCheck(w http.ResponseWriter, r *http.Request)

func (*Server) InitRouter

func (s *Server) InitRouter(additionalMiddlewares ...mux.MiddlewareFunc)

func (*Server) RegisterGRPCGateway

func (s *Server) RegisterGRPCGateway(services *grpc.Services) error

func (*Server) RegisterOpenAPIHandler

func (s *Server) RegisterOpenAPIHandler()

RegisterOpenAPIHandler adds handlers to serve the OpenAPI specification and Swagger UI

func (*Server) RegisterWebRoutes

func (s *Server) RegisterWebRoutes(webBasePath string)

func (*Server) RegisterWebSocketRoutes

func (s *Server) RegisterWebSocketRoutes()

RegisterWebSocketRoutes registers canvas, agent-session, factory, and user-notification WebSocket endpoints.

func (*Server) Serve

func (s *Server) Serve(host string, port int) error

func (*Server) SetBillingHTTPRegistrar

func (s *Server) SetBillingHTTPRegistrar(registrar billing.HTTPRegistrar)

SetBillingHTTPRegistrar installs billing routes before the web routes start.

func (*Server) SetLicenseService

func (s *Server) SetLicenseService(service *licensing.Service)

SetLicenseService connects the installation license. Without it, the server runs in Community mode and grants no Enterprise features.

func (*Server) WebsocketHub

func (s *Server) WebsocketHub() *ws.Hub

WebsocketHub returns the websocket hub for this server

type SetupOwnerProgressRequest

type SetupOwnerProgressRequest struct {
	Step string `json:"step"`
}

type SetupOwnerRequest

type SetupOwnerRequest struct {
	Email              string `json:"email"`
	FirstName          string `json:"first_name"`
	LastName           string `json:"last_name"`
	Password           string `json:"password"`
	ShareOwnerIdentity bool   `json:"share_owner_identity"`
}

type SetupOwnerResponse

type SetupOwnerResponse struct {
	OrganizationID   string `json:"organization_id"`
	OrganizationSlug string `json:"organization_slug"`
}

type SetupOwnerStatusResponse

type SetupOwnerStatusResponse struct {
	Status           string `json:"status"`
	Step             string `json:"step,omitempty"`
	BeaconEnabled    bool   `json:"beacon_enabled"`
	InstallationType string `json:"installation_type"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL