Documentation
¶
Index ¶
- Constants
- func ParseDir(path string) (map[string]*ast.Package, error)
- func Render(data *RenderData)
- func SendRequest(ctx context.Context, nc *nats.EncodedConn, subject string, in, out interface{}) error
- type Encoder
- type Function
- type Handler
- type Logger
- type Package
- type Param
- type Parser
- type ParserConfig
- type RenderData
- type Reply
- type Runner
- type Service
- type ServiceConfig
Constants ¶
View Source
const DocPrefix = "@nats:"
View Source
const ENCODER = "AUTONATS_ENCODER"
Unique encoder id
Variables ¶
This section is empty.
Functions ¶
func Render ¶ added in v0.3.0
func Render(data *RenderData)
Types ¶
type Encoder ¶ added in v0.3.0
type Encoder struct{}
type Function ¶ added in v0.3.0
type Function struct { Name string Params []*Param Results []*Param HandlerConcurrency int // contains filtered or unexported fields }
func FuncFromType ¶ added in v0.3.0
type Logger ¶
type Logger interface {
Printf(format string, v ...interface{})
}
Logger for Service client
type Package ¶ added in v0.3.0
type Package struct { Services []*Service Imports map[string]string Name string BaseDir string OriginFileName string FileName string }
func PackageFromService ¶ added in v0.3.0
func (*Package) AddService ¶ added in v0.3.0
type Param ¶ added in v0.3.0
type Param struct {
Name, Type, TypePackage string
Pointer, Array bool
RequiredImports map[string]bool
}
func ParseParam ¶ added in v0.3.0
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser object
func (*Parser) AddRawPackages ¶ added in v0.3.0
type ParserConfig ¶
type ParserConfig struct { BaseDir string // Directory containing interfaces to scan DefaultTimeout int // Timeout for NATS requests OutputFileName string // Output file name }
Parser config
type RenderData ¶ added in v0.3.0
type Runner ¶ added in v0.3.0
type Runner struct {
// contains filtered or unexported fields
}
func StartRunner ¶ added in v0.3.0
type Service ¶ added in v0.3.0
type Service struct { InterfaceID string Name string Methods []*Function Imports map[string]string Basedir string PackageName string FileName string }
func ServicesFromFile ¶ added in v0.3.0
func ServicesFromPkg ¶ added in v0.3.0
type ServiceConfig ¶ added in v0.3.0
func ServiceConfigFromDoc ¶ added in v0.3.0
func ServiceConfigFromDoc(doc *ast.CommentGroup) ServiceConfig
Source Files
¶
Click to show internal directories.
Click to hide internal directories.