package
0.0.0-20241227184035-be8c621d8cb0
Repository: https://github.com/ainsleydev/webkit.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
GetSettings is a helper function to get the settings from the context.
GlobalsContextKey returns the cache & context key for the global that resides in the context.
No description provided by the author
MustGetSettings is a helper function to get the settings from the context.
New creates a new Payload adapter with the provided options.
WithAPIKey is a functional option to set the API key for the Payload API.
WithBaseURL is a functional option to set the base URL of the Payload API.
WithCache is a functional option to set the cache store for the adapter.
WithGlobalMiddleware is a functional option to set the global middleware for the adapter.
WithMaintenanceHandler is a functional option to set the maintenance handler for the adapter.
WithNavigation is a functional option to set the navigation global middleware for the adapter.
WithSettings is a helper function to set the Payload Settings in the context.
WithSilentLogs is a functional option to disable logs from all handlers and middleware.
WithWebkit is a functional option to set the Webkit instance.

# Constants

CollectionMedia defines the Payload media collection slug.
CollectionRedirects defines the Payload redirects collection slug.
CollectionUsers defines the Payload users collection slug.
No description provided by the author
FormBlockTypeCheckbox maps to a checkbox input on your front-end.
FormBlockTypeCountry maps to a select input on your front-end.
FormBlockTypeEmail maps to a text input with type email on your front-end.
FormBlockTypeMessage maps to a RichText component on your front-end.
FormBlockTypeNumber maps to a number input on your front-end.
FormBlockTypePayment is used to collect payments from forms.
FormBlockTypeSelect maps to a select input on your front-end.
FormBlockTypeState maps to a select input on your front-end.
FormBlockTypeText maps to a text input in your front-end.
FormBlockTypeTextarea maps to a textarea input on your front-end.
FormConfirmationTypeMessage displays a message to the user after submitting the form.
FormConfirmationTypeRedirect redirects the user to a new page after submitting the form.
GlobalNavigation defines the global navigation slug.
GlobalSettings defines the global settings slug.
SettingsContextKey defines the key for obtaining the settings from the context.

# Variables

ErrSettingsNotFound is returned when the settings are not found in the context.

# Structs

Adapter is a client that is used to interact with the Payload API and attach handlers and middleware to the HTTP Server.
Block defines a common structure of a singular block layout from PayloadCMS.
Form defines a singular form collection type in the Form Builder Plugin within Payload CMS See: https://payloadcms.com/docs/plugins/form-builder Blocks example within the frontend: https://github.com/payloadcms/payload/tree/main/examples/form-builder/next-pages/components/Blocks TypeScript Bindings: https://github.com/payloadcms/payload/blob/main/packages/plugin-form-builder/src/types.ts.
FormEmail represents an email configuration for a form.
FormField represents a field in the Payload form builder.
FormOption defines a singular option within a select field.
FormRedirect defines the type of confirmation message to display after.
FormSubmission defines a singular submission to a form in the Form Builder Plugin within Payload CMS.
FormSubmissionDataEntry defines a data entry within a form submission.
Maintenance defines the fields for displaying an offline page to the front-end when it's been enabled within PayloadCMS.
Media defines the fields for media when they are uploaded to PayloadCMS.
MediaSize defines the fields for the different sizes of media when they are uploaded to PayloadCMS.
Navigation defines a common structure of a navigation layout.
NavigationItem defines a common structure of a singular navigation item from PayloadCMS.
Point represents a geographical coordinate.
Settings defines the common global collection type within Payload that allows users to change site settings.
SettingsAddress defines the fields for a company address.
SettingsCodeInjection defines the fields for injecting code into the head or foot of the frontend.
SettingsContact defines the fields for contact details for the company.
SettingsMeta defines the data generated by the Meta plugin from Payload along with additional fields such as Private & Canonical.
SettingsSocial defines the fields for social media links.

# Type aliases

Blocks is a collection of Block types.
FormBlockType defines the type of field within a form.
FormConfirmationType defines the way in which a user is directed after submitting a form.
JSON represents a map that can be marshaled into a Payload JSON field.
MaintenanceRendererFunc is the function that defines how the maintenance should be rendered on the site.
MediaFields defines a dictionary of arbitrary fields that are not defined in the PayloadCMS schema.
MediaSizes defines a dictionary of media sizes by size name (e.g.
NavigationItems is a collection of NavigationItem types.
NavigationWalkerFunc defines the signature for the walker function.
Option is a functional option type that allows us to configure the Client.
RichText is a string type that represents a rich text content from the Payload lexical editor.