Documentation ¶
Index ¶
- Variables
- func Handle(w http.ResponseWriter, r *http.Request)
- func LoadInput(ctx context.Context, aSession *session.Session, ...) error
- type OperateOption
- func WithComponent(component *repository.Component) OperateOption
- func WithInput(input interface{}) OperateOption
- func WithOutput(output interface{}) OperateOption
- func WithPath(aPath *contract.Path) OperateOption
- func WithSession(session *session.Session) OperateOption
- func WithSessionOptions(options ...SessionOption) OperateOption
- func WithURI(URI string) OperateOption
- type Service
- func (s *Service) AddComponent(ctx context.Context, component *repository.Component) error
- func (s *Service) AddComponents(ctx context.Context, components *repository.Components) error
- func (s *Service) AddConnector(ctx context.Context, name string, driver string, dsn string) (*view.Connector, error)
- func (s *Service) AddConnectors(ctx context.Context, connectors ...*view.Connector) error
- func (s *Service) AddHandler(ctx context.Context, aPath *contract.Path, handler xhandler.Handler, ...) (*repository.Component, error)
- func (s *Service) AddMBusResources(ctx context.Context, resource ...*mbus.Resource) error
- func (s *Service) AddResource(name string, resource *view.Resource)
- func (s *Service) AddViews(ctx context.Context, views ...*view.View) (*repository.Component, error)
- func (s *Service) BuildPredicates(ctx context.Context, expression string, input interface{}, baseView *view.View) (*codec.Criteria, error)
- func (s *Service) Component(ctx context.Context, name string, opts ...repository.Option) (*repository.Component, error)
- func (s *Service) Exec(ctx context.Context, viewId string, options ...executor.Option) error
- func (s *Service) HTTPHandler(ctx context.Context, options ...gateway.Option) (http.Handler, error)
- func (s *Service) HandlerSession(ctx context.Context, aComponent *repository.Component, ...) (xhandler.Session, error)
- func (s *Service) LoadComponents(ctx context.Context, URL string, opts ...repository.Option) (*repository.Components, error)
- func (s *Service) NewComponentSession(aComponent *repository.Component, opts ...SessionOption) *session.Session
- func (s *Service) Operate(ctx context.Context, opts ...OperateOption) (interface{}, error)
- func (s *Service) PopulateInput(ctx context.Context, aComponent *repository.Component, request *http.Request, ...) error
- func (s *Service) Read(ctx context.Context, locator string, dest interface{}, option ...reader.Option) error
- func (s *Service) Reconcile(from interface{}, to interface{}) error
- func (s *Service) Resource() *view.Resource
- func (s *Service) Resources() repository.Resources
- func (s *Service) SignRequest(request *http.Request, claims *jwt.Claims) error
- func (s *Service) View(ctx context.Context, name string) (*view.View, error)
- type SessionOption
Constants ¶
This section is empty.
Variables ¶
var Version string
Functions ¶
Types ¶
type OperateOption ¶ added in v0.8.0
type OperateOption func(o *operateOptions)
func WithComponent ¶ added in v0.8.0
func WithComponent(component *repository.Component) OperateOption
func WithInput ¶ added in v0.8.0
func WithInput(input interface{}) OperateOption
func WithOutput ¶ added in v0.8.0
func WithOutput(output interface{}) OperateOption
func WithSession ¶ added in v0.8.0
func WithSession(session *session.Session) OperateOption
func WithSessionOptions ¶ added in v0.8.0
func WithSessionOptions(options ...SessionOption) OperateOption
func WithURI ¶ added in v0.8.0
func WithURI(URI string) OperateOption
WithURI returns with URI option
type Service ¶ added in v0.8.0
type Service struct {
// contains filtered or unexported fields
}
func New ¶ added in v0.8.0
New creates a datly service, repository allows you to bootstrap empty or existing yaml repository
func (*Service) AddComponent ¶ added in v0.8.0
AddComponent adds components to repository
func (*Service) AddComponents ¶ added in v0.8.0
func (s *Service) AddComponents(ctx context.Context, components *repository.Components) error
AddComponents adds components to repository
func (*Service) AddConnector ¶ added in v0.8.0
func (s *Service) AddConnector(ctx context.Context, name string, driver string, dsn string) (*view.Connector, error)
AddConnector adds connector
func (*Service) AddConnectors ¶ added in v0.8.0
AddConnectors adds connectors
func (*Service) AddHandler ¶ added in v0.8.0
func (s *Service) AddHandler(ctx context.Context, aPath *contract.Path, handler xhandler.Handler, options ...repository.ComponentOption) (*repository.Component, error)
AddHandler adds handler component to repository
func (*Service) AddMBusResources ¶ added in v0.8.10
AddMBusResources adds message bus resources
func (*Service) AddResource ¶ added in v0.8.0
AddResource adds named resource
func (*Service) BuildPredicates ¶ added in v0.8.0
func (s *Service) BuildPredicates(ctx context.Context, expression string, input interface{}, baseView *view.View) (*codec.Criteria, error)
BuildPredicates added build predicate method
func (*Service) Component ¶ added in v0.8.0
func (s *Service) Component(ctx context.Context, name string, opts ...repository.Option) (*repository.Component, error)
Component returns component matched by name, optionally you can use METHOD:component name notation
func (*Service) HTTPHandler ¶ added in v0.8.0
func (*Service) HandlerSession ¶ added in v0.8.0
func (s *Service) HandlerSession(ctx context.Context, aComponent *repository.Component, aSession *session.Session) (xhandler.Session, error)
HandlerSession returns handler session
func (*Service) LoadComponents ¶ added in v0.8.0
func (s *Service) LoadComponents(ctx context.Context, URL string, opts ...repository.Option) (*repository.Components, error)
LoadComponents loads components into registry, it returns loaded components
func (*Service) NewComponentSession ¶ added in v0.8.0
func (s *Service) NewComponentSession(aComponent *repository.Component, opts ...SessionOption) *session.Session
func (*Service) Operate ¶ added in v0.8.0
func (s *Service) Operate(ctx context.Context, opts ...OperateOption) (interface{}, error)
Operate performs respective operation on supplied component
func (*Service) PopulateInput ¶ added in v0.8.0
func (*Service) Read ¶ added in v0.8.0
func (s *Service) Read(ctx context.Context, locator string, dest interface{}, option ...reader.Option) error
Read reads data from a view
func (*Service) Resources ¶ added in v0.8.0
func (s *Service) Resources() repository.Resources
Resource returns resource
func (*Service) SignRequest ¶ added in v0.8.0
SignRequest signes http request with the supplied claim
type SessionOption ¶ added in v0.8.0
type SessionOption func(o *sessionOptions)
func WithForm ¶ added in v0.8.0
func WithForm(form *hstate.Form) SessionOption
func WithRequest ¶ added in v0.8.0
func WithRequest(request *http.Request) SessionOption
func WithStateResource ¶ added in v0.8.0
func WithStateResource(resource state.Resource) SessionOption
Directories ¶
Path | Synopsis |
---|---|
e2e
|
|
Package gateway defines gateway service
|
Package gateway defines gateway service |
runtime/apigw
Package apigw defines apigw lambda datly runtime
|
Package apigw defines apigw lambda datly runtime |
runtime/gcf
Package gcf defines Google Cloud Functions entry point
|
Package gcf defines Google Cloud Functions entry point |
runtime/gcr
Package gcr defines Google Cloud Exec entry point
|
Package gcr defines Google Cloud Exec entry point |
runtime/lambda
Package lambda defines lambda datly runtime
|
Package lambda defines lambda datly runtime |
internal
|
|
codegen
Package codegen implements code generation logic
|
Package codegen implements code generation logic |
inference
Package inference defines process that automatically determines the data type of a variable or expression from database meta information
|
Package inference defines process that automatically determines the data type of a variable or expression from database meta information |
translator
Package translator implements dql to datly rule translator
|
Package translator implements dql to datly rule translator |
plugins
module
|
|
dbms
Package dbms defines service to crate or check table schema
|
Package dbms defines service to crate or check table schema |
utils
|
|
xdatly
module
|
|
xregistry
|
|
types/core
Module
|
|
types/custom
Module
|