form

package
v1.0.46 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIKeyForm

type APIKeyForm struct {
	Description string
}

APIKeyForm represents the API Key form.

func NewAPIKeyForm

func NewAPIKeyForm(r *http.Request) *APIKeyForm

NewAPIKeyForm returns a new APIKeyForm.

func (APIKeyForm) Validate

func (a APIKeyForm) Validate() error

Validate makes sure the form values are valid.

type AuthForm

type AuthForm struct {
	Username string
	Password string
}

AuthForm represents the authentication form.

func NewAuthForm

func NewAuthForm(r *http.Request) *AuthForm

NewAuthForm returns a new AuthForm.

func (AuthForm) Validate

func (a AuthForm) Validate() error

Validate makes sure the form values are valid.

type CategoryForm

type CategoryForm struct {
	Title        string
	HideGlobally string
}

CategoryForm represents a feed form in the UI

func NewCategoryForm

func NewCategoryForm(r *http.Request) *CategoryForm

NewCategoryForm returns a new CategoryForm.

type FeedForm

type FeedForm struct {
	FeedURL                     string
	SiteURL                     string
	Title                       string
	ScraperRules                string
	RewriteRules                string
	BlocklistRules              string
	KeeplistRules               string
	UrlRewriteRules             string
	Crawler                     bool
	UserAgent                   string
	Cookie                      string
	CategoryID                  int64
	Username                    string
	Password                    string
	IgnoreHTTPCache             bool
	AllowSelfSignedCertificates bool
	FetchViaProxy               bool
	Disabled                    bool
	NoMediaPlayer               bool
	HideGlobally                bool
	CategoryHidden              bool // Category has "hide_globally"
}

FeedForm represents a feed form in the UI

func NewFeedForm

func NewFeedForm(r *http.Request) *FeedForm

NewFeedForm parses the HTTP request and returns a FeedForm

func (FeedForm) Merge

func (f FeedForm) Merge(feed *model.Feed) *model.Feed

Merge updates the fields of the given feed.

type IntegrationForm

type IntegrationForm struct {
	PinboardEnabled      bool
	PinboardToken        string
	PinboardTags         string
	PinboardMarkAsUnread bool
	InstapaperEnabled    bool
	InstapaperUsername   string
	InstapaperPassword   string
	FeverEnabled         bool
	FeverUsername        string
	FeverPassword        string
	GoogleReaderEnabled  bool
	GoogleReaderUsername string
	GoogleReaderPassword string
	WallabagEnabled      bool
	WallabagOnlyURL      bool
	WallabagURL          string
	WallabagClientID     string
	WallabagClientSecret string
	WallabagUsername     string
	WallabagPassword     string
	NotionEnabled        bool
	NotionPageID         string
	NotionToken          string
	NunuxKeeperEnabled   bool
	NunuxKeeperURL       string
	NunuxKeeperAPIKey    string
	EspialEnabled        bool
	EspialURL            string
	EspialAPIKey         string
	EspialTags           string
	PocketEnabled        bool
	PocketAccessToken    string
	PocketConsumerKey    string
	TelegramBotEnabled   bool
	TelegramBotToken     string
	TelegramBotChatID    string
	LinkdingEnabled      bool
	LinkdingURL          string
	LinkdingAPIKey       string
	LinkdingTags         string
	LinkdingMarkAsUnread bool
	MatrixBotEnabled     bool
	MatrixBotUser        string
	MatrixBotPassword    string
	MatrixBotURL         string
	MatrixBotChatID      string
}

IntegrationForm represents user integration settings form.

func NewIntegrationForm

func NewIntegrationForm(r *http.Request) *IntegrationForm

NewIntegrationForm returns a new IntegrationForm.

func (IntegrationForm) Merge

func (i IntegrationForm) Merge(integration *model.Integration)

Merge copy form values to the model.

type SettingsForm

type SettingsForm struct {
	Username               string
	Password               string
	Confirmation           string
	Theme                  string
	Language               string
	Timezone               string
	EntryDirection         string
	EntryOrder             string
	EntriesPerPage         int
	KeyboardShortcuts      bool
	ShowReadingTime        bool
	CustomCSS              string
	EntrySwipe             bool
	GestureNav             string
	DisplayMode            string
	DefaultReadingSpeed    int
	CJKReadingSpeed        int
	DefaultHomePage        string
	CategoriesSortingOrder string
	MarkReadOnView         bool
}

SettingsForm represents the settings form.

func NewSettingsForm

func NewSettingsForm(r *http.Request) *SettingsForm

NewSettingsForm returns a new SettingsForm.

func (*SettingsForm) Merge

func (s *SettingsForm) Merge(user *model.User) *model.User

Merge updates the fields of the given user.

func (*SettingsForm) Validate

func (s *SettingsForm) Validate() error

Validate makes sure the form values are valid.

type SubscriptionForm

type SubscriptionForm struct {
	URL                         string
	CategoryID                  int64
	Crawler                     bool
	FetchViaProxy               bool
	AllowSelfSignedCertificates bool
	UserAgent                   string
	Cookie                      string
	Username                    string
	Password                    string
	ScraperRules                string
	RewriteRules                string
	BlocklistRules              string
	KeeplistRules               string
	UrlRewriteRules             string
}

SubscriptionForm represents the subscription form.

func NewSubscriptionForm

func NewSubscriptionForm(r *http.Request) *SubscriptionForm

NewSubscriptionForm returns a new SubscriptionForm.

func (*SubscriptionForm) Validate

func (s *SubscriptionForm) Validate() error

Validate makes sure the form values are valid.

type UserForm

type UserForm struct {
	Username     string
	Password     string
	Confirmation string
	IsAdmin      bool
}

UserForm represents the user form.

func NewUserForm

func NewUserForm(r *http.Request) *UserForm

NewUserForm returns a new UserForm.

func (UserForm) Merge

func (u UserForm) Merge(user *model.User) *model.User

Merge updates the fields of the given user.

func (UserForm) ValidateCreation

func (u UserForm) ValidateCreation() error

ValidateCreation validates user creation.

func (UserForm) ValidateModification

func (u UserForm) ValidateModification() error

ValidateModification validates user modification.

Jump to

Keyboard shortcuts

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