Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ViewModelFor ¶
func ViewModelFor[T ViewModel](req *http.Request, inst T, opts ...ViewModelOption) T
Types ¶
type ErrorMessage ¶
type FileListViewModel ¶
type FileListViewModel struct {
ViewModelBase
Files []domain.FileEntry
}
type LoginViewModel ¶
type LoginViewModel struct {
ViewModelBase
}
type RegisterViewModel ¶
type RegisterViewModel struct {
ViewModelBase
InviteID string
InviteKey string
}
type ViewModel ¶
type ViewModel interface {
HasError() bool
Error() *ErrorMessage
RenderFull() bool
WhiteBackground() bool
CsrfToken() string
// contains filtered or unexported methods
}
type ViewModelBase ¶
type ViewModelBase struct {
// contains filtered or unexported fields
}
func (*ViewModelBase) CsrfToken ¶
func (v *ViewModelBase) CsrfToken() string
func (*ViewModelBase) Error ¶
func (v *ViewModelBase) Error() *ErrorMessage
func (*ViewModelBase) HasError ¶
func (v *ViewModelBase) HasError() bool
func (*ViewModelBase) RenderFull ¶
func (v *ViewModelBase) RenderFull() bool
func (*ViewModelBase) WhiteBackground ¶
func (v *ViewModelBase) WhiteBackground() bool
type ViewModelOption ¶
type ViewModelOption func(inst ViewModel)
func WithError ¶
func WithError(title, body string) ViewModelOption
Click to show internal directories.
Click to hide internal directories.