application

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 23, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrFormNotFound is returned when a form is not found
	ErrFormNotFound = errors.New("form not found")
	// ErrResponseNotFound is returned when a response is not found
	ErrResponseNotFound = errors.New("response not found")
	// ErrInvalidInput is returned when input validation fails
	ErrInvalidInput = errors.New("invalid input")
)

Functions

func NewEcho

func NewEcho(log logging.Logger) *echo.Echo

NewEcho creates a new Echo instance with common middleware and routes

func RegisterRoutes

func RegisterRoutes(e *echo.Echo, handlers ...interface{ Register(e *echo.Echo) })

RegisterRoutes registers all API routes

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client implements the form.Client interface

func NewClient

func NewClient() *Client

NewClient creates a new form client

func (*Client) DeleteForm

func (c *Client) DeleteForm(ctx context.Context, formID string) error

DeleteForm deletes a form by ID

func (*Client) DeleteResponse

func (c *Client) DeleteResponse(ctx context.Context, responseID string) error

DeleteResponse deletes a response by ID

func (*Client) GetForm

func (c *Client) GetForm(ctx context.Context, formID string) (*form.Form, error)

GetForm retrieves a form by ID

func (*Client) GetResponse

func (c *Client) GetResponse(ctx context.Context, responseID string) (*form.Response, error)

GetResponse retrieves a response by ID

func (*Client) ListForms

func (c *Client) ListForms(ctx context.Context) ([]form.Form, error)

ListForms lists all forms

func (*Client) ListResponses

func (c *Client) ListResponses(ctx context.Context, formID string) ([]form.Response, error)

ListResponses lists all responses for a form

func (*Client) SubmitForm

func (c *Client) SubmitForm(ctx context.Context, f form.Form) error

SubmitForm submits a new form

func (*Client) SubmitResponse

func (c *Client) SubmitResponse(ctx context.Context, formID string, response form.Response) error

SubmitResponse submits a form response

func (*Client) UpdateForm

func (c *Client) UpdateForm(ctx context.Context, formID string, f form.Form) error

UpdateForm updates an existing form

Directories

Path Synopsis
Package handler provides HTTP request handlers following a consistent pattern for dependency injection and configuration.
Package handler provides HTTP request handlers following a consistent pattern for dependency injection and configuration.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL