Versions in this module Expand all Collapse all v0 v0.12.0 Mar 9, 2026 v0.11.0 Mar 2, 2026 Changes in this version + const DefaultFileMode + var DefaultRegistry = NewConverterRegistry() + var ErrEmptyContext = errors.New("context is empty") + var ErrMissingName = errors.New("context name is required") + var ErrUnsupportedFormat = errors.New("unsupported output format") + func ConvertTo(ctx *Context, format string) ([]byte, error) + func RegisterConverter(converter Converter) + type Architecture struct + Diagrams []Diagram + Pattern string + Summary string + type BaseConverter struct + func NewBaseConverter(name, outputFile string) BaseConverter + func (c *BaseConverter) Name() string + func (c *BaseConverter) OutputFileName() string + func (c *BaseConverter) WriteFileWithData(data []byte, path string) error + func (c *BaseConverter) WriteFileWithDataAndMode(data []byte, path string, mode fs.FileMode) error + type Context struct + Architecture *Architecture + Commands map[string]string + Conventions []string + Dependencies *Dependencies + Description string + Files *Files + Language string + Name string + Notes []Note + Packages []Package + Related []Related + Schema string + Testing *Testing + Version string + func NewContext(name string) *Context + func Parse(data []byte) (*Context, error) + func ReadFile(path string) (*Context, error) + func (c *Context) AddConvention(convention string) + func (c *Context) AddNote(content string) + func (c *Context) AddNoteWithSeverity(title, content, severity string) + func (c *Context) AddPackage(path, purpose string) + func (c *Context) Marshal() ([]byte, error) + func (c *Context) SetCommand(name, command string) + func (c *Context) WriteFile(path string) error + func (c *Context) WriteFileWithMode(path string, mode os.FileMode) error + type ConversionError struct + Err error + Format string + func (e *ConversionError) Error() string + func (e *ConversionError) Unwrap() error + type Converter interface + Convert func(ctx *Context) ([]byte, error) + Name func() string + OutputFileName func() string + WriteFile func(ctx *Context, path string) error + func GetConverter(name string) (Converter, bool) + type ConverterRegistry struct + func NewConverterRegistry() *ConverterRegistry + func (r *ConverterRegistry) Convert(ctx *Context, format string) ([]byte, error) + func (r *ConverterRegistry) GenerateAll(ctx *Context, dir string) error + func (r *ConverterRegistry) Get(name string) (Converter, bool) + func (r *ConverterRegistry) Names() []string + func (r *ConverterRegistry) Register(converter Converter) + func (r *ConverterRegistry) WriteFile(ctx *Context, format, path string) error + type Dependencies struct + Development []Dependency + Runtime []Dependency + type Dependency struct + Name string + Purpose string + type Diagram struct + Content string + Title string + Type string + type Files struct + Config []string + EntryPoints []string + Ignore []string + type Note struct + Content string + Severity string + Title string + func (n *Note) GetSeverity() string + type Package struct + Path string + Public *bool + Purpose string + func (p *Package) IsPublic() bool + type ParseError struct + Err error + Path string + func (e *ParseError) Error() string + func (e *ParseError) Unwrap() error + type Related struct + Description string + Name string + URL string + type Testing struct + Coverage string + Framework string + Patterns []string + type WriteError struct + Err error + Format string + Path string + func (e *WriteError) Error() string + func (e *WriteError) Unwrap() error