Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommaSeparatedStrings ¶
type CommaSeparatedStrings []string
CommaSeparatedStrings is a custom type for handling comma-separated values from selectbox component. It implements echo.BindUnmarshaler to split comma-separated strings into a slice. This is needed because the templui selectbox component sends multiple values as "val1,val2,val3" instead of multiple form fields with the same name.
func (*CommaSeparatedStrings) UnmarshalParam ¶
func (css *CommaSeparatedStrings) UnmarshalParam(param string) error
func (*CommaSeparatedStrings) UnmarshalParams ¶
func (css *CommaSeparatedStrings) UnmarshalParams(params []string) error
UnmarshalParam implements echo's BindUnmarshaler interface for custom form binding. It splits comma-separated values into a string slice. UnmarshalParams accepts repeated fields and comma-separated values. shadcn-templ's multiple combobox submits one input per value; the v1 selectbox submitted one comma-separated field.
type CreateProjectForm ¶
type CreateUserForm ¶
type CreateUserForm struct {
ID string `json:"id" form:"id"`
Username string `json:"username" form:"username" validate:"required,gte=3"`
FirstName string `json:"firstName" form:"firstName" validate:"required,gte=3"`
LastName string `json:"lastName" form:"lastName" validate:"required,gte=3"`
Role string `json:"role" form:"role" validate:"required,oneof=user admin"`
ProjectIDs CommaSeparatedStrings `json:"projects" form:"projects"`
}
type CredentialGenerationForm ¶
type CredentialGenerationForm struct {
ProjectID string `form:"projectId" validate:"required"`
ClientID string `form:"clientId" validate:"required"`
Expiry NullableDate `form:"expiry"`
}
type LoginFormWithToken ¶
type LoginFormWithToken struct {
Token string `json:"token" form:"token" query:"token" validate:"required,gte=5"`
}
type NullableDate ¶
NullableDate is a custom type for handling optional date inputs from forms. It implements echo.BindUnmarshaler to support multiple date formats.
func (*NullableDate) UnmarshalParam ¶
func (nd *NullableDate) UnmarshalParam(param string) error
UnmarshalParam implements echo's BindUnmarshaler interface for custom form binding. An empty value means no expiry. YYYY-MM-DD is a UTC calendar day and is stored as the exclusive end of that day, the start of the next UTC day, so the selected day remains valid through its end. RFC3339 values stay absolute instants.