forms

package
v0.0.0-...-e1ceb80 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AcceptInviteFormNew

func AcceptInviteFormNew(sender sender.Sender, invite *core.UserInvitation) forms.Form

func ChangePasswordFormNew

func ChangePasswordFormNew(u *core.User) forms.Form

func EditPostFormNew

func EditPostFormNew(ctx context.Context, db boil.ContextExecutor, u *core.User, postID string) (forms.Form, error)

func LoginFormNew

func LoginFormNew() forms.Form

func NewCommentFormNew

func NewCommentFormNew(u *core.User) forms.Form

func NewPostFormNew

func NewPostFormNew(u *core.User) forms.Form

func SendInviteFormNew

func SendInviteFormNew(sender sender.Sender, u *core.User) forms.Form

func SettingsGeneralFormNew

func SettingsGeneralFormNew(u *core.User) forms.Form

func SignupFormNew

func SignupFormNew(sender sender.Sender) forms.Form

func SignupWaitingListFormNew

func SignupWaitingListFormNew(sender sender.Sender) forms.Form

func WhitelistConnectionNew

func WhitelistConnectionNew(u *core.User) forms.Form

Types

type AcceptInviteForm

type AcceptInviteForm struct {
	*forms.FormBase[AcceptInviteFormInput]
	Sender sender.Sender
	Invite *core.UserInvitation
}

func (*AcceptInviteForm) Save

func (*AcceptInviteForm) Validate

func (f *AcceptInviteForm) Validate(c *gin.Context, db boil.ContextExecutor) error

type AcceptInviteFormInput

type AcceptInviteFormInput struct {
	Username string `form:"username"`
	Password string `form:"password"`
}

type ChangePasswordForm

type ChangePasswordForm struct {
	*forms.FormBase[ChangePasswordFormInput]
	User *core.User
}

func (*ChangePasswordForm) Save

func (*ChangePasswordForm) Validate

type ChangePasswordFormInput

type ChangePasswordFormInput struct {
	OldPassword string `form:"old_password"`
	Password    string `form:"password"`
}

type LoginForm

type LoginForm struct {
	*forms.FormBase[LoginFormInput]
}

func (*LoginForm) Save

func (*LoginForm) Validate

func (f *LoginForm) Validate(c *gin.Context, db boil.ContextExecutor) error

type LoginFormInput

type LoginFormInput struct {
	Email    string `form:"email"`
	Password string `form:"password"`
}

type NewCommentForm

type NewCommentForm struct {
	*forms.FormBase[NewCommentFormInput]
	User *core.User
}

func (*NewCommentForm) Save

func (*NewCommentForm) Validate

func (f *NewCommentForm) Validate(c *gin.Context, db boil.ContextExecutor) error

type NewCommentFormInput

type NewCommentFormInput struct {
	Body    string `form:"body"`
	PostID  string `form:"post_id"`
	ReplyTo string `form:"reply_to"`
}

type PostForm

type PostForm struct {
	*forms.FormBase[PostFormInput]
	User *core.User
	Post *core.Post
}

func (*PostForm) Save

func (*PostForm) Validate

func (f *PostForm) Validate(c *gin.Context, db boil.ContextExecutor) error

type PostFormAction

type PostFormAction string
const (
	PostFormActionSavePost  PostFormAction = "save_post"
	PostFormActionMakeDraft PostFormAction = "make_draft"
	PostFormActionPublish   PostFormAction = "publish"
	PostFormActionDelete    PostFormAction = "delete"
)

func (PostFormAction) String

func (p PostFormAction) String() string

type PostFormInput

type PostFormInput struct {
	Subject    string              `form:"subject"`
	Body       string              `form:"body"`
	Visibility core.PostVisibility `form:"visibility"`
	SaveAction PostFormAction      `form:"save_action"`
}

type SendInviteForm

type SendInviteForm struct {
	*forms.FormBase[SendInviteFormInput]
	Sender sender.Sender
	User   *core.User
}

func (*SendInviteForm) Save

func (*SendInviteForm) Validate

func (f *SendInviteForm) Validate(c *gin.Context, db boil.ContextExecutor) error

type SendInviteFormInput

type SendInviteFormInput struct {
	Email string `form:"email"`
}

type SettingsGeneralForm

type SettingsGeneralForm struct {
	*forms.FormBase[SettingsGeneralFormInput]
	User *core.User
}

func (*SettingsGeneralForm) Save

func (*SettingsGeneralForm) Validate

type SettingsGeneralFormInput

type SettingsGeneralFormInput struct {
	Timezone string `form:"timezone"`
}

type SignupForm

type SignupForm struct {
	*forms.FormBase[SignupFormInput]
	Sender sender.Sender
}

func (*SignupForm) Save

func (*SignupForm) Validate

func (f *SignupForm) Validate(c *gin.Context, db boil.ContextExecutor) error

type SignupFormInput

type SignupFormInput struct {
	Email       string `form:"email"`
	Username    string `form:"username"`
	Password    string `form:"password"`
	Attribution string `form:"attribution"`
}

type SignupWaitingListForm

type SignupWaitingListForm struct {
	*forms.FormBase[SignupWaitingListFormInput]
	Sender sender.Sender
}

func (*SignupWaitingListForm) Save

func (*SignupWaitingListForm) Validate

type SignupWaitingListFormInput

type SignupWaitingListFormInput struct {
	Email       string `form:"email"`
	Reason      string `form:"reason"`
	Attribution string `form:"attribution"`
}

type WhitelistConnection

type WhitelistConnection struct {
	*forms.FormBase[WhitelistConnectionInput]
	User *core.User
}

func (*WhitelistConnection) Save

func (*WhitelistConnection) Validate

type WhitelistConnectionInput

type WhitelistConnectionInput struct {
	Username string `form:"username"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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