build

package
v2.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: BSD-3-Clause Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterBuildWorkspaces

func RegisterBuildWorkspaces(api huma.API, workspaceService *BuildWorkspaceService, uploadService *upload.UploadService)

RegisterBuildWorkspaces registers build workspace file browser routes.

Types

type BrowseBuildsInput

type BrowseBuildsInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	Path          string `query:"path" default:"/" doc:"Directory path to browse"`
}

type BrowseBuildsOutput

type BrowseBuildsOutput struct {
	Body base.ApiResponse[[]workspacetypes.FileEntry]
}

type BuildFileContentResponse

type BuildFileContentResponse struct {
	Content  []byte `json:"content"`
	MimeType string `json:"mimeType"`
}

type BuildService

type BuildService struct {
	// contains filtered or unexported fields
}

func NewBuildService

func NewBuildService(
	db *database.DB,
	settings *settings.SettingsService,
	dockerService *docker.DockerClientService,
	registryService *registry.ContainerRegistryService,
	gitRepository *gitrepo.GitRepositoryService,
	eventService *event.EventService,
) *BuildService

func (*BuildService) BuildImage

func (s *BuildService) BuildImage(ctx context.Context, environmentID string, req buildtypes.BuildRequest, progressWriter io.Writer, serviceName string, user *models.User) (*buildtypes.BuildResult, error)

func (*BuildService) BuildSettings

func (s *BuildService) BuildSettings() buildtypes.BuildSettings

func (*BuildService) GetImageBuildByID

func (s *BuildService) GetImageBuildByID(ctx context.Context, environmentID, buildID string) (*imagetypes.BuildRecord, error)

func (*BuildService) ListImageBuildsByEnvironmentPaginated

func (s *BuildService) ListImageBuildsByEnvironmentPaginated(ctx context.Context, environmentID string, params pagination.QueryParams) ([]imagetypes.BuildRecord, pagination.Response, error)

type BuildWorkspaceHandler

type BuildWorkspaceHandler struct {
	// contains filtered or unexported fields
}

BuildWorkspaceHandler provides file browsing endpoints for manual build workspaces.

func (*BuildWorkspaceHandler) BrowseDirectory

func (h *BuildWorkspaceHandler) BrowseDirectory(ctx context.Context, input *BrowseBuildsInput) (*BrowseBuildsOutput, error)

func (*BuildWorkspaceHandler) CreateDirectory

func (*BuildWorkspaceHandler) DeleteFile

func (*BuildWorkspaceHandler) DownloadFile

func (*BuildWorkspaceHandler) GetFileContent

func (*BuildWorkspaceHandler) UploadFile

type BuildWorkspaceService

type BuildWorkspaceService struct {
	// contains filtered or unexported fields
}

BuildWorkspaceService provides file operations for the manual build workspace.

func NewBuildWorkspaceService

func NewBuildWorkspaceService(settings *settings.SettingsService) *BuildWorkspaceService

func (*BuildWorkspaceService) CreateDirectory

func (s *BuildWorkspaceService) CreateDirectory(ctx context.Context, dirPath string) error

func (*BuildWorkspaceService) DeleteFile

func (s *BuildWorkspaceService) DeleteFile(ctx context.Context, filePath string) error

func (*BuildWorkspaceService) DownloadFile

func (s *BuildWorkspaceService) DownloadFile(ctx context.Context, filePath string) (io.ReadCloser, int64, error)

func (*BuildWorkspaceService) GetFileContent

func (s *BuildWorkspaceService) GetFileContent(ctx context.Context, filePath string, maxBytes int64) ([]byte, string, error)

func (*BuildWorkspaceService) ListDirectory

func (s *BuildWorkspaceService) ListDirectory(ctx context.Context, dirPath string) ([]workspacetypes.FileEntry, error)

func (*BuildWorkspaceService) UploadFile

func (s *BuildWorkspaceService) UploadFile(ctx context.Context, destPath string, content io.Reader, filename string, size int64) error

type CreateBuildDirectoryInput

type CreateBuildDirectoryInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	Path          string `query:"path" doc:"Directory path to create"`
}

type DeleteBuildFileInput

type DeleteBuildFileInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	Path          string `query:"path" doc:"File or directory path to delete"`
}

type DownloadBuildFileInput

type DownloadBuildFileInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	Path          string `query:"path" doc:"File path"`
}

type DownloadBuildFileOutput

type DownloadBuildFileOutput struct {
	ContentType        string `header:"Content-Type"`
	ContentDisposition string `header:"Content-Disposition"`
	ContentLength      int64  `header:"Content-Length"`
	Body               io.ReadCloser
}

type GetBuildFileContentInput

type GetBuildFileContentInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	Path          string `query:"path" doc:"File path"`
	MaxBytes      int64  `query:"maxBytes" default:"1048576" doc:"Maximum bytes to read (default 1MB)"`
}

type GetBuildFileContentOutput

type GetBuildFileContentOutput struct {
	Body base.ApiResponse[BuildFileContentResponse]
}

type UploadBuildFileInput

type UploadBuildFileInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	Path          string `query:"path" default:"/" doc:"Destination path"`
	Body          uploadtypes.ConsumeRequest
}

Jump to

Keyboard shortcuts

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