Documentation ¶
Index ¶
- func CreateMarshalJSON(ic *Inception, si *StructInfo) error
- func CreateUnmarshalJSON(ic *Inception, si *StructInfo) error
- func RenderTemplate(ic *Inception) ([]byte, error)
- type ConditionalWrite
- func (w *ConditionalWrite) DeleteLast()
- func (w *ConditionalWrite) Flush() string
- func (w *ConditionalWrite) FlushTo(out string) string
- func (w *ConditionalWrite) GetQueued() string
- func (w *ConditionalWrite) Last() string
- func (w *ConditionalWrite) Write(s string)
- func (w *ConditionalWrite) WriteFlush(s string) string
- type FieldByJsonName
- type Inception
- type MarshalerFaster
- type StructField
- type StructInfo
- type UnmarshalFaster
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateMarshalJSON ¶
func CreateMarshalJSON(ic *Inception, si *StructInfo) error
func CreateUnmarshalJSON ¶
func CreateUnmarshalJSON(ic *Inception, si *StructInfo) error
func RenderTemplate ¶
Types ¶
type ConditionalWrite ¶
type ConditionalWrite struct {
Queued []string
}
ConditionalWrite is a stack containing a number of pending writes
func (*ConditionalWrite) DeleteLast ¶
func (w *ConditionalWrite) DeleteLast()
DeleteLast will delete the last added write
func (*ConditionalWrite) Flush ¶
func (w *ConditionalWrite) Flush() string
Flush will return all queued writes, and return "" (empty string) in nothing has been queued "buf.WriteByte('" + byte + "')" + '\n' if one bute has been queued. "buf.WriteString(`" + string + "`)" + "\n" if more than one byte has been queued.
func (*ConditionalWrite) FlushTo ¶
func (w *ConditionalWrite) FlushTo(out string) string
func (*ConditionalWrite) GetQueued ¶
func (w *ConditionalWrite) GetQueued() string
GetQueued will return the current queued content without flushing.
func (*ConditionalWrite) Last ¶
func (w *ConditionalWrite) Last() string
Last will return the last added write
func (*ConditionalWrite) Write ¶
func (w *ConditionalWrite) Write(s string)
Write will add a string to be written
func (*ConditionalWrite) WriteFlush ¶
func (w *ConditionalWrite) WriteFlush(s string) string
WriteFlush will add a string and return the Flush result for the queue
type FieldByJsonName ¶
type FieldByJsonName []*StructField
func (FieldByJsonName) Len ¶
func (a FieldByJsonName) Len() int
func (FieldByJsonName) Less ¶
func (a FieldByJsonName) Less(i, j int) bool
func (FieldByJsonName) Swap ¶
func (a FieldByJsonName) Swap(i, j int)
type Inception ¶
type Inception struct { InputPath string OutputPath string PackageName string PackagePath string OutputImports map[string]bool OutputFuncs []string // contains filtered or unexported fields }
func NewInception ¶
func (*Inception) Add ¶
func (i *Inception) Add(obj shared.InceptionType)
func (*Inception) AddMany ¶
func (i *Inception) AddMany(objs []shared.InceptionType)
type MarshalerFaster ¶
type MarshalerFaster interface {
MarshalJSONBuf(buf fflib.EncodingBuffer) error
}
type StructField ¶
type StructInfo ¶
type StructInfo struct { Name string Obj interface{} Typ reflect.Type Fields []*StructField Options shared.StructOptions }
func NewStructInfo ¶
func NewStructInfo(obj shared.InceptionType) *StructInfo
func (*StructInfo) FieldsByFirstByte ¶
func (si *StructInfo) FieldsByFirstByte() map[string][]*StructField
func (*StructInfo) ReverseFields ¶
func (si *StructInfo) ReverseFields() []*StructField
type UnmarshalFaster ¶
type UnmarshalFaster interface {
UnmarshalJSONFFLexer(l *fflib.FFLexer, state fflib.FFParseState) error
}
Click to show internal directories.
Click to hide internal directories.