Documentation ¶
Index ¶
- Constants
- Variables
- func Generate(tpset *structer.TypePackageSet, state *State, dctvCache *DirectivesCache, ...) (err error)
- func ParseTag(tag string) (t structtag.Tag)
- type AllowExtraDirective
- type Cleanup
- type Config
- type Directive
- type Directives
- type DirectivesCache
- type IgnoreDirective
- type InterceptDirective
- type Log
- type ShimDirective
- type ShimMode
- type State
- type StateTypes
- type TempFile
- func (t *TempFile) Cleanup(err *error)
- func (t *TempFile) Close() error
- func (t *TempFile) Copy(dest string, perms os.FileMode) (err error)
- func (t *TempFile) Read(p []byte) (n int, err error)
- func (t *TempFile) Reopen(offset int64, whence int) (n int64, err error)
- func (t *TempFile) Seek(offset int64, whence int) (int64, error)
- func (t *TempFile) Write(p []byte) (n int, err error)
- type TupleDirective
- type TypeParents
- type TypeQueue
- func (q *TypeQueue) Add(originPkg string, name string, obj types.Object, typ types.Type) *TypeQueueItem
- func (q *TypeQueue) AddObj(originPkg string, obj types.Object) *TypeQueueItem
- func (q *TypeQueue) AddType(originPkg string, name string, typ types.Type) *TypeQueueItem
- func (q *TypeQueue) Dequeue() *TypeQueueItem
- type TypeQueueItem
Constants ¶
View Source
const ( LogTypeSet = "typeset" // Log code indicating an error occurred in the types.Config.Error // callback, but execution continued. LogTypesConfigError = 1 // Log code indicating an error was returned by types.Config.Check, but // execution continued. LogTypeCheck = 2 )
Variables ¶
Functions ¶
func Generate ¶
func Generate(tpset *structer.TypePackageSet, state *State, dctvCache *DirectivesCache, config Config) (err error)
Types ¶
type AllowExtraDirective ¶
type AllowExtraDirective struct {
Types []string
}
func (AllowExtraDirective) Build ¶
func (i AllowExtraDirective) Build(tpset *structer.TypePackageSet, pkg string) (string, error)
type Config ¶
type Directive ¶
type Directive interface { Build(tpset *structer.TypePackageSet, pkg string) (string, error) Populate(args []string, kwargs map[string]string) error }
func ParseDirective ¶
type Directives ¶
type Directives struct {
// contains filtered or unexported fields
}
func NewDirectives ¶
func NewDirectives(tpset *structer.TypePackageSet, pkg string) *Directives
type DirectivesCache ¶
type DirectivesCache struct {
// contains filtered or unexported fields
}
func NewDirectivesCache ¶
func NewDirectivesCache(tpset *structer.TypePackageSet) *DirectivesCache
func (*DirectivesCache) Ensure ¶
func (d *DirectivesCache) Ensure(pkg string) (*Directives, error)
func (*DirectivesCache) Ignored ¶
func (d *DirectivesCache) Ignored(dctvs *Directives, fullName structer.TypeName) bool
func (*DirectivesCache) IgnoredPkg ¶
func (d *DirectivesCache) IgnoredPkg(fullName structer.TypeName) (bool, error)
type IgnoreDirective ¶
type IgnoreDirective struct {
Types []string
}
func (IgnoreDirective) Build ¶
func (i IgnoreDirective) Build(tpset *structer.TypePackageSet, pkg string) (string, error)
type InterceptDirective ¶
func (InterceptDirective) Build ¶
func (i InterceptDirective) Build(tpset *structer.TypePackageSet, pkg string) (string, error)
type ShimDirective ¶
func (ShimDirective) Build ¶
func (i ShimDirective) Build(tpset *structer.TypePackageSet, pkg string) (string, error)
type State ¶
type State struct { Types StateTypes NextID int `json:"-"` New bool `json:"-"` }
func LoadStateFromFile ¶
func (*State) SaveToFile ¶
func (*State) SortedNames ¶
type StateTypes ¶
func (StateTypes) MarshalJSON ¶
func (s StateTypes) MarshalJSON() (b []byte, err error)
func (*StateTypes) UnmarshalJSON ¶
func (s *StateTypes) UnmarshalJSON(b []byte) error
type TupleDirective ¶
type TupleDirective struct {
Types []string
}
func (TupleDirective) Build ¶
func (i TupleDirective) Build(tpset *structer.TypePackageSet, pkg string) (string, error)
type TypeParents ¶
func (TypeParents) Clone ¶
func (t TypeParents) Clone() TypeParents
func (TypeParents) Next ¶
func (t TypeParents) Next(tn structer.TypeName) TypeParents
type TypeQueue ¶
type TypeQueue struct {
// contains filtered or unexported fields
}
func NewTypeQueue ¶
func NewTypeQueue(tpset *structer.TypePackageSet) *TypeQueue
func (*TypeQueue) AddObj ¶
func (q *TypeQueue) AddObj(originPkg string, obj types.Object) *TypeQueueItem
func (*TypeQueue) Dequeue ¶
func (q *TypeQueue) Dequeue() *TypeQueueItem
type TypeQueueItem ¶
type TypeQueueItem struct { OriginPkg string Name string Obj types.Object Type types.Type Parents TypeParents }
func (*TypeQueueItem) Key ¶
func (tqi *TypeQueueItem) Key() string
func (*TypeQueueItem) Parent ¶
func (tqi *TypeQueueItem) Parent() *structer.TypeName
func (*TypeQueueItem) SetParents ¶
func (tqi *TypeQueueItem) SetParents(parents []structer.TypeName) *TypeQueueItem
func (*TypeQueueItem) String ¶
func (tqi *TypeQueueItem) String() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.