Documentation
¶
Index ¶
- Variables
- func CLILogin(basicAuth *auth.BasicAuthenticator, proxyAdminGroups string, ...) gin.HandlerFunc
- func CLILoginCode(store *auth.DeviceCodeStore) gin.HandlerFunc
- func CLILoginPoll(store *auth.DeviceCodeStore) gin.HandlerFunc
- func CodeExchange(codeStore *auth.AuthCodeStore) gin.HandlerFunc
- func DeviceConfig(issuerURL, deviceClientID string) gin.HandlerFunc
- func DeviceToken(basicAuth *auth.BasicAuthenticator, adminGroups string) gin.HandlerFunc
- func GetCurrentUser(authenticator auth.Authenticator) gin.HandlerFunc
- func GetVersion(c *gin.Context)
- func HealthCheck(c *gin.Context)
- func Login(authenticator auth.Authenticator) gin.HandlerFunc
- func NotImplemented(c *gin.Context)
- func OIDCCallback(oidcAuth *auth.OIDCAuthenticator, codeStore *auth.AuthCodeStore, ...) gin.HandlerFunc
- func OIDCLogin(oidcAuth *auth.OIDCAuthenticator) gin.HandlerFunc
- func SessionCheck(basicAuth *auth.BasicAuthenticator, proxyAdminGroups string) gin.HandlerFunc
- func SessionRedirect(basicAuth *auth.BasicAuthenticator, proxyAdminGroups string, basePath string, ...) gin.HandlerFunc
- type AdminHandler
- func (h *AdminHandler) CreateUser(c *gin.Context)
- func (h *AdminHandler) DeleteUser(c *gin.Context)
- func (h *AdminHandler) GetDashboardStats(c *gin.Context)
- func (h *AdminHandler) GetUser(c *gin.Context)
- func (h *AdminHandler) GrantPermission(c *gin.Context)
- func (h *AdminHandler) ListAuditLogs(c *gin.Context)
- func (h *AdminHandler) ListPermissions(c *gin.Context)
- func (h *AdminHandler) ListRoles(c *gin.Context)
- func (h *AdminHandler) ListUsers(c *gin.Context)
- func (h *AdminHandler) RevokePermission(c *gin.Context)
- func (h *AdminHandler) ToggleAdmin(c *gin.Context)
- type CreateRegistryRequest
- type CreateUserRequest
- type CreateWorkspaceRequest
- type DeviceConfigResponse
- type DeviceTokenRequest
- type ErrorResponse
- type GrantPermissionRequest
- type HealthResponse
- type ImportRequest
- type InstallPackagesRequest
- type JobHandler
- type PixiTomlResponse
- type PublishRequest
- type PushVersionRequest
- type PushVersionResponse
- type RegistryBrowseHandler
- type RegistryHandler
- func (h *RegistryHandler) CreateRegistry(c *gin.Context)
- func (h *RegistryHandler) DeleteRegistry(c *gin.Context)
- func (h *RegistryHandler) GetRegistry(c *gin.Context)
- func (h *RegistryHandler) ListPublicRegistries(c *gin.Context)
- func (h *RegistryHandler) ListRegistries(c *gin.Context)
- func (h *RegistryHandler) UpdateRegistry(c *gin.Context)
- type RemoteHandler
- func (h *RemoteHandler) ConnectServer(c *gin.Context)
- func (h *RemoteHandler) CreateWorkspace(c *gin.Context)
- func (h *RemoteHandler) DeleteWorkspace(c *gin.Context)
- func (h *RemoteHandler) DisconnectServer(c *gin.Context)
- func (h *RemoteHandler) GetAdminDashboardStats(c *gin.Context)
- func (h *RemoteHandler) GetPixiToml(c *gin.Context)
- func (h *RemoteHandler) GetServer(c *gin.Context)
- func (h *RemoteHandler) GetVersionPixiLock(c *gin.Context)
- func (h *RemoteHandler) GetVersionPixiToml(c *gin.Context)
- func (h *RemoteHandler) GetWorkspace(c *gin.Context)
- func (h *RemoteHandler) ListAdminAuditLogs(c *gin.Context)
- func (h *RemoteHandler) ListAdminRegistries(c *gin.Context)
- func (h *RemoteHandler) ListAdminUsers(c *gin.Context)
- func (h *RemoteHandler) ListJobs(c *gin.Context)
- func (h *RemoteHandler) ListRegistries(c *gin.Context)
- func (h *RemoteHandler) ListTags(c *gin.Context)
- func (h *RemoteHandler) ListVersions(c *gin.Context)
- func (h *RemoteHandler) ListWorkspaces(c *gin.Context)
- func (h *RemoteHandler) PushVersion(c *gin.Context)
- type RollbackRequest
- type SavePixiTomlRequest
- type ShareWorkspaceRequest
- type UpdatePublicationRequest
- type UpdateRegistryRequest
- type WorkspaceHandler
- func (h *WorkspaceHandler) CreateWorkspace(c *gin.Context)
- func (h *WorkspaceHandler) DeleteWorkspace(c *gin.Context)
- func (h *WorkspaceHandler) DownloadLockFile(c *gin.Context)
- func (h *WorkspaceHandler) DownloadManifestFile(c *gin.Context)
- func (h *WorkspaceHandler) GetPixiToml(c *gin.Context)
- func (h *WorkspaceHandler) GetPublishDefaults(c *gin.Context)
- func (h *WorkspaceHandler) GetVersion(c *gin.Context)
- func (h *WorkspaceHandler) GetWorkspace(c *gin.Context)
- func (h *WorkspaceHandler) InstallPackages(c *gin.Context)
- func (h *WorkspaceHandler) ListCollaborators(c *gin.Context)
- func (h *WorkspaceHandler) ListPackages(c *gin.Context)
- func (h *WorkspaceHandler) ListPublications(c *gin.Context)
- func (h *WorkspaceHandler) ListTags(c *gin.Context)
- func (h *WorkspaceHandler) ListVersions(c *gin.Context)
- func (h *WorkspaceHandler) ListWorkspaces(c *gin.Context)
- func (h *WorkspaceHandler) PublishWorkspace(c *gin.Context)
- func (h *WorkspaceHandler) PushVersion(c *gin.Context)
- func (h *WorkspaceHandler) RemovePackages(c *gin.Context)
- func (h *WorkspaceHandler) RollbackToVersion(c *gin.Context)
- func (h *WorkspaceHandler) SavePixiToml(c *gin.Context)
- func (h *WorkspaceHandler) ShareWorkspace(c *gin.Context)
- func (h *WorkspaceHandler) SolveWorkspace(c *gin.Context)
- func (h *WorkspaceHandler) UnshareWorkspace(c *gin.Context)
- func (h *WorkspaceHandler) UpdatePublication(c *gin.Context)
- type WorkspaceTagResponse
Constants ¶
This section is empty.
Variables ¶
var Commit = ""
Commit is the git commit hash, set via ldflags at build time
var LogoutURL = ""
LogoutURL is set by the router when the deployment requires an external logout redirect (e.g. Envoy Gateway's /logout path for OIDC session cleanup).
var Mode = "team"
Mode is set by the router based on config (e.g. "local" or "team")
var Version = "dev"
Version is set via ldflags at build time
Functions ¶
func CLILogin ¶
func CLILogin(basicAuth *auth.BasicAuthenticator, proxyAdminGroups string, store *auth.DeviceCodeStore) gin.HandlerFunc
CLILogin godoc @Summary Browser-based login for CLI clients @Description Handles browser-based CLI login using a device code flow. @Description If behind an OIDC proxy, auto-completes the code. Otherwise shows a login form. @Tags auth @Produce html @Param code query string true "Device code from CLI" @Success 200 {string} string "HTML page" @Failure 400 {object} map[string]string @Router /auth/cli-login [get]
func CLILoginCode ¶
func CLILoginCode(store *auth.DeviceCodeStore) gin.HandlerFunc
CLILoginCode godoc @Summary Request a device code for CLI login @Description Generates a short-lived device code for browser-based CLI authentication. @Tags auth @Produce json @Success 200 {object} map[string]interface{} @Router /auth/cli-login/code [post]
func CLILoginPoll ¶
func CLILoginPoll(store *auth.DeviceCodeStore) gin.HandlerFunc
CLILoginPoll godoc @Summary Poll for CLI login completion @Description Polls the status of a device code. Returns the token when authentication is complete. @Tags auth @Produce json @Param code query string true "Device code" @Success 200 {object} map[string]interface{} @Failure 404 {object} map[string]string @Router /auth/cli-login/poll [get]
func CodeExchange ¶ added in v0.10.1
func CodeExchange(codeStore *auth.AuthCodeStore) gin.HandlerFunc
CodeExchange exchanges a single-use authorization code for a Nebi JWT. The code is consumed on use and expires after 30 seconds.
func DeviceConfig ¶ added in v0.10.1
func DeviceConfig(issuerURL, deviceClientID string) gin.HandlerFunc
DeviceConfig returns the OIDC device flow configuration for CLI clients. If device flow is not configured, returns {"enabled": false}.
func DeviceToken ¶ added in v0.10.1
func DeviceToken(basicAuth *auth.BasicAuthenticator, adminGroups string) gin.HandlerFunc
DeviceToken exchanges a Keycloak ID token (from device flow) for a Nebi JWT. The ID token is verified using the OIDC provider's JWKS, then the user is found/created and a Nebi JWT is returned.
func GetCurrentUser ¶
func GetCurrentUser(authenticator auth.Authenticator) gin.HandlerFunc
GetCurrentUser godoc @Summary Get current user @Description Get the currently authenticated user's information @Tags auth @Produce json @Success 200 {object} models.User @Failure 401 {object} map[string]string @Router /auth/me [get]
func GetVersion ¶
GetVersion godoc @Summary Get version information @Description Returns version information about the Nebi server @Tags system @Produce json @Success 200 {object} map[string]string @Router /version [get]
func HealthCheck ¶
HealthCheck godoc @Summary Health check endpoint @Description Returns the health status of the service @Tags health @Produce json @Success 200 {object} HealthResponse @Router /health [get]
func Login ¶
func Login(authenticator auth.Authenticator) gin.HandlerFunc
Login godoc @Summary User login @Description Authenticate user and return JWT token @Tags auth @Accept json @Produce json @Param credentials body auth.LoginRequest true "Login credentials" @Success 200 {object} auth.LoginResponse @Failure 400 {object} map[string]string @Failure 401 {object} map[string]string @Router /auth/login [post]
func NotImplemented ¶
NotImplemented is a placeholder handler for unimplemented endpoints
func OIDCCallback ¶
func OIDCCallback(oidcAuth *auth.OIDCAuthenticator, codeStore *auth.AuthCodeStore, basePath string) gin.HandlerFunc
OIDCCallback godoc @Summary Handle OIDC callback @Description Process OIDC callback and authenticate user @Tags auth @Accept json @Produce json @Param code query string true "Authorization code" @Param state query string true "State parameter" @Success 200 {object} auth.LoginResponse @Failure 400 {object} map[string]string @Failure 401 {object} map[string]string @Router /auth/oidc/callback [get]
func OIDCLogin ¶
func OIDCLogin(oidcAuth *auth.OIDCAuthenticator) gin.HandlerFunc
OIDCLogin godoc @Summary Initiate OIDC login @Description Redirects user to OIDC provider for authentication @Tags auth @Produce json @Success 302 {string} string "Redirect to OIDC provider" @Router /auth/oidc/login [get]
func SessionCheck ¶
func SessionCheck(basicAuth *auth.BasicAuthenticator, proxyAdminGroups string) gin.HandlerFunc
SessionCheck godoc @Summary Check proxy session @Description Check for an IdToken cookie (set by an authenticating proxy) and return a Nebi JWT @Tags auth @Produce json @Success 200 {object} auth.LoginResponse @Failure 401 {object} map[string]string @Router /auth/session [get]
func SessionRedirect ¶ added in v0.10.1
func SessionRedirect(basicAuth *auth.BasicAuthenticator, proxyAdminGroups string, basePath string, codeStore *auth.AuthCodeStore) gin.HandlerFunc
SessionRedirect exchanges a proxy IdToken cookie for a short-lived, single-use authorization code and redirects to /login?code=<code>. The frontend then exchanges the code for a JWT via POST /api/v1/auth/code/exchange.
This follows the OAuth 2.0 authorization code pattern (RFC 6749 §4.1): sensitive tokens never appear in URLs, logs, or browser history.
This endpoint lives outside /api/ so that gateway proxies that strip cookies from public routes still forward them here.
Types ¶
type AdminHandler ¶
type AdminHandler struct {
// contains filtered or unexported fields
}
func NewAdminHandler ¶
func NewAdminHandler(svc *service.AdminService) *AdminHandler
func (*AdminHandler) CreateUser ¶
func (h *AdminHandler) CreateUser(c *gin.Context)
CreateUser godoc @Summary Create a new user (admin only) @Tags admin @Security BearerAuth @Accept json @Produce json @Param user body CreateUserRequest true "User details" @Success 201 {object} models.User @Router /admin/users [post]
func (*AdminHandler) DeleteUser ¶
func (h *AdminHandler) DeleteUser(c *gin.Context)
DeleteUser godoc @Summary Delete a user (admin only) @Tags admin @Security BearerAuth @Param id path string true "User UUID" @Success 204 @Router /admin/users/{id} [delete]
func (*AdminHandler) GetDashboardStats ¶
func (h *AdminHandler) GetDashboardStats(c *gin.Context)
GetDashboardStats godoc @Summary Get admin dashboard statistics @Tags admin @Security BearerAuth @Produce json @Success 200 {object} service.DashboardStats @Router /admin/dashboard/stats [get]
func (*AdminHandler) GetUser ¶
func (h *AdminHandler) GetUser(c *gin.Context)
GetUser godoc @Summary Get user by ID (admin only) @Tags admin @Security BearerAuth @Param id path string true "User UUID" @Success 200 {object} service.UserWithAdmin @Router /admin/users/{id} [get]
func (*AdminHandler) GrantPermission ¶
func (h *AdminHandler) GrantPermission(c *gin.Context)
GrantPermission godoc @Summary Grant workspace access to a user @Tags admin @Security BearerAuth @Accept json @Produce json @Param permission body GrantPermissionRequest true "Permission details" @Success 201 {object} models.Permission @Router /admin/permissions [post]
func (*AdminHandler) ListAuditLogs ¶
func (h *AdminHandler) ListAuditLogs(c *gin.Context)
ListAuditLogs godoc @Summary List audit logs @Tags admin @Security BearerAuth @Produce json @Param user_id query string false "Filter by user ID" @Param action query string false "Filter by action" @Success 200 {array} models.AuditLog @Router /admin/audit-logs [get]
func (*AdminHandler) ListPermissions ¶
func (h *AdminHandler) ListPermissions(c *gin.Context)
ListPermissions godoc @Summary List all permissions @Tags admin @Security BearerAuth @Produce json @Success 200 {array} models.Permission @Router /admin/permissions [get]
func (*AdminHandler) ListRoles ¶
func (h *AdminHandler) ListRoles(c *gin.Context)
ListRoles godoc @Summary List all roles @Tags admin @Security BearerAuth @Produce json @Success 200 {array} models.Role @Router /admin/roles [get]
func (*AdminHandler) ListUsers ¶
func (h *AdminHandler) ListUsers(c *gin.Context)
ListUsers godoc @Summary List all users (admin only) @Tags admin @Security BearerAuth @Produce json @Success 200 {array} service.UserWithAdmin @Router /admin/users [get]
func (*AdminHandler) RevokePermission ¶
func (h *AdminHandler) RevokePermission(c *gin.Context)
RevokePermission godoc @Summary Revoke a permission @Tags admin @Security BearerAuth @Param id path string true "Permission ID" @Success 204 @Router /admin/permissions/{id} [delete]
func (*AdminHandler) ToggleAdmin ¶
func (h *AdminHandler) ToggleAdmin(c *gin.Context)
ToggleAdmin godoc @Summary Toggle admin status for a user @Tags admin @Security BearerAuth @Param id path string true "User UUID" @Success 200 {object} service.UserWithAdmin @Router /admin/users/{id}/toggle-admin [post]
type CreateRegistryRequest ¶
type CreateUserRequest ¶
type CreateWorkspaceRequest ¶
type DeviceConfigResponse ¶ added in v0.10.1
type DeviceConfigResponse struct {
Enabled bool `json:"enabled"`
IssuerURL string `json:"issuer_url,omitempty"`
ClientID string `json:"client_id,omitempty"`
}
DeviceConfigResponse is the JSON response from GET /auth/device-config.
type DeviceTokenRequest ¶ added in v0.10.1
type DeviceTokenRequest struct {
IDToken string `json:"id_token" binding:"required"`
}
DeviceTokenRequest is the JSON body for POST /auth/device-token.
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error"`
}
ErrorResponse is a standard error response
type GrantPermissionRequest ¶
type HealthResponse ¶
type HealthResponse struct {
Status string `json:"status"`
Timestamp time.Time `json:"timestamp"`
Version string `json:"version"`
}
HealthResponse represents the health check response
type ImportRequest ¶
type ImportRequest struct {
Repository string `json:"repository" binding:"required"`
Tag string `json:"tag" binding:"required"`
Name string `json:"name" binding:"required"`
}
ImportRequest is the JSON body for the import endpoint
type InstallPackagesRequest ¶
type InstallPackagesRequest struct {
Packages []string `json:"packages" binding:"required"`
}
type JobHandler ¶
type JobHandler struct {
// contains filtered or unexported fields
}
func NewJobHandler ¶
func NewJobHandler(svc *service.JobService, broker *logstream.LogBroker, valkeyClient interface{}) *JobHandler
func (*JobHandler) GetJob ¶
func (h *JobHandler) GetJob(c *gin.Context)
GetJob godoc @Summary Get a job by ID @Tags jobs @Security BearerAuth @Produce json @Param id path string true "Job ID" @Success 200 {object} models.Job @Failure 401 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Router /jobs/{id} [get]
func (*JobHandler) ListJobs ¶
func (h *JobHandler) ListJobs(c *gin.Context)
ListJobs godoc @Summary List all jobs for user's workspaces @Tags jobs @Security BearerAuth @Produce json @Success 200 {array} models.Job @Failure 401 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Router /jobs [get]
func (*JobHandler) StreamJobLogs ¶
func (h *JobHandler) StreamJobLogs(c *gin.Context)
StreamJobLogs godoc @Summary Stream job logs in real-time via Server-Sent Events @Tags jobs @Security BearerAuth @Produce text/event-stream @Param id path string true "Job ID" @Param token query string false "Auth token (alternative to Bearer header for EventSource compatibility)" @Success 200 {string} string "event stream" @Failure 401 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Router /jobs/{id}/logs/stream [get]
type PixiTomlResponse ¶
type PixiTomlResponse struct {
Content string `json:"content"`
}
type PublishRequest ¶
type PushVersionRequest ¶
type PushVersionResponse ¶
type RegistryBrowseHandler ¶
type RegistryBrowseHandler struct {
// contains filtered or unexported fields
}
RegistryBrowseHandler handles browsing and importing from OCI registries
func NewRegistryBrowseHandler ¶
func NewRegistryBrowseHandler(registrySvc *service.RegistryService, wsSvc *service.WorkspaceService) *RegistryBrowseHandler
NewRegistryBrowseHandler creates a new registry browse handler
func (*RegistryBrowseHandler) ImportEnvironment ¶
func (h *RegistryBrowseHandler) ImportEnvironment(c *gin.Context)
ImportEnvironment pulls an environment from a registry and creates a workspace
func (*RegistryBrowseHandler) ListRepositories ¶
func (h *RegistryBrowseHandler) ListRepositories(c *gin.Context)
ListRepositories lists repositories in a registry. Falls back to Quay.io API or known publications if /v2/_catalog is not supported.
func (*RegistryBrowseHandler) ListTags ¶
func (h *RegistryBrowseHandler) ListTags(c *gin.Context)
ListTags lists tags for a repository in a registry
type RegistryHandler ¶
type RegistryHandler struct {
// contains filtered or unexported fields
}
RegistryHandler handles OCI registry operations
func NewRegistryHandler ¶
func NewRegistryHandler(svc *service.RegistryService) *RegistryHandler
NewRegistryHandler creates a new registry handler
func (*RegistryHandler) CreateRegistry ¶
func (h *RegistryHandler) CreateRegistry(c *gin.Context)
CreateRegistry godoc @Summary Create a new OCI registry @Description Add a new OCI registry configuration (admin only) @Tags admin @Security BearerAuth @Accept json @Produce json @Param registry body CreateRegistryRequest true "Registry details" @Success 201 {object} service.RegistryResult @Failure 400 {object} ErrorResponse @Failure 409 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Router /admin/registries [post]
func (*RegistryHandler) DeleteRegistry ¶
func (h *RegistryHandler) DeleteRegistry(c *gin.Context)
DeleteRegistry godoc @Summary Delete a registry @Description Delete an OCI registry configuration (admin only) @Tags admin @Security BearerAuth @Param id path string true "Registry ID" @Success 204 @Failure 404 {object} ErrorResponse @Router /admin/registries/{id} [delete]
func (*RegistryHandler) GetRegistry ¶
func (h *RegistryHandler) GetRegistry(c *gin.Context)
GetRegistry godoc @Summary Get a registry by ID @Description Get details of a specific OCI registry (admin only) @Tags admin @Security BearerAuth @Produce json @Param id path string true "Registry ID" @Success 200 {object} service.RegistryResult @Failure 404 {object} ErrorResponse @Router /admin/registries/{id} [get]
func (*RegistryHandler) ListPublicRegistries ¶
func (h *RegistryHandler) ListPublicRegistries(c *gin.Context)
ListPublicRegistries godoc @Summary List available registries (public info only) @Description Get list of registries for users to select from (no credentials exposed) @Tags registries @Security BearerAuth @Produce json @Success 200 {array} service.RegistryResult @Router /registries [get]
func (*RegistryHandler) ListRegistries ¶
func (h *RegistryHandler) ListRegistries(c *gin.Context)
ListRegistries godoc @Summary List all OCI registries @Description Get list of all configured OCI registries (admin only) @Tags admin @Security BearerAuth @Produce json @Success 200 {array} service.RegistryResult @Failure 500 {object} ErrorResponse @Router /admin/registries [get]
func (*RegistryHandler) UpdateRegistry ¶
func (h *RegistryHandler) UpdateRegistry(c *gin.Context)
UpdateRegistry godoc @Summary Update a registry @Description Update OCI registry details (admin only) @Tags admin @Security BearerAuth @Accept json @Produce json @Param id path string true "Registry ID" @Param registry body UpdateRegistryRequest true "Registry updates" @Success 200 {object} service.RegistryResult @Failure 400 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Router /admin/registries/{id} [put]
type RemoteHandler ¶
type RemoteHandler struct {
// contains filtered or unexported fields
}
RemoteHandler proxies requests to a remote Nebi server. Used in local/desktop mode so the frontend can browse remote servers.
func NewRemoteHandler ¶
func NewRemoteHandler(db *gorm.DB) *RemoteHandler
NewRemoteHandler creates a new remote handler.
func (*RemoteHandler) ConnectServer ¶
func (h *RemoteHandler) ConnectServer(c *gin.Context)
ConnectServer authenticates with a remote server and stores credentials.
func (*RemoteHandler) CreateWorkspace ¶
func (h *RemoteHandler) CreateWorkspace(c *gin.Context)
CreateWorkspace proxies workspace creation to the remote server.
func (*RemoteHandler) DeleteWorkspace ¶
func (h *RemoteHandler) DeleteWorkspace(c *gin.Context)
DeleteWorkspace proxies workspace deletion to the remote server.
func (*RemoteHandler) DisconnectServer ¶
func (h *RemoteHandler) DisconnectServer(c *gin.Context)
DisconnectServer clears stored credentials.
func (*RemoteHandler) GetAdminDashboardStats ¶
func (h *RemoteHandler) GetAdminDashboardStats(c *gin.Context)
GetAdminDashboardStats proxies admin dashboard stats to the remote server.
func (*RemoteHandler) GetPixiToml ¶
func (h *RemoteHandler) GetPixiToml(c *gin.Context)
GetPixiToml proxies pixi.toml fetch for a remote workspace. Returns JSON {"content": "..."} for uniform frontend consumption.
func (*RemoteHandler) GetServer ¶
func (h *RemoteHandler) GetServer(c *gin.Context)
GetServer returns the current connection status.
func (*RemoteHandler) GetVersionPixiLock ¶
func (h *RemoteHandler) GetVersionPixiLock(c *gin.Context)
GetVersionPixiLock proxies version-specific pixi.lock fetch. Returns JSON {"content": "..."} — see GetVersionPixiToml for rationale.
func (*RemoteHandler) GetVersionPixiToml ¶
func (h *RemoteHandler) GetVersionPixiToml(c *gin.Context)
GetVersionPixiToml proxies version-specific pixi.toml fetch. Returns JSON {"content": "..."} — the upstream returns plain text but we wrap it in JSON for uniform frontend consumption.
func (*RemoteHandler) GetWorkspace ¶
func (h *RemoteHandler) GetWorkspace(c *gin.Context)
GetWorkspace proxies a single workspace fetch to the remote server.
func (*RemoteHandler) ListAdminAuditLogs ¶
func (h *RemoteHandler) ListAdminAuditLogs(c *gin.Context)
ListAdminAuditLogs proxies admin audit log listing to the remote server.
func (*RemoteHandler) ListAdminRegistries ¶
func (h *RemoteHandler) ListAdminRegistries(c *gin.Context)
ListAdminRegistries proxies admin registry listing to the remote server.
func (*RemoteHandler) ListAdminUsers ¶
func (h *RemoteHandler) ListAdminUsers(c *gin.Context)
ListAdminUsers proxies admin user listing to the remote server.
func (*RemoteHandler) ListJobs ¶
func (h *RemoteHandler) ListJobs(c *gin.Context)
ListJobs proxies job listing to the remote server.
func (*RemoteHandler) ListRegistries ¶
func (h *RemoteHandler) ListRegistries(c *gin.Context)
ListRegistries proxies registry listing to the remote server.
func (*RemoteHandler) ListTags ¶
func (h *RemoteHandler) ListTags(c *gin.Context)
ListTags proxies tag listing for a remote workspace.
func (*RemoteHandler) ListVersions ¶
func (h *RemoteHandler) ListVersions(c *gin.Context)
ListVersions proxies version listing for a remote workspace.
func (*RemoteHandler) ListWorkspaces ¶
func (h *RemoteHandler) ListWorkspaces(c *gin.Context)
ListWorkspaces proxies workspace listing to the remote server.
func (*RemoteHandler) PushVersion ¶
func (h *RemoteHandler) PushVersion(c *gin.Context)
PushVersion proxies version push to the remote server.
type RollbackRequest ¶
type RollbackRequest struct {
VersionNumber int `json:"version_number" binding:"required"`
}
type SavePixiTomlRequest ¶
type SavePixiTomlRequest struct {
Content string `json:"content" binding:"required"`
}
type ShareWorkspaceRequest ¶
type ShareWorkspaceRequest struct {
}
type UpdatePublicationRequest ¶
type UpdatePublicationRequest struct {
IsPublic *bool `json:"is_public" binding:"required"`
}
type UpdateRegistryRequest ¶
type WorkspaceHandler ¶
type WorkspaceHandler struct {
// contains filtered or unexported fields
}
func NewWorkspaceHandler ¶
func NewWorkspaceHandler(svc *service.WorkspaceService) *WorkspaceHandler
func (*WorkspaceHandler) CreateWorkspace ¶
func (h *WorkspaceHandler) CreateWorkspace(c *gin.Context)
CreateWorkspace godoc @Summary Create a new workspace @Tags workspaces @Security BearerAuth @Accept json @Produce json @Param workspace body CreateWorkspaceRequest true "Workspace details" @Success 201 {object} models.Workspace @Failure 400 {object} ErrorResponse @Failure 401 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Router /workspaces [post]
func (*WorkspaceHandler) DeleteWorkspace ¶
func (h *WorkspaceHandler) DeleteWorkspace(c *gin.Context)
DeleteWorkspace godoc @Summary Delete an workspace @Tags workspaces @Security BearerAuth @Param id path string true "Workspace ID" @Success 204 @Failure 401 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Router /workspaces/{id} [delete]
func (*WorkspaceHandler) DownloadLockFile ¶
func (h *WorkspaceHandler) DownloadLockFile(c *gin.Context)
DownloadLockFile godoc @Summary Download pixi.lock for a specific version @Tags workspaces @Security BearerAuth @Produce text/plain @Param id path string true "Workspace ID" @Param version path int true "Version number" @Success 200 {string} string "pixi.lock content" @Router /workspaces/{id}/versions/{version}/pixi-lock [get]
func (*WorkspaceHandler) DownloadManifestFile ¶
func (h *WorkspaceHandler) DownloadManifestFile(c *gin.Context)
DownloadManifestFile godoc @Summary Download pixi.toml for a specific version @Tags workspaces @Security BearerAuth @Produce text/plain @Param id path string true "Workspace ID" @Param version path int true "Version number" @Success 200 {string} string "pixi.toml content" @Router /workspaces/{id}/versions/{version}/pixi-toml [get]
func (*WorkspaceHandler) GetPixiToml ¶
func (h *WorkspaceHandler) GetPixiToml(c *gin.Context)
GetPixiToml godoc @Summary Get pixi.toml content for an workspace @Tags workspaces @Security BearerAuth @Produce json @Param id path string true "Workspace ID" @Success 200 {object} PixiTomlResponse @Failure 401 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Router /workspaces/{id}/pixi-toml [get]
func (*WorkspaceHandler) GetPublishDefaults ¶
func (h *WorkspaceHandler) GetPublishDefaults(c *gin.Context)
GetPublishDefaults godoc @Summary Get default values for publishing a workspace @Description Returns suggested registry, repository name, and next tag for publishing @Tags workspaces @Security BearerAuth @Produce json @Param id path string true "Workspace ID" @Success 200 {object} service.PublishDefaultsResult @Failure 404 {object} ErrorResponse @Router /workspaces/{id}/publish-defaults [get]
func (*WorkspaceHandler) GetVersion ¶
func (h *WorkspaceHandler) GetVersion(c *gin.Context)
GetVersion godoc @Summary Get a specific version with full details @Tags workspaces @Security BearerAuth @Produce json @Param id path string true "Workspace ID" @Param version path int true "Version number" @Success 200 {object} models.WorkspaceVersion @Router /workspaces/{id}/versions/{version} [get]
func (*WorkspaceHandler) GetWorkspace ¶
func (h *WorkspaceHandler) GetWorkspace(c *gin.Context)
GetWorkspace godoc @Summary Get a workspace by ID @Tags workspaces @Security BearerAuth @Produce json @Param id path string true "Workspace ID" @Success 200 {object} models.Workspace @Failure 401 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Router /workspaces/{id} [get]
func (*WorkspaceHandler) InstallPackages ¶
func (h *WorkspaceHandler) InstallPackages(c *gin.Context)
InstallPackages godoc @Summary Install packages in an workspace @Tags workspaces @Security BearerAuth @Accept json @Produce json @Param id path string true "Workspace ID" @Param packages body InstallPackagesRequest true "Packages to install" @Success 202 {object} models.Job @Failure 400 {object} ErrorResponse @Failure 401 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Router /workspaces/{id}/packages [post]
func (*WorkspaceHandler) ListCollaborators ¶
func (h *WorkspaceHandler) ListCollaborators(c *gin.Context)
ListCollaborators godoc @Summary List all users with access to workspace @Tags workspaces @Security BearerAuth @Produce json @Param id path string true "Workspace ID" @Success 200 {array} service.CollaboratorResult @Router /workspaces/{id}/collaborators [get]
func (*WorkspaceHandler) ListPackages ¶
func (h *WorkspaceHandler) ListPackages(c *gin.Context)
ListPackages godoc @Summary List packages in an workspace @Tags workspaces @Security BearerAuth @Produce json @Param id path string true "Workspace ID" @Success 200 {array} models.Package @Failure 401 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Router /workspaces/{id}/packages [get]
func (*WorkspaceHandler) ListPublications ¶
func (h *WorkspaceHandler) ListPublications(c *gin.Context)
ListPublications godoc @Summary List publications for an workspace @Description Get all publications (registry pushes) for an workspace @Tags workspaces @Security BearerAuth @Produce json @Param id path string true "Workspace ID" @Success 200 {array} service.PublicationResult @Failure 404 {object} ErrorResponse @Router /workspaces/{id}/publications [get]
func (*WorkspaceHandler) ListTags ¶
func (h *WorkspaceHandler) ListTags(c *gin.Context)
ListTags godoc @Summary List tags for an workspace @Tags workspaces @Security BearerAuth @Produce json @Param id path string true "Workspace ID" @Success 200 {array} WorkspaceTagResponse @Router /workspaces/{id}/tags [get]
func (*WorkspaceHandler) ListVersions ¶
func (h *WorkspaceHandler) ListVersions(c *gin.Context)
ListVersions godoc @Summary List all versions for an workspace @Tags workspaces @Security BearerAuth @Produce json @Param id path string true "Workspace ID" @Success 200 {array} models.WorkspaceVersion @Router /workspaces/{id}/versions [get]
func (*WorkspaceHandler) ListWorkspaces ¶
func (h *WorkspaceHandler) ListWorkspaces(c *gin.Context)
ListWorkspaces godoc @Summary List all workspaces for the current user @Tags workspaces @Security BearerAuth @Produce json @Success 200 {array} models.Workspace @Failure 401 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Router /workspaces [get]
func (*WorkspaceHandler) PublishWorkspace ¶
func (h *WorkspaceHandler) PublishWorkspace(c *gin.Context)
PublishWorkspace godoc @Summary Publish workspace to OCI registry @Description Publish pixi.toml and pixi.lock to an OCI registry @Tags workspaces @Security BearerAuth @Accept json @Produce json @Param id path string true "Workspace ID" @Param request body PublishRequest true "Publish request" @Success 201 {object} service.PublicationResult @Failure 400 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Router /workspaces/{id}/publish [post]
func (*WorkspaceHandler) PushVersion ¶
func (h *WorkspaceHandler) PushVersion(c *gin.Context)
PushVersion godoc @Summary Push a new version to the server @Description Create a new workspace version and assign a tag @Tags workspaces @Security BearerAuth @Accept json @Produce json @Param id path string true "Workspace ID" @Param request body PushVersionRequest true "Push request" @Success 201 {object} PushVersionResponse @Failure 400 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Failure 409 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Router /workspaces/{id}/push [post]
func (*WorkspaceHandler) RemovePackages ¶
func (h *WorkspaceHandler) RemovePackages(c *gin.Context)
RemovePackages godoc @Summary Remove packages from an workspace @Tags workspaces @Security BearerAuth @Accept json @Produce json @Param id path string true "Workspace ID" @Param package path string true "Package name" @Success 202 {object} models.Job @Failure 400 {object} ErrorResponse @Failure 401 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Router /workspaces/{id}/packages/{package} [delete]
func (*WorkspaceHandler) RollbackToVersion ¶
func (h *WorkspaceHandler) RollbackToVersion(c *gin.Context)
RollbackToVersion godoc @Summary Rollback workspace to a previous version @Tags workspaces @Security BearerAuth @Accept json @Produce json @Param id path string true "Workspace ID" @Param request body RollbackRequest true "Rollback request" @Success 202 {object} models.Job @Router /workspaces/{id}/rollback [post]
func (*WorkspaceHandler) SavePixiToml ¶
func (h *WorkspaceHandler) SavePixiToml(c *gin.Context)
SavePixiToml godoc @Summary Save pixi.toml content for a workspace @Tags workspaces @Security BearerAuth @Accept json @Produce json @Param id path string true "Workspace ID" @Param request body SavePixiTomlRequest true "pixi.toml content" @Success 200 {object} PixiTomlResponse @Failure 400 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Router /workspaces/{id}/pixi-toml [put]
func (*WorkspaceHandler) ShareWorkspace ¶
func (h *WorkspaceHandler) ShareWorkspace(c *gin.Context)
ShareWorkspace godoc @Summary Share workspace with another user (owner only) @Tags workspaces @Security BearerAuth @Accept json @Produce json @Param id path string true "Workspace ID" @Param share body ShareWorkspaceRequest true "Share details" @Success 201 {object} models.Permission @Router /workspaces/{id}/share [post]
func (*WorkspaceHandler) SolveWorkspace ¶ added in v0.10.4
func (h *WorkspaceHandler) SolveWorkspace(c *gin.Context)
SolveWorkspace godoc @Summary Solve and install environment from current pixi.toml @Tags workspaces @Security BearerAuth @Produce json @Param id path string true "Workspace ID" @Success 202 {object} models.Job @Failure 400 {object} ErrorResponse @Failure 401 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Router /workspaces/{id}/solve [post]
func (*WorkspaceHandler) UnshareWorkspace ¶
func (h *WorkspaceHandler) UnshareWorkspace(c *gin.Context)
UnshareWorkspace godoc @Summary Revoke user access to workspace (owner only) @Tags workspaces @Security BearerAuth @Param id path string true "Workspace ID" @Param user_id path string true "User ID to revoke" @Success 204 @Router /workspaces/{id}/share/{user_id} [delete]
func (*WorkspaceHandler) UpdatePublication ¶
func (h *WorkspaceHandler) UpdatePublication(c *gin.Context)
UpdatePublication godoc @Summary Update a publication's visibility @Description Toggle the public/private visibility of a publication @Tags workspaces @Security BearerAuth @Accept json @Produce json @Param id path string true "Workspace ID" @Param pubId path string true "Publication ID" @Param request body UpdatePublicationRequest true "Update request" @Success 200 {object} service.PublicationResult @Failure 400 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Router /workspaces/{id}/publications/{pubId} [patch]