Documentation ¶
Index ¶
- Constants
- func Unit(file CodeFileWriter) (unit processes.Unit)
- type CodeFileUnit
- type CodeFileWriter
- type Component
- type Components
- type DeploysFile
- type FnAnnotationCodeWriter
- type FnAnnotationCodeWriters
- type Function
- func (f *Function) Annotation(name string) (params []string, has bool)
- func (f *Function) Authorization() (ok bool)
- func (f *Function) Barrier() (ok bool)
- func (f *Function) Cache() (cmd string, ttl string, has bool)
- func (f *Function) CacheControl() (maxAge int, public bool, mustRevalidate bool, proxyRevalidate bool, has bool, ...)
- func (f *Function) Deprecated() (ok bool)
- func (f *Function) Description() (description string)
- func (f *Function) Errors() (errs string)
- func (f *Function) FieldImports() (v sources.Imports)
- func (f *Function) ForeachAnnotations(fn func(name string, params []string))
- func (f *Function) Handle(ctx context.Context) (result interface{}, err error)
- func (f *Function) HostServiceName() (name string)
- func (f *Function) Internal() (ok bool)
- func (f *Function) Metric() (ok bool)
- func (f *Function) Name() (name string)
- func (f *Function) Parse(ctx context.Context) (err error)
- func (f *Function) Permission() (ok bool)
- func (f *Function) Readonly() (ok bool)
- func (f *Function) Title() (title string)
- func (f *Function) Validation() (title string, ok bool)
- type FunctionError
- type FunctionField
- type Functions
- type Generator
- type Service
- type ServiceFile
- type Services
Constants ¶
View Source
const (
DefaultDir = "modules"
)
Variables ¶
This section is empty.
Functions ¶
func Unit ¶
func Unit(file CodeFileWriter) (unit processes.Unit)
Types ¶
type CodeFileUnit ¶
type CodeFileUnit struct {
// contains filtered or unexported fields
}
type CodeFileWriter ¶
func NewDeploysFile ¶
func NewDeploysFile(dir string, services Services) (file CodeFileWriter)
func NewServiceFile ¶
func NewServiceFile(service *Service, annotations FnAnnotationCodeWriters) (file CodeFileWriter)
type Components ¶
type Components []*Component
func (Components) Len ¶
func (components Components) Len() int
func (Components) Less ¶
func (components Components) Less(i, j int) bool
func (Components) Swap ¶
func (components Components) Swap(i, j int)
type DeploysFile ¶
type DeploysFile struct {
// contains filtered or unexported fields
}
func (*DeploysFile) Name ¶
func (s *DeploysFile) Name() (name string)
type FnAnnotationCodeWriter ¶
type FnAnnotationCodeWriter interface { Annotation() (annotation string) HandleBefore(ctx context.Context, params []string, hasFnParam bool, hasFnResult bool) (code gcg.Code, err error) HandleAfter(ctx context.Context, params []string, hasFnParam bool, hasFnResult bool) (code gcg.Code, err error) ProxyBefore(ctx context.Context, params []string, hasFnParam bool, hasFnResult bool) (code gcg.Code, err error) ProxyAfter(ctx context.Context, params []string, hasFnParam bool, hasFnResult bool) (code gcg.Code, err error) }
type FnAnnotationCodeWriters ¶
type FnAnnotationCodeWriters []FnAnnotationCodeWriter
func (FnAnnotationCodeWriters) Get ¶
func (writers FnAnnotationCodeWriters) Get(annotation string) (w FnAnnotationCodeWriter, has bool)
type Function ¶
type Function struct { Ident string VarIdent string ProxyIdent string ProxyAsyncIdent string HandlerIdent string Annotations sources.Annotations Param *FunctionField Result *FunctionField // contains filtered or unexported fields }
func (*Function) Annotation ¶
func (*Function) Authorization ¶
func (*Function) CacheControl ¶
func (*Function) Deprecated ¶
func (*Function) Description ¶
func (*Function) FieldImports ¶
func (*Function) ForeachAnnotations ¶
func (*Function) HostServiceName ¶
func (*Function) Permission ¶
func (*Function) Validation ¶
type FunctionError ¶
type FunctionField ¶
type FunctionField struct { Name string Type *sources.Type // contains filtered or unexported fields }
func (*FunctionField) Paths ¶
func (sf *FunctionField) Paths() (paths []string)
func (*FunctionField) String ¶
func (sf *FunctionField) String() (v string)
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func NewGenerator ¶
func NewGenerator(dir string, annotations FnAnnotationCodeWriters, verbose bool) *Generator
type ServiceFile ¶
type ServiceFile struct {
// contains filtered or unexported fields
}
func (*ServiceFile) Name ¶
func (s *ServiceFile) Name() (name string)
Click to show internal directories.
Click to hide internal directories.