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

package parameter

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

Index

Package Files

parameter.go

Constants

const (
    Page     = "__page"
    PageSize = "__pageSize"
    Sort     = "__sort"
    SortType = "__sort_type"
    Columns  = "__columns"
    Prefix   = "__prefix"
    Pjax     = "_pjax"

    IsAll      = "__is_all"
    PrimaryKey = "__pk"

    True  = "true"
    False = "false"

    FilterRangeParamStartSuffix = "_start__goadmin"
    FilterRangeParamEndSuffix   = "_end__goadmin"
    FilterParamJoinInfix        = "_goadmin_join_"
    FilterParamOperatorSuffix   = "__goadmin_operator__"
    FilterParamCountInfix       = "__goadmin_index__"

    Separator = "__goadmin_separator__"
)

type Parameters Uses

type Parameters struct {
    Page         string
    PageInt      int
    PageSize     string
    PageSizeInt  int
    SortField    string
    Columns      []string
    SortType     string
    Animation    bool
    URLPath      string
    Fields       map[string][]string
    OrConditions map[string]string
}

func BaseParam Uses

func BaseParam() Parameters

func GetParam Uses

func GetParam(u *url.URL, defaultPageSize int, p ...string) Parameters

func GetParamFromURL Uses

func GetParamFromURL(urlStr string, defaultPageSize int, defaultSortType, primaryKey string) Parameters

func (Parameters) AddField Uses

func (param Parameters) AddField(field, value string) Parameters

func (Parameters) DeleteDetailPk Uses

func (param Parameters) DeleteDetailPk() Parameters

func (Parameters) DeleteEditPk Uses

func (param Parameters) DeleteEditPk() Parameters

func (Parameters) DeleteField Uses

func (param Parameters) DeleteField(field string) Parameters

func (Parameters) DeleteIsAll Uses

func (param Parameters) DeleteIsAll() Parameters

func (Parameters) DeletePK Uses

func (param Parameters) DeletePK() Parameters

func (Parameters) GetFieldOperator Uses

func (param Parameters) GetFieldOperator(field, suffix string) string

func (Parameters) GetFieldValue Uses

func (param Parameters) GetFieldValue(field string) string

func (Parameters) GetFieldValues Uses

func (param Parameters) GetFieldValues(field string) []string

func (Parameters) GetFieldValuesStr Uses

func (param Parameters) GetFieldValuesStr(field string) string

func (Parameters) GetFilterFieldValueEnd Uses

func (param Parameters) GetFilterFieldValueEnd(field string) string

func (Parameters) GetFilterFieldValueStart Uses

func (param Parameters) GetFilterFieldValueStart(field string) string

func (Parameters) GetFixedParamStr Uses

func (param Parameters) GetFixedParamStr() url.Values

func (Parameters) GetFixedParamStrWithoutColumnsAndPage Uses

func (param Parameters) GetFixedParamStrWithoutColumnsAndPage() string

func (Parameters) GetFixedParamStrWithoutSort Uses

func (param Parameters) GetFixedParamStrWithoutSort() string

func (Parameters) GetLastPageRouteParamStr Uses

func (param Parameters) GetLastPageRouteParamStr() string

func (Parameters) GetNextPageRouteParamStr Uses

func (param Parameters) GetNextPageRouteParamStr() string

func (Parameters) GetRouteParamStr Uses

func (param Parameters) GetRouteParamStr() string

func (Parameters) GetRouteParamStrWithoutPageSize Uses

func (param Parameters) GetRouteParamStrWithoutPageSize(page string) string

func (Parameters) IsAll Uses

func (param Parameters) IsAll() bool

func (Parameters) Join Uses

func (param Parameters) Join() string

func (Parameters) PK Uses

func (param Parameters) PK() string

func (Parameters) PKs Uses

func (param Parameters) PKs() []string

func (Parameters) SetPage Uses

func (param Parameters) SetPage(page string) Parameters

func (Parameters) Statement Uses

func (param Parameters) Statement(wheres, table, delimiter string, whereArgs []interface{}, columns, existKeys []string,
    filterProcess func(string, string, string) string) (string, []interface{}, []string)

func (Parameters) URL Uses

func (param Parameters) URL(page string) string

func (Parameters) URLNoAnimation Uses

func (param Parameters) URLNoAnimation(page string) string

func (Parameters) WithIsAll Uses

func (param Parameters) WithIsAll(isAll bool) Parameters

func (Parameters) WithPKs Uses

func (param Parameters) WithPKs(id ...string) Parameters

func (Parameters) WithURLPath Uses

func (param Parameters) WithURLPath(path string) Parameters

Package parameter imports 6 packages (graph) and is imported by 11 packages. Updated 2020-07-09. Refresh now. Tools for package owners.