Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (28 sloc) 703 Bytes
package amboy
// Format defines a sequence of constants used to distinguish between
// different serialization formats for job objects used in the
// amboy.ConvertTo and amboy.ConvertFrom functions, which support the
// functionality of the Export and Import methods in the job
// interface.
type Format int
// Supported values of the Format type, which represent different
// supported serialization methods..
const (
BSON Format = iota
// String implements fmt.Stringer and pretty prints the format name.
func (f Format) String() string {
switch f {
case JSON:
return "json"
case BSON, BSON2:
return "bson"
case YAML:
return "yaml"
return "INVALID"