Documentation
¶
Overview ¶
Package sdk is the public API surface of pdf-forge.
Extension authors and fork consumers should import only this package. All types, interfaces, and constructors needed to build custom injectors, mappers, providers, and authenticators are re-exported here as type aliases.
Example usage:
import "github.com/rendis/pdf-forge/core/sdk"
engine := sdk.New()
engine.RegisterInjector(&MyInjector{})
engine.Run()
Index ¶
- Constants
- Variables
- type Engine
- type FormatConfig
- type GetInjectablesResult
- type InitFunc
- type InjectableDataType
- type InjectableValue
- type Injector
- type InjectorContext
- type InjectorResult
- type ListItem
- type ListSchema
- type ListSchemaProvider
- type ListStyles
- type ListSymbol
- type ListValue
- type MapperContext
- type ProviderFormat
- type ProviderGroup
- type ProviderInjectable
- type RenderAuthClaims
- type RenderAuthenticator
- type RequestMapper
- type ResolveFunc
- type ResolveInjectablesRequest
- type ResolveInjectablesResult
- type TableCell
- type TableColumn
- type TableRow
- type TableSchemaProvider
- type TableStyles
- type TableValue
- type TypstDesignTokens
- type ValueType
- type WorkspaceInjectableProvider
Constants ¶
const ( ValueTypeString = entity.ValueTypeString ValueTypeNumber = entity.ValueTypeNumber ValueTypeBool = entity.ValueTypeBool ValueTypeTime = entity.ValueTypeTime ValueTypeTable = entity.ValueTypeTable ValueTypeImage = entity.ValueTypeImage ValueTypeList = entity.ValueTypeList )
const ( InjectableDataTypeText = entity.InjectableDataTypeText InjectableDataTypeNumber = entity.InjectableDataTypeNumber InjectableDataTypeDate = entity.InjectableDataTypeDate InjectableDataTypeCurrency = entity.InjectableDataTypeCurrency InjectableDataTypeBoolean = entity.InjectableDataTypeBoolean InjectableDataTypeImage = entity.InjectableDataTypeImage InjectableDataTypeTable = entity.InjectableDataTypeTable InjectableDataTypeList = entity.InjectableDataTypeList )
const ( ListSymbolBullet = entity.ListSymbolBullet ListSymbolNumber = entity.ListSymbolNumber ListSymbolDash = entity.ListSymbolDash ListSymbolRoman = entity.ListSymbolRoman ListSymbolLetter = entity.ListSymbolLetter )
ListSymbol constants.
Variables ¶
var ( StringValue = entity.StringValue NumberValue = entity.NumberValue BoolValue = entity.BoolValue TimeValue = entity.TimeValue ImageValue = entity.ImageValue TableValueData = entity.TableValueData ListValueData = entity.ListValueData )
var ( NewTableValue = entity.NewTableValue Cell = entity.Cell CellWithSpan = entity.CellWithSpan EmptyCell = entity.EmptyCell )
Table constructors and helpers.
var ( NewListValue = entity.NewListValue ListItemValue = entity.ListItemValue ListItemNested = entity.ListItemNested )
List constructors and helpers.
var ( StringPtr = entity.StringPtr IntPtr = entity.IntPtr )
var DefaultDesignTokens = pdfrenderer.DefaultDesignTokens
DefaultDesignTokens returns the built-in design tokens.
var New = bootstrap.New
New creates a new Engine with default configuration.
var NewWithConfig = bootstrap.NewWithConfig
NewWithConfig creates a new Engine that loads config from the given file path.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
Engine is the main entry point for pdf-forge. Create with New(), register extensions, then call Run().
type FormatConfig ¶
type FormatConfig = entity.FormatConfig
FormatConfig defines formatting options for an injector.
type GetInjectablesResult ¶
type GetInjectablesResult = port.GetInjectablesResult
GetInjectablesResult contains the list of available injectables and groups.
type InjectableDataType ¶
type InjectableDataType = entity.InjectableDataType
InjectableDataType represents the data type of an injectable variable.
type InjectableValue ¶
type InjectableValue = entity.InjectableValue
InjectableValue is the typed value returned by an injector.
type Injector ¶
Injector defines the interface that users implement for custom injectable resolution.
type InjectorContext ¶
type InjectorContext = entity.InjectorContext
InjectorContext encapsulates request context data with thread-safe access.
type InjectorResult ¶
type InjectorResult = entity.InjectorResult
InjectorResult is the result of resolving an injector.
type ListSchema ¶
type ListSchema = entity.ListSchema
ListSchema exposes the default configuration of a list injector to the frontend.
type ListSchemaProvider ¶
type ListSchemaProvider = port.ListSchemaProvider
ListSchemaProvider is an optional interface that list injectors can implement to expose their default configuration at the API level.
type ListStyles ¶
type ListStyles = entity.ListStyles
ListStyles defines styling options for list header or items.
type ListSymbol ¶
type ListSymbol = entity.ListSymbol
ListSymbol represents the marker/numbering style for a list.
type MapperContext ¶
type MapperContext = port.MapperContext
MapperContext contains the context for request mapping.
type ProviderFormat ¶
type ProviderFormat = port.ProviderFormat
ProviderFormat represents a format option for an injectable.
type ProviderGroup ¶
type ProviderGroup = port.ProviderGroup
ProviderGroup represents a custom group for organizing injectables.
type ProviderInjectable ¶
type ProviderInjectable = port.ProviderInjectable
ProviderInjectable represents an injectable definition from the provider.
type RenderAuthClaims ¶
type RenderAuthClaims = port.RenderAuthClaims
RenderAuthClaims contains authenticated caller information.
type RenderAuthenticator ¶
type RenderAuthenticator = port.RenderAuthenticator
RenderAuthenticator defines custom authentication for render endpoints.
type RequestMapper ¶
type RequestMapper = port.RequestMapper
RequestMapper defines the interface that users implement to map render requests.
type ResolveFunc ¶
type ResolveFunc = port.ResolveFunc
ResolveFunc is the function that resolves the injector value.
type ResolveInjectablesRequest ¶
type ResolveInjectablesRequest = port.ResolveInjectablesRequest
ResolveInjectablesRequest contains parameters for resolving injectable values.
type ResolveInjectablesResult ¶
type ResolveInjectablesResult = port.ResolveInjectablesResult
ResolveInjectablesResult contains the resolved values and any non-critical errors.
type TableColumn ¶
type TableColumn = entity.TableColumn
TableColumn defines a column in a dynamic table.
type TableSchemaProvider ¶
type TableSchemaProvider = port.TableSchemaProvider
TableSchemaProvider is an optional interface that table injectors can implement to expose their column structure at the API level.
type TableStyles ¶
type TableStyles = entity.TableStyles
TableStyles defines styling options for table headers and body content.
type TableValue ¶
type TableValue = entity.TableValue
TableValue represents a complete table with columns, rows, and styling.
type TypstDesignTokens ¶
type TypstDesignTokens = pdfrenderer.TypstDesignTokens
TypstDesignTokens holds all configurable design values for Typst PDF output. Customize via engine.SetDesignTokens().
type WorkspaceInjectableProvider ¶
type WorkspaceInjectableProvider = port.WorkspaceInjectableProvider
WorkspaceInjectableProvider defines the interface for dynamic workspace-specific injectables.