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 ImageBuild
- type ImageBuildStatus
- 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 *common.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 ImageBuild ¶ added in v2.8.1
type ImageBuild struct {
database.BaseModel
BuildArgs database.JSON `json:"buildArgs,omitempty" gorm:"column:build_args;type:text"`
Labels database.JSON `json:"labels,omitempty" gorm:"column:labels;type:text"`
Ulimits database.JSON `json:"ulimits,omitempty" gorm:"column:ulimits;type:text"`
UserID *string `json:"userId,omitempty" gorm:"column:user_id"`
Username *string `json:"username,omitempty" gorm:"column:username"`
Digest *string `json:"digest,omitempty" gorm:"column:digest"`
ErrorMessage *string `json:"errorMessage,omitempty" gorm:"column:error_message"`
Output *string `json:"output,omitempty" gorm:"column:output;type:text"`
CompletedAt *time.Time `json:"completedAt,omitempty" gorm:"column:completed_at" sortable:"true"`
DurationMs *int64 `json:"durationMs,omitempty" gorm:"column:duration_ms"`
EnvironmentID string `json:"environmentId" gorm:"column:environment_id;index"`
Status ImageBuildStatus `json:"status" gorm:"column:status;index" sortable:"true"`
Provider string `json:"provider,omitempty" gorm:"column:provider"`
ContextDir string `json:"contextDir" gorm:"column:context_dir"`
Dockerfile string `json:"dockerfile,omitempty" gorm:"column:dockerfile"`
Target string `json:"target,omitempty" gorm:"column:target"`
BuildNetwork string `json:"network,omitempty" gorm:"column:build_network"`
Isolation string `json:"isolation,omitempty" gorm:"column:isolation"`
Tags database.StringSlice `json:"tags,omitempty" gorm:"column:tags;type:text"`
Platforms database.StringSlice `json:"platforms,omitempty" gorm:"column:platforms;type:text"`
CacheFrom database.StringSlice `json:"cacheFrom,omitempty" gorm:"column:cache_from;type:text"`
CacheTo database.StringSlice `json:"cacheTo,omitempty" gorm:"column:cache_to;type:text"`
Entitlements database.StringSlice `json:"entitlements,omitempty" gorm:"column:entitlements;type:text"`
ExtraHosts database.StringSlice `json:"extraHosts,omitempty" gorm:"column:extra_hosts;type:text"`
ShmSize int64 `json:"shmSize,omitempty" gorm:"column:shm_size"`
NoCache bool `json:"noCache" gorm:"column:no_cache;default:false"`
Pull bool `json:"pull" gorm:"column:pull;default:false"`
Privileged bool `json:"privileged" gorm:"column:privileged;default:false"`
Push bool `json:"push" gorm:"column:push"`
Load bool `json:"load" gorm:"column:load"`
OutputTruncated bool `json:"outputTruncated" gorm:"column:output_truncated;default:false"`
}
func (ImageBuild) TableName ¶ added in v2.8.1
func (ImageBuild) TableName() string
type ImageBuildStatus ¶ added in v2.8.1
type ImageBuildStatus string
const ( ImageBuildStatusRunning ImageBuildStatus = "running" ImageBuildStatusSuccess ImageBuildStatus = "success" ImageBuildStatusFailed ImageBuildStatus = "failed" )
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.