form

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2017 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssignForm

func AssignForm(form interface{}, data map[string]interface{})

func GetInclude

func GetInclude(field reflect.StructField) string

func GetMaxSize

func GetMaxSize(field reflect.StructField) string

func GetMinSize

func GetMinSize(field reflect.StructField) string

func GetSize

func GetSize(field reflect.StructField) string

Types

type AppAddForm

type AppAddForm struct {
	Name     string `form:"name" binding:"Required;MaxSize(35)"`
	Platform string `form:"platform" binding:"Required"`
}

func (*AppAddForm) Validate

func (f *AppAddForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors

type AppOrDeploymentOption

type AppOrDeploymentOption struct {
	Name string `json:"name" binding:"Required"`
}

type ChangePasswordForm

type ChangePasswordForm struct {
	OldPassword string `form:"old_password" binding:"Required;MinSize(6);MaxSize(255)"`
	Password    string `form:"password" binding:"Required;MinSize(6);MaxSize(255)"`
	Retype      string `form:"retype"`
}

func (*ChangePasswordForm) Validate

func (f *ChangePasswordForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors

type Form

type Form interface {
	binding.Validator
}

type InstallForm

type InstallForm struct {
	RunUser  string `form:"run_user" binding:"Required"`
	Domain   string `form:"domain" binding:"Required"`
	AppName  string `form:"app_name"`
	AppURL   string `form:"app_url" binding:"Required"`
	HTTPPort string `form:"http_port"`

	DbType   string `form:"db_type" binding:"Required"`
	DbHost   string `form:"db_host"`
	DbUser   string `form:"db_user"`
	DbPasswd string `form:"db_passwd"`
	DbName   string `form:"db_name"`
	SSLMode  string `form:"ssl_mode"`
	DbPath   string `form:"db_path"`

	StorageType        string `form:"storage_type"`
	StorageDownloadURL string `form:"storage_download_url"`
	StoragePath        string `form:"storage_path"`
	StorageAccessKey   string `form:"storage_access_key"`
	StorageSecretKey   string `form:"storage_secret_key"`
	StorageBucketName  string `form:"storage_bucket_name"`
	StorageEndpoint    string `form:"storage_endpoint"`
	StorageZone        string `form:"storage_zone"`
	StoragePrefix      string `form:"storage_prefix"`

	LogRootPath string `form:"log_path"`

	SMTPHost   string `form:"smtp_host"`
	SMTPUser   string `form:"mailer_user"`
	SMTPFrom   string `form:"mailer_from"`
	SMTPPasswd string `form:"mailer_pwd"`

	RegisterConfirm     bool `form:"register_confirm"`
	MailNotify          bool `form:"mail_notify"`
	DisableRegistration bool `form:"disable_registration"`
	EnableCaptcha       bool `form:"enable_captcha"`
	RequireSignInView   bool `form:"require_sign_in_view"`

	AdminName     string `form:"admin_name" binding:"Required;AlphaDashDot;MaxSize(30)"`
	AdminPasswd   string `form:"admin_pwd" binding:"Required;MinSize(6);MaxSize(255)"`
	ConfirmPasswd string `form:"confirm_passwd" binding:"Required;MinSize(6);MaxSize(255)"`
	AdminEmail    string `form:"admin_email" binding:"Required;Email;MaxSize(50)"`
}

func (*InstallForm) Validate

func (f *InstallForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors

type PackageInfo

type PackageInfo struct {
	AppVersion  *string `json:"appVersion"`
	Description *string `json:"description"`
	IsDisabled  *bool   `json:"isDisabled"`
	IsMandatory *bool   `json:"isMandatory"`
	Label       *string `json:"label"`
	Rollout     *uint8  `json:"rollout"`
}

type ReportStatus

type ReportStatus struct {
	AppVersion                *string `json:"appVersion"`
	DeploymentKey             *string `json:"deploymentKey"`
	Label                     *string `json:"label"`
	Status                    *string `json:"status"`
	ClientUniqueId            *string `json:"clientUniqueId"`
	PreviousDeploymentKey     *string `json:"previousDeploymentKey"`
	PreviousLabelOrAppVersion *string `json:"previousLabelOrAppVersion"`
}

type SignInForm

type SignInForm struct {
	UserName string `form:"user_name" binding:"Required;MaxSize(35)"`
	Password string `form:"password" binding:"Required;MinSize(6);MaxSize(255)"`
	Remember bool   `form:"remember"`
}

func (*SignInForm) Validate

func (f *SignInForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors

type SignUpForm

type SignUpForm struct {
	UserName string `form:"user_name" binding:"Required;AlphaDashDot;MaxSize(35)"`
	Email    string `form:"email" binding:"Required;Email;MaxSize(50)"`
	Password string `form:"password" binding:"Required;MinSize(6);MaxSize(255)"`
	Retype   string
}

func (*SignUpForm) Validate

func (f *SignUpForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors

type UpdatePackageInfo

type UpdatePackageInfo struct {
	PackageInfo *PackageInfo `json:"packageInfo"`
}

Jump to

Keyboard shortcuts

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