Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrDuplicateNames = errRange.New( "Duplicate Cron Jobs", "Multiple cron jobs with the same name were found. Cronjob names must be unique.", ) ErrEndpointNotAnAPI = errRange.New( "Invalid call to cron.NewJob", "Endpoint does not reference an Encore API", ) )
View Source
var JobParser = &resourceparser.Parser{ Name: "Cron Job", InterestingImports: []paths.Pkg{"encore.dev/cron"}, Run: func(p *resourceparser.Pass) { name := pkginfo.QualifiedName{PkgPath: "encore.dev/cron", Name: "NewJob"} spec := &parseutil.ReferenceSpec{ MinTypeArgs: 0, MaxTypeArgs: 0, Parse: parseCronJob, } parseutil.FindPkgNameRefs(p.Pkg, []pkginfo.QualifiedName{name}, func(file *pkginfo.File, name pkginfo.QualifiedName, stack []ast.Node) { parseutil.ParseReference(p, spec, parseutil.ReferenceData{ File: file, Stack: stack, ResourceFunc: name, }) }) }, }
Functions ¶
This section is empty.
Types ¶
type Job ¶
type Job struct { AST *ast.CallExpr File *pkginfo.File Name string // The unique name of the cron job Doc string // The documentation on the cron job Title string // cron job title Schedule string Endpoint pkginfo.QualifiedName // The Endpoint reference EndpointAST ast.Node }
func (*Job) ResourceName ¶
Click to show internal directories.
Click to hide internal directories.