Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Forma ¶
type Forma struct {
// contains filtered or unexported fields
}
Forma is the primary application service.
func New ¶
func New(cnf config.ServiceConfig, storage Storage, tracker Tracker) *Forma
New returns a new instance of the Forma service. It can raise the panic if base URL is invalid or HTML templates are not available.
func (*Forma) HandleGetV1 ¶
func (service *Forma) HandleGetV1(ctx context.Context, req v1.GetRequest) (resp v1.GetResponse)
HandleGetV1 handles an input request. Deprecated: TODO issue#version3.0 use SchemaEditor and gRPC gateway instead
func (*Forma) HandleInput ¶
func (service *Forma) HandleInput(ctx context.Context, req v1.PostRequest) (resp v1.PostResponse)
HandleInput handles an input request.
type Storage ¶
type Storage interface { // Schema returns the form schema with provided ID. Schema(context.Context, domain.ID) (domain.Schema, error) // Template returns the form template with provided ID. Template(context.Context, domain.ID) (domain.Template, error) // StoreInput stores an user input data. StoreInput(context.Context, domain.ID, domain.InputData) (*types.Input, error) }
Storage TODO issue#173
Click to show internal directories.
Click to hide internal directories.