Documentation
¶
Overview ¶
Package artifact owns session-scoped, explicitly registered workspace deliverables. It stores metadata only; file content remains in the workspace.
Index ¶
- Constants
- Variables
- type Kind
- type Loader
- type Record
- type Recorder
- type RegisterRequest
- type Service
- func (s *Service) List(ctx context.Context, sessionID, workspace string) ([]Record, error)
- func (s *Service) Open(ctx context.Context, sessionID, workspace, artifactID string) (Record, *os.File, error)
- func (s *Service) Register(ctx context.Context, req RegisterRequest, recorder Recorder) (Record, error)
- func (s *Service) Resolve(ctx context.Context, sessionID, workspace, artifactID string) (Record, string, error)
- type Status
Constants ¶
View Source
const ( MaxInlineTextSize int64 = 5 << 20 MaxInlineBinarySize int64 = 25 << 20 MaxDownloadSize int64 = 250 << 20 )
Variables ¶
View Source
var ErrTooLarge = errors.New("artifact is too large")
Functions ¶
This section is empty.
Types ¶
type Record ¶
type Record struct {
ID string `json:"id"`
SessionID string `json:"session_id"`
RelativePath string `json:"relative_path"`
Title string `json:"title"`
Kind Kind `json:"kind"`
MediaType string `json:"media_type"`
Size int64 `json:"size"`
Revision int `json:"revision"`
UpdatedAt time.Time `json:"updated_at"`
Status Status `json:"status"`
Focus bool `json:"focus,omitempty"`
}
Record is the metadata persisted in a session entry and exposed to the Web UI. It intentionally contains neither an absolute path nor file content.
type Recorder ¶
Recorder is the durable boundary. Register never publishes a revision until this append succeeds.
type RegisterRequest ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) Open ¶
func (s *Service) Open(ctx context.Context, sessionID, workspace, artifactID string) (Record, *os.File, error)
Open returns a read-only file descriptor constrained by os.Root. Unlike a validate-then-os.Open sequence, Root.Open prevents a concurrent symlink swap from redirecting the read outside the workspace.
Click to show internal directories.
Click to hide internal directories.