kibuwire

package
v0.0.1-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IsKibu         = decorators.HasPrefix("kibu")
	IsKibuProvider = decorators.HasPrefix("kibu:provider")

	IsKibuWorkflow       = decorators.HasPrefix("kibu:workflow")
	IsKibuWorkflowUpdate = decorators.HasPrefix("kibu:workflow:update")
	IsKibuWorkflowQuery  = decorators.HasPrefix("kibu:workflow:query")
	IsKibuWorkflowSignal = decorators.HasPrefix("kibu:workflow:signal")
	IsKibuWorkflowExec   = decorators.HasPrefix("kibu:workflow:execute")

	IsKibuActivity       = decorators.HasPrefix("kibu:activity")
	IsKibuActivityMethod = decorators.HasPrefix("kibu:activity:method")

	IsKibuService       = decorators.HasPrefix("kibu:service")
	IsKibuServiceMethod = decorators.HasPrefix("kibu:service:method")
)
View Source
var Analyzer = &analysis.Analyzer{
	Name:             "kibuwire",
	Doc:              "Analyzes go source code for kibu provider annotations",
	Requires:         []*analysis.Analyzer{inspect.Analyzer},
	ResultType:       resultType,
	RunDespiteErrors: true,
	Run:              run,
}

Functions

func FilterByGroupName

func FilterByGroupName(name string) func(p *Provider) bool

func FilterUngrouped

func FilterUngrouped(p *Provider) bool

func GroupByFQN

func GroupByFQN() func(p *Provider) string

func GroupByName

func GroupByName() func(p *Provider) string

func GroupByPackage

func GroupByPackage(p *Provider) string

func Main

func Main() (int, error)

Types

type Artifact

type Artifact struct {
	Providers ProviderList
	*modspecv2.PackageArtifact
}

func FromPass

func FromPass(pass *analysis.Pass) (*Artifact, bool)

type Group

type Group struct {
	Name   string
	Import string
}

func (*Group) FQN

func (g *Group) FQN() string

type Module

type Module struct {
	// contains filtered or unexported fields
}

func (*Module) File

func (k *Module) File() *jen.File

func (*Module) OutputPath

func (k *Module) OutputPath() string

type Provider

type Provider struct {
	Symbol       ast.Decl
	ProviderLine decorators.Line
	Decorators   decorators.List
	GoPackage    *types.Package
	Group        *Group
}

func (*Provider) SymbolName

func (p *Provider) SymbolName() string

type ProviderList

type ProviderList []*Provider

func (ProviderList) Filter

func (list ProviderList) Filter(filter func(p *Provider) bool) ProviderList

func (ProviderList) Find

func (list ProviderList) Find(predicate func(p *Provider) bool) (*Provider, bool)

func (ProviderList) First

func (list ProviderList) First() (*Provider, bool)

func (ProviderList) GroupBy

func (list ProviderList) GroupBy(groupBy func(p *Provider) string) *orderedmap.OrderedMap[string, ProviderList]

func (ProviderList) Len

func (list ProviderList) Len() int

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL