Documentation
¶
Overview ¶
Package ops provides shared operations for CLI and MCP server. Both interfaces use the same underlying logic to ensure consistency.
Index ¶
- Variables
- func DetectBackend(path string) string
- type ApplyOptions
- type ApplyResult
- type CreateOptions
- type CreateResult
- type GetSlideResult
- type ListSlidesResult
- type PlanOptions
- type PlanResult
- type ReadOptions
- type ReadResult
- type Registry
- type SlideInfo
- type UpdateSlideOptions
- type UpdateSlideResult
Constants ¶
This section is empty.
Variables ¶
var DefaultRegistry = NewRegistry()
DefaultRegistry is the global registry used by CLI and MCP.
var ErrConfirmRequired = errors.New("confirmation required: set confirm=true to apply changes")
ErrConfirmRequired is returned when confirm=false.
var ErrSlideNotFound = errors.New("slide not found")
ErrSlideNotFound is returned when a slide cannot be found.
Functions ¶
func DetectBackend ¶
DetectBackend determines the backend from a file path.
Types ¶
type ApplyOptions ¶
type ApplyOptions struct {
Confirm bool
}
ApplyOptions configures the ApplyChanges operation.
type ApplyResult ¶
ApplyResult contains the result of an ApplyChanges operation.
func ApplyChanges ¶
func ApplyChanges(ctx context.Context, ref model.Ref, diff *model.Diff, opts ApplyOptions) (*ApplyResult, error)
ApplyChanges applies a diff to the presentation.
func ApplyChangesFromPath ¶
func ApplyChangesFromPath(ctx context.Context, path string, diff *model.Diff, opts ApplyOptions) (*ApplyResult, error)
ApplyChangesFromPath is a convenience function that detects the backend.
type CreateOptions ¶
CreateOptions configures the CreateDeck operation.
type CreateResult ¶
CreateResult contains the result of a CreateDeck operation.
func CreateDeck ¶
func CreateDeck(ctx context.Context, deck *model.Deck, opts CreateOptions) (*CreateResult, error)
CreateDeck creates a new presentation.
type GetSlideResult ¶
GetSlideResult contains the result of a GetSlide operation.
func GetSlide ¶
func GetSlide(ctx context.Context, ref model.Ref, slideID string, f format.Format) (*GetSlideResult, error)
GetSlide returns a single slide by ID.
func GetSlideFromPath ¶
func GetSlideFromPath(ctx context.Context, path, slideID string, f format.Format) (*GetSlideResult, error)
GetSlideFromPath is a convenience function that detects the backend.
type ListSlidesResult ¶
ListSlidesResult contains the result of a ListSlides operation.
func ListSlides ¶
ListSlides returns all slides in a deck.
func ListSlidesFromPath ¶
func ListSlidesFromPath(ctx context.Context, path string, f format.Format) (*ListSlidesResult, error)
ListSlidesFromPath is a convenience function that detects the backend.
type PlanOptions ¶
PlanOptions configures the PlanChanges operation.
type PlanResult ¶
PlanResult contains the result of a PlanChanges operation.
func PlanChanges ¶
func PlanChanges(ctx context.Context, ref model.Ref, desired *model.Deck, opts PlanOptions) (*PlanResult, error)
PlanChanges computes the diff between current and desired states.
func PlanChangesFromPath ¶
func PlanChangesFromPath(ctx context.Context, path string, desired *model.Deck, opts PlanOptions) (*PlanResult, error)
PlanChangesFromPath is a convenience function that detects the backend.
type ReadOptions ¶
ReadOptions configures the ReadDeck operation.
type ReadResult ¶
ReadResult contains the result of a ReadDeck operation.
func ReadDeck ¶
func ReadDeck(ctx context.Context, ref model.Ref, opts ReadOptions) (*ReadResult, error)
ReadDeck reads a presentation and returns it in the requested format.
func ReadDeckFromPath ¶
func ReadDeckFromPath(ctx context.Context, path string, opts ReadOptions) (*ReadResult, error)
ReadDeckFromPath is a convenience function that detects the backend.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry manages backend implementations.
type SlideInfo ¶
type SlideInfo struct {
ID string `json:"id"`
SectionID string `json:"section_id"`
Title string `json:"title"`
Layout string `json:"layout"`
}
SlideInfo provides summary information about a slide.
type UpdateSlideOptions ¶
type UpdateSlideOptions struct {
Confirm bool
}
UpdateSlideOptions configures the UpdateSlide operation.
type UpdateSlideResult ¶
UpdateSlideResult contains the result of an UpdateSlide operation.
func UpdateSlide ¶
func UpdateSlide(ctx context.Context, ref model.Ref, slideID string, updates *model.Slide, opts UpdateSlideOptions) (*UpdateSlideResult, error)
UpdateSlide updates a single slide.