Documentation ¶
Overview ¶
Package bundleformat provides helper functions related with bundle formatting for plugins implementing the BundlePublisher interface. BundlePublisher plugins should use this package as a way to have a standarized name for bundle formats in their configuration, and avoid the re-implementation of bundle parsing logic of formats supported in this package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Format ¶
type Format int
Format represents the bundle formats that are supported by the Formatter.
func FromString ¶
FromString returns the Format corresponding to the provided string.
type Formatter ¶
type Formatter struct {
// contains filtered or unexported fields
}
Formatter formats a bundle in different formats.
func NewFormatter ¶
NewFormatter return a new *Formatter with the *types.Bundle provided. Use the Bytes() function to get a slice of bytes with the bundle formatted in the format specified.