installation

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2026 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultInstallationName

func DefaultInstallationName(repoName string) string

DefaultInstallationName derives a human-readable app name from a GitHub repository name. Example: preview-env-github-digitalocean -> Preview Env Github Digitalocean

func FetchCanvas

func FetchCanvas(repo *Repository) (*pb.Canvas, string, error)

FetchCanvas loads and parses canvas.yaml from a public GitHub repository.

func FindActiveUserForAccountInOrganization

func FindActiveUserForAccountInOrganization(accountID, organizationID uuid.UUID) (*models.User, error)

Types

type InstallRequest

type InstallRequest struct {
	Repo           string
	Name           string
	OrganizationID uuid.UUID
	AccountID      uuid.UUID
}

type InstallResult

type InstallResult struct {
	CanvasID       string
	OrganizationID string
}

type Preview

type Preview struct {
	Repo        string `json:"repo"`
	Owner       string `json:"owner"`
	Repository  string `json:"repository"`
	Ref         string `json:"ref"`
	Title       string `json:"title"`
	Description string `json:"description"`
	CanvasName  string `json:"canvasName"`
	DefaultName string `json:"defaultName"`
}

Preview describes an installable GitHub app before the user confirms installation.

func BuildPreview

func BuildPreview(repoParam string) (*Preview, error)

BuildPreview loads app metadata from GitHub and prepares install defaults.

type Repository

type Repository struct {
	Owner string
	Name  string
	// Ref is the git ref used when fetching app files (main or master).
	Ref string
}

Repository identifies a public GitHub repository hosting a SuperPlane app.

func ParseRepository

func ParseRepository(raw string) (*Repository, error)

ParseRepository accepts github.com/owner/repo and common variants.

func (*Repository) String

func (r *Repository) String() string

type Service

type Service struct {
	Registry        *registry.Registry
	Encryptor       crypto.Encryptor
	AuthService     authorization.Authorization
	WebhooksBaseURL string
	UsageService    usage.Service
}

func (*Service) Install

func (s *Service) Install(ctx context.Context, req InstallRequest) (*InstallResult, error)

func (*Service) Preview

func (s *Service) Preview(repoParam string) (*Preview, error)

Jump to

Keyboard shortcuts

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