Documentation
¶
Index ¶
Constants ¶
View Source
const ( ExtJSON = ".json" ExtMD = ".md" FormatOASF = "oasf" FormatA2A = "a2a" FormatAgentSkill = "agent-skill" FormatSkill = "skill" FormatMCPGHCopiot = "mcp-ghcopilot" )
Variables ¶
View Source
var ErrUnsupportedRecord = errors.New("record does not contain the required module for this format")
ErrUnsupportedRecord indicates the record lacks the OASF module required by the requested format (e.g. asking for "a2a" on a record without integration/a2a). The request was well-formed; the data simply doesn't carry what the format reads.
Functions ¶
func ContentTypeForExtension ¶
ContentTypeForExtension returns the MIME content type for a file extension.
func KnownFormats ¶
func KnownFormats() []string
KnownFormats returns a sorted list of all registered format names.
func RegisterFormatter ¶
RegisterFormatter registers a named formatter. It is safe for concurrent use.
Types ¶
type Formatter ¶
type Formatter interface {
// Format transforms the OASF record into the target representation.
Format(record *corev1.Record) ([]byte, error)
// FileExtension returns the default file extension for this format (e.g. ".json", ".md").
FileExtension() string
}
Formatter converts an OASF record into a target format.
func GetFormatter ¶
GetFormatter returns the formatter registered under name, or an error if not found.
Click to show internal directories.
Click to hide internal directories.