Documentation
¶
Index ¶
- Constants
- func Bind(ctx context.Context, params BindParams) error
- func Binding(ctx context.Context, params ScopedParams) error
- func Create(ctx context.Context, params CreateParams) error
- func Deploy(ctx context.Context, params DeployParams) error
- func DeployList(ctx context.Context, params DeployListParams) error
- func EnvVars(ctx context.Context, params ScopedParams) error
- func FastCreate(ctx context.Context, params FastCreateParams) error
- func List(ctx context.Context, params ListParams) error
- func Sync(ctx context.Context, params SyncParams) error
- func Unbind(ctx context.Context, params ScopedParams) error
- func Upload(ctx context.Context, params UploadParams) error
- func ValidateProjectName(name string) error
- type BindParams
- type CreateParams
- type CreateResult
- type DeployListParams
- type DeployParams
- type DeployResult
- type FastCreateParams
- type FastCreateResult
- type ListParams
- type ScopedParams
- type SyncParams
- type UploadParams
- type UploadResult
Constants ¶
const DemoAppArchiveURL = "https://lf3-static.bytednsdoc.com/obj/eden-cn/whkph/ljhwZthlaukjlkulzlp/nextjs-supabase-filebox.zip"
DemoAppArchiveURL is the sample Next.js + Supabase "filebox" frontend archive used to demo the one-click `pages fast create` / fast_create_pages flow. Single source of truth shared by the CLI command help and the MCP tool description so the two stay aligned.
Variables ¶
This section is empty.
Functions ¶
func DeployList ¶
func DeployList(ctx context.Context, params DeployListParams) error
func FastCreate ¶
func FastCreate(ctx context.Context, params FastCreateParams) error
func ValidateProjectName ¶
ValidateProjectName checks a Pages project name against the platform naming rules: 2-63 characters, lowercase letters, digits and hyphens only, no leading or trailing hyphen. Shared by the CLI `pages create` command and the MCP create_pages_project tool.
Types ¶
type BindParams ¶
type CreateParams ¶
type CreateResult ¶
type CreateResult struct {
ProjectID string `json:"ProjectID,omitempty" toml:"project_id,omitempty" yaml:"project_id,omitempty"`
DeployID string `json:"DeployID,omitempty" toml:"deploy_id,omitempty" yaml:"deploy_id,omitempty"`
PagesProjectName string `json:"Name" toml:"pages_project_name" yaml:"pages_project_name"`
Scope string `json:"Scope,omitempty" toml:"scope,omitempty" yaml:"scope,omitempty"`
Provider string `json:"Provider,omitempty" toml:"provider,omitempty" yaml:"provider,omitempty"`
Status string `json:"Status,omitempty" toml:"status,omitempty" yaml:"status,omitempty"`
LatestDeploy string `json:"LatestDeploy,omitempty" toml:"latest_deploy,omitempty" yaml:"latest_deploy,omitempty"`
ProjectDeployResourceID string `` /* 128-byte string literal not displayed */
ProjectParam volcengine.PagesProjectParam `json:"ProjectParam,omitempty" toml:"project_param,omitempty" yaml:"project_param,omitempty"`
NoDeploy bool `json:"NoDeploy,omitempty" toml:"no_deploy,omitempty" yaml:"no_deploy,omitempty"`
CreateAt string `json:"CreateAt,omitempty" toml:"create_at,omitempty" yaml:"create_at,omitempty"`
UpdateAt string `json:"UpdateAt,omitempty" toml:"update_at,omitempty" yaml:"update_at,omitempty"`
}
type DeployListParams ¶
type DeployParams ¶
type DeployResult ¶
type DeployResult struct {
PagesProjectID string `json:"ProjectID" toml:"project_id" yaml:"project_id"`
DeployID string `json:"DeployID" toml:"deploy_id" yaml:"deploy_id"`
Provider string `json:"Provider" toml:"provider" yaml:"provider"`
ProjectDeployResourceID string `json:"ProjectDeployResourceID" toml:"project_deploy_resource_id" yaml:"project_deploy_resource_id"`
}
type FastCreateParams ¶
type FastCreateResult ¶
type FastCreateResult struct {
PagesProjectID string `json:"PagesProjectId" toml:"pages_project_id" yaml:"pages_project_id"`
PagesProjectName string `json:"PagesProjectName" toml:"pages_project_name" yaml:"pages_project_name"`
PreviewDomain string `json:"PreviewDomain" toml:"preview_domain" yaml:"preview_domain"`
WorkspaceID string `json:"WorkspaceId" toml:"workspace_id" yaml:"workspace_id"`
WorkspaceName string `json:"WorkspaceName" toml:"workspace_name" yaml:"workspace_name"`
Region string `json:"Region" toml:"region" yaml:"region"`
BranchID string `json:"BranchId" toml:"branch_id" yaml:"branch_id"`
ProjectDeployResourceID string `json:"ProjectDeployResourceID" toml:"project_deploy_resource_id" yaml:"project_deploy_resource_id"`
DeployID string `json:"DeployID" toml:"deploy_id" yaml:"deploy_id"`
FunctionsInit string `json:"FunctionsInit,omitempty" toml:"functions_init,omitempty" yaml:"functions_init,omitempty"`
MigrationsInit string `json:"MigrationsInit,omitempty" toml:"migrations_init,omitempty" yaml:"migrations_init,omitempty"`
}
func RunFastCreate ¶
func RunFastCreate(ctx context.Context, cfg volcengine.Config, params FastCreateParams, progress io.Writer) (FastCreateResult, error)
RunFastCreate runs the end-to-end Pages + Supabase fast-create chain: stage the frontend (a directory is auto-zipped, a prebuilt archive is uploaded as-is), create the Pages project, create a new Supabase workspace, wait for it to become ready, optionally apply SQL migrations and deploy Edge Functions, bind Pages to the workspace, deploy, and wait for the deployment to succeed.
It performs no confirmation prompt and no stdout/output side effects (progress lines are written to progress, which may be nil → discarded), so it is shared by the CLI `pages fast create` command and the MCP fast_create_pages tool. It blocks until the deployment succeeds, ctx is cancelled, or a step fails.
type ListParams ¶
type ScopedParams ¶
type SyncParams ¶
type UploadParams ¶
type UploadParams struct {
FilePath string
}
type UploadResult ¶
type UploadResult struct {
FileName string `json:"FileName" toml:"file_name" yaml:"file_name"`
Size int64 `json:"Size" toml:"size" yaml:"size"`
ProjectDeployResourceID string `json:"ProjectDeployResourceID" toml:"project_deploy_resource_id" yaml:"project_deploy_resource_id"`
}
func UploadResourceWithClient ¶
func UploadResourceWithClient(ctx context.Context, client *volcengine.Client, filePath string) (UploadResult, error)
UploadResourceWithClient stages a single deployment resource file (a built static-site archive) using the given client and returns the resource id to reference from create or deploy. It performs no output/formatting side effects, so it is shared by the CLI `pages upload` command and the MCP upload_pages_resource tool.