Documentation
¶
Index ¶
Constants ¶
View Source
const ( // FormatText is used to configure the Encoder to generate // its output in text format. FormatText = "text" // FormatJSON is used to configure the Encoder to generate // its output in JSON format. FormatJSON = "json" )
View Source
const ( // DefaultOutputDir is the default directory all files will be // written in when a custom directory is not specified. DefaultOutputDir = "./" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Encoder ¶
type Encoder interface { // Encode takes a Certificate object, encodes it, // and returns a corresponding Result object. // // It returns a non-nil error in case it fails to // encode the given Certificate. Encode(cert.Certificate) (Result, error) }
Encoder defines the operations each encoder implementation needs to satisfy.
type Options ¶
type Options struct { // Format configures the output format of the encoder // (e.g. "text" or "json"). Format string // WriteToDisk controls whether or not the resulting // artifact should be written to disk. WriteToDisk bool // OutputDir configures the directory in which files // whould be written when WriteToDisk is set to `true`. OutputDir string }
Options configures the behavior of the different types of Encoder.
Click to show internal directories.
Click to hide internal directories.