go-admin: github.com/GoAdminGroup/go-admin/plugins/admin/modules/form Index | Files

package form

import "github.com/GoAdminGroup/go-admin/plugins/admin/modules/form"


Package Files



const (
    PostTypeKey           = "__go_admin_post_type"
    PostResultKey         = "__go_admin_post_result"
    PostIsSingleUpdateKey = "__go_admin_is_single_update"

    PreviousKey = "__go_admin_previous_"
    TokenKey    = "__go_admin_t_"
    MethodKey   = "__go_admin_method_"

    NoAnimationKey = "__go_admin_no_animation_"

type Values Uses

type Values map[string][]string

Values maps a string key to a list of values. It is typically used for query parameters and form values. Unlike in the http.Header map, the keys in a Values map are case-sensitive.

func (Values) Add Uses

func (f Values) Add(key string, value string)

Add adds the value to key. It appends to any existing values associated with key.

func (Values) Delete Uses

func (f Values) Delete(key string)

Delete deletes the values associated with key.

func (Values) Get Uses

func (f Values) Get(key string) string

Get gets the first value associated with the given key. If there are no values associated with the key, Get returns the empty string. To access multiple values, use the map directly.

func (Values) Has Uses

func (f Values) Has(key ...string) bool

Has check the key exists or not.

func (Values) IsEmpty Uses

func (f Values) IsEmpty(key ...string) bool

IsEmpty check the key is empty or not.

func (Values) IsInsertPost Uses

func (f Values) IsInsertPost() bool

IsInsertPost check the param if is from an insert post request type or not.

func (Values) IsSingleUpdatePost Uses

func (f Values) IsSingleUpdatePost() bool

IsSingleUpdatePost check the param if from an single update post request type or not.

func (Values) IsUpdatePost Uses

func (f Values) IsUpdatePost() bool

IsUpdatePost check the param if is from an update post request type or not.

func (Values) PostError Uses

func (f Values) PostError() error

PostError get the post result.

func (Values) RemoveRemark Uses

func (f Values) RemoveRemark() Values

RemoveRemark removes the PostType and IsSingleUpdate flag parameters.

func (Values) RemoveSysRemark Uses

func (f Values) RemoveSysRemark() Values

RemoveSysRemark removes all framework post flag parameters.

func (Values) ToMap Uses

func (f Values) ToMap() map[string]string

ToMap turn the values to a map[string]string type.

Package form imports 1 packages (graph) and is imported by 19 packages. Updated 2020-07-09. Refresh now. Tools for package owners.