mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-12-23 18:52:11 +00:00
55aacaf4b0
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
49 lines
751 B
Go
49 lines
751 B
Go
package encoder
|
|
|
|
import (
|
|
"context"
|
|
"io"
|
|
)
|
|
|
|
type OptionFlag uint8
|
|
|
|
const (
|
|
HTMLEscapeOption OptionFlag = 1 << iota
|
|
IndentOption
|
|
UnorderedMapOption
|
|
DebugOption
|
|
ColorizeOption
|
|
ContextOption
|
|
NormalizeUTF8Option
|
|
FieldQueryOption
|
|
)
|
|
|
|
type Option struct {
|
|
Flag OptionFlag
|
|
ColorScheme *ColorScheme
|
|
Context context.Context
|
|
DebugOut io.Writer
|
|
DebugDOTOut io.WriteCloser
|
|
}
|
|
|
|
type EncodeFormat struct {
|
|
Header string
|
|
Footer string
|
|
}
|
|
|
|
type EncodeFormatScheme struct {
|
|
Int EncodeFormat
|
|
Uint EncodeFormat
|
|
Float EncodeFormat
|
|
Bool EncodeFormat
|
|
String EncodeFormat
|
|
Binary EncodeFormat
|
|
ObjectKey EncodeFormat
|
|
Null EncodeFormat
|
|
}
|
|
|
|
type (
|
|
ColorScheme = EncodeFormatScheme
|
|
ColorFormat = EncodeFormat
|
|
)
|