Documentation
¶
Index ¶
- func RegisterBuildWorkspaces(api huma.API, workspaceService *BuildWorkspaceService, ...)
- type BrowseBuildsInput
- type BrowseBuildsOutput
- type BuildFileContentResponse
- type BuildService
- func (s *BuildService) BuildImage(ctx context.Context, environmentID string, req buildtypes.BuildRequest, ...) (*buildtypes.BuildResult, error)
- func (s *BuildService) BuildSettings() buildtypes.BuildSettings
- func (s *BuildService) GetImageBuildByID(ctx context.Context, environmentID, buildID string) (*imagetypes.BuildRecord, error)
- func (s *BuildService) ListImageBuildsByEnvironmentPaginated(ctx context.Context, environmentID string, params pagination.QueryParams) ([]imagetypes.BuildRecord, pagination.Response, error)
- type BuildWorkspaceHandler
- func (h *BuildWorkspaceHandler) BrowseDirectory(ctx context.Context, input *BrowseBuildsInput) (*BrowseBuildsOutput, error)
- func (h *BuildWorkspaceHandler) CreateDirectory(ctx context.Context, input *CreateBuildDirectoryInput) (*base.ApiResponse[base.MessageResponse], error)
- func (h *BuildWorkspaceHandler) DeleteFile(ctx context.Context, input *DeleteBuildFileInput) (*base.ApiResponse[base.MessageResponse], error)
- func (h *BuildWorkspaceHandler) DownloadFile(ctx context.Context, input *DownloadBuildFileInput) (*DownloadBuildFileOutput, error)
- func (h *BuildWorkspaceHandler) GetFileContent(ctx context.Context, input *GetBuildFileContentInput) (*GetBuildFileContentOutput, error)
- func (h *BuildWorkspaceHandler) UploadFile(ctx context.Context, input *UploadBuildFileInput) (*base.ApiResponse[base.MessageResponse], error)
- type BuildWorkspaceService
- func (s *BuildWorkspaceService) CreateDirectory(ctx context.Context, dirPath string) error
- func (s *BuildWorkspaceService) DeleteFile(ctx context.Context, filePath string) error
- func (s *BuildWorkspaceService) DownloadFile(ctx context.Context, filePath string) (io.ReadCloser, int64, error)
- func (s *BuildWorkspaceService) GetFileContent(ctx context.Context, filePath string, maxBytes int64) ([]byte, string, error)
- func (s *BuildWorkspaceService) ListDirectory(ctx context.Context, dirPath string) ([]workspacetypes.FileEntry, error)
- func (s *BuildWorkspaceService) UploadFile(ctx context.Context, destPath string, content io.Reader, filename string, ...) error
- type CreateBuildDirectoryInput
- type DeleteBuildFileInput
- type DownloadBuildFileInput
- type DownloadBuildFileOutput
- type GetBuildFileContentInput
- type GetBuildFileContentOutput
- type UploadBuildFileInput
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 BrowseBuildsOutput ¶
type BrowseBuildsOutput struct {
Body base.ApiResponse[[]workspacetypes.FileEntry]
}
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 (h *BuildWorkspaceHandler) CreateDirectory(ctx context.Context, input *CreateBuildDirectoryInput) (*base.ApiResponse[base.MessageResponse], error)
func (*BuildWorkspaceHandler) DeleteFile ¶
func (h *BuildWorkspaceHandler) DeleteFile(ctx context.Context, input *DeleteBuildFileInput) (*base.ApiResponse[base.MessageResponse], error)
func (*BuildWorkspaceHandler) DownloadFile ¶
func (h *BuildWorkspaceHandler) DownloadFile(ctx context.Context, input *DownloadBuildFileInput) (*DownloadBuildFileOutput, error)
func (*BuildWorkspaceHandler) GetFileContent ¶
func (h *BuildWorkspaceHandler) GetFileContent(ctx context.Context, input *GetBuildFileContentInput) (*GetBuildFileContentOutput, error)
func (*BuildWorkspaceHandler) UploadFile ¶
func (h *BuildWorkspaceHandler) UploadFile(ctx context.Context, input *UploadBuildFileInput) (*base.ApiResponse[base.MessageResponse], error)
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 (*BuildWorkspaceService) ListDirectory ¶
func (s *BuildWorkspaceService) ListDirectory(ctx context.Context, dirPath string) ([]workspacetypes.FileEntry, error)
type DeleteBuildFileInput ¶
type DownloadBuildFileInput ¶
type DownloadBuildFileOutput ¶
type DownloadBuildFileOutput struct {
ContentType string `header:"Content-Type"`
ContentDisposition string `header:"Content-Disposition"`
ContentLength int64 `header:"Content-Length"`
Body io.ReadCloser
}
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
}
Click to show internal directories.
Click to hide internal directories.