Documentation
¶
Index ¶
- func NewD2OracleRepository() repository.OracleRepository
- func NewD2Repository() repository.DiagramRepository
- type D2OracleRepository
- func (r *D2OracleRepository) CreateElement(ctx context.Context, diagramID string, boardPath []string, key string) (*entity.OracleResult, error)
- func (r *D2OracleRepository) DeleteElement(ctx context.Context, diagramID string, boardPath []string, key string) (*entity.OracleResult, error)
- func (r *D2OracleRepository) GetChildren(ctx context.Context, diagramID string, boardPath []string, parentID string) ([]string, error)
- func (r *D2OracleRepository) GetEdge(ctx context.Context, diagramID string, boardPath []string, edgeID string) (*entity.GraphEdge, error)
- func (r *D2OracleRepository) GetObject(ctx context.Context, diagramID string, boardPath []string, objectID string) (*entity.GraphObject, error)
- func (r *D2OracleRepository) LoadDiagram(ctx context.Context, diagramID string, content string) error
- func (r *D2OracleRepository) MoveElement(ctx context.Context, diagramID string, boardPath []string, key, newKey string, ...) (*entity.OracleResult, error)
- func (r *D2OracleRepository) RenameElement(ctx context.Context, diagramID string, boardPath []string, key, newName string) (*entity.OracleResult, error)
- func (r *D2OracleRepository) SerializeDiagram(ctx context.Context, diagramID string) (string, error)
- func (r *D2OracleRepository) SetAttribute(ctx context.Context, diagramID string, boardPath []string, key string, ...) (*entity.OracleResult, error)
- type D2Repository
- func (r *D2Repository) Create(ctx context.Context, diagram *entity.Diagram) error
- func (r *D2Repository) Export(ctx context.Context, diagramID string, format entity.ExportFormat) (io.Reader, error)
- func (r *D2Repository) Render(ctx context.Context, content string, format entity.ExportFormat, ...) (io.Reader, error)
- type OracleSession
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewD2OracleRepository ¶ added in v0.2.0
func NewD2OracleRepository() repository.OracleRepository
NewD2OracleRepository creates a new D2 repository with Oracle support
func NewD2Repository ¶
func NewD2Repository() repository.DiagramRepository
NewD2Repository creates a new D2 repository instance.
Types ¶
type D2OracleRepository ¶ added in v0.2.0
type D2OracleRepository struct {
*D2Repository
// contains filtered or unexported fields
}
D2OracleRepository extends D2Repository with Oracle capabilities
func (*D2OracleRepository) CreateElement ¶ added in v0.2.0
func (r *D2OracleRepository) CreateElement(ctx context.Context, diagramID string, boardPath []string, key string) (*entity.OracleResult, error)
CreateElement creates a new shape or connection
func (*D2OracleRepository) DeleteElement ¶ added in v0.2.0
func (r *D2OracleRepository) DeleteElement(ctx context.Context, diagramID string, boardPath []string, key string) (*entity.OracleResult, error)
DeleteElement deletes a shape or connection
func (*D2OracleRepository) GetChildren ¶ added in v0.2.0
func (r *D2OracleRepository) GetChildren(ctx context.Context, diagramID string, boardPath []string, parentID string) ([]string, error)
GetChildren retrieves child element IDs
func (*D2OracleRepository) GetEdge ¶ added in v0.2.0
func (r *D2OracleRepository) GetEdge(ctx context.Context, diagramID string, boardPath []string, edgeID string) (*entity.GraphEdge, error)
GetEdge retrieves edge information
func (*D2OracleRepository) GetObject ¶ added in v0.2.0
func (r *D2OracleRepository) GetObject(ctx context.Context, diagramID string, boardPath []string, objectID string) (*entity.GraphObject, error)
GetObject retrieves object information
func (*D2OracleRepository) LoadDiagram ¶ added in v0.2.0
func (r *D2OracleRepository) LoadDiagram(ctx context.Context, diagramID string, content string) error
LoadDiagram loads a diagram from D2 text
func (*D2OracleRepository) MoveElement ¶ added in v0.2.0
func (r *D2OracleRepository) MoveElement(ctx context.Context, diagramID string, boardPath []string, key, newKey string, includeDescendants bool) (*entity.OracleResult, error)
MoveElement moves a shape to a new container
func (*D2OracleRepository) RenameElement ¶ added in v0.2.0
func (r *D2OracleRepository) RenameElement(ctx context.Context, diagramID string, boardPath []string, key, newName string) (*entity.OracleResult, error)
RenameElement renames a shape or connection
func (*D2OracleRepository) SerializeDiagram ¶ added in v0.2.0
func (r *D2OracleRepository) SerializeDiagram(ctx context.Context, diagramID string) (string, error)
SerializeDiagram converts the current graph state back to D2 text
func (*D2OracleRepository) SetAttribute ¶ added in v0.2.0
func (r *D2OracleRepository) SetAttribute(ctx context.Context, diagramID string, boardPath []string, key string, tag, value *string) (*entity.OracleResult, error)
SetAttribute sets attributes on a shape or connection
type D2Repository ¶
type D2Repository struct {
// contains filtered or unexported fields
}
D2Repository implements the DiagramRepository interface using D2.