Documentation ¶
Index ¶
- Constants
- type Apply
- type Ast
- type AstParser
- type Bytes
- type Categorized
- type CategoryWriter
- type Comparator
- type Curator
- type Diff
- type Exposer
- type Field
- type Locator
- type Maven
- type Parser
- type Persister
- type Printer
- type Runner
- type Strategy
- type StrategyBuilder
- type StrategyName
- type Struct
- type TypeParser
- type Visitor
- type Walk
- type Walker
- type WalkerBuilder
- type WalkerName
- type Writer
Constants ¶
const ( NAME = "gopium" VERSION = "1.1.0" PKG = "https://github.com/1pkg/gopium" STAMP = "🌺 gopium @1pkg" )
list of global registered gopium constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Apply ¶
Apply defines abstraction for formatting original ast package by applying custom action accordingly to provided categorized collection
type Ast ¶
Ast defines abstraction for formatting original ast type spec accordingly to gopium struct
type Categorized ¶
Categorized defines abstraction for categorized structures collection
type CategoryWriter ¶
CategoryWriter defines abstraction for io witers generation with flexible category
type Comparator ¶
Comparator defines walker comparator abstraction that checks if ast type spec node needs to be visitted and returns relevant gopium struct and existing flag
type Curator ¶
Curator defines system level info curator abstraction to expose system word, aligment and cache levels sizes
type Diff ¶
type Diff func(Categorized, Categorized) ([]byte, error)
Diff defines abstraction for formatting gopium collections difference to byte slice
type Exposer ¶
Exposer defines type info exposer abstraction to expose name, size and aligment for provided data type
type Field ¶
type Field struct { Name string `gopium:"filter_pads,struct_annotate_comment,add_tag_group_force"` Type string `gopium:"filter_pads,struct_annotate_comment,add_tag_group_force"` Size int64 `gopium:"filter_pads,struct_annotate_comment,add_tag_group_force"` Align int64 `gopium:"filter_pads,struct_annotate_comment,add_tag_group_force"` Tag string `gopium:"filter_pads,struct_annotate_comment,add_tag_group_force"` Exported bool `gopium:"filter_pads,struct_annotate_comment,add_tag_group_force"` Embedded bool `gopium:"filter_pads,struct_annotate_comment,add_tag_group_force"` Doc []string `gopium:"filter_pads,struct_annotate_comment,add_tag_group_force"` Comment []string `gopium:"filter_pads,struct_annotate_comment,add_tag_group_force"` } // struct size: 114 bytes; struct align: 8 bytes; struct aligned size: 120 bytes; - 🌺 gopium @1pkg
Field defines single structure field data transfer object abstraction
type Locator ¶
type Locator interface { ID(token.Pos) string Loc(token.Pos) string Locator(string) (Locator, bool) Fset(string, *token.FileSet) (*token.FileSet, bool) Root() *token.FileSet }
Locator defines abstraction that helps to encapsulate pkgs file set related operations
type Parser ¶
type Parser interface { TypeParser AstParser }
Parser defines abstraction that aggregates ast and type parsers abstractions
type Persister ¶
Persister defines abstraction for ast node pesister with provided printer to provided writer by provided locator
type Strategy ¶
Strategy defines custom action abstraction that applies some action payload on struct and returns resulted struct object or error
type StrategyBuilder ¶
type StrategyBuilder interface {
Build(...StrategyName) (Strategy, error)
}
StrategyBuilder defines strategy builder abstraction that helps to create single strategy by strategies names
type StrategyName ¶
type StrategyName string
StrategyName defines registered strategy name abstraction used by StrategyBuilder to build registered strategies
type Struct ¶
type Struct struct { Name string `gopium:"filter_pads,struct_annotate_comment,add_tag_group_force"` Doc []string `gopium:"filter_pads,struct_annotate_comment,add_tag_group_force"` Comment []string `gopium:"filter_pads,struct_annotate_comment,add_tag_group_force"` Fields []Field `gopium:"filter_pads,struct_annotate_comment,add_tag_group_force"` } // struct size: 88 bytes; struct align: 8 bytes; struct aligned size: 88 bytes; - 🌺 gopium @1pkg
Struct defines single structure data transfer object abstraction
type TypeParser ¶
TypeParser defines abstraction for types packages parsing processor
type Visitor ¶
Visitor defines walker action abstraction that applies custom action on ast type spec node
type Walk ¶
Walk defines ast walker function abstraction that walks through type spec ast nodes with provided comparator function and applies some custom action
type Walker ¶
Walker defines hierarchical walker abstraction that applies some strategy to code tree structures and modifies them or creates other related side effects
type WalkerBuilder ¶
type WalkerBuilder interface {
Build(WalkerName) (Walker, error)
}
WalkerBuilder defines walker builder abstraction that helps to create single walker by walker name
type WalkerName ¶
type WalkerName string
WalkerName defines registered walker name abstraction used by walker builder to build registered walkers