htmlui

package
v0.0.0-...-7d19fa3 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InDictsQueryParam

type InDictsQueryParam struct {
	// contains filtered or unexported fields
}

StringQueryParam string url query param

func NewInDictsQueryParam

func NewInDictsQueryParam(name string) *InDictsQueryParam

NewStringQueryParam creates new StringURLQueryParam

func (*InDictsQueryParam) Clone

func (p *InDictsQueryParam) Clone() QueryParam

Clone implements interface URLQueryParam

func (*InDictsQueryParam) Decode

func (p *InDictsQueryParam) Decode(value string)

Decode implements interface URLQueryParam

func (*InDictsQueryParam) Encode

func (p *InDictsQueryParam) Encode() string

Encode implements interface URLQueryParam

func (*InDictsQueryParam) Name

func (p *InDictsQueryParam) Name() string

Name implements interface URLQueryParam

func (*InDictsQueryParam) Reset

func (p *InDictsQueryParam) Reset()

Reset implements interface URLQueryParam

func (*InDictsQueryParam) SetValue

func (p *InDictsQueryParam) SetValue(vs []string)

SetValue set's value

func (*InDictsQueryParam) Value

func (p *InDictsQueryParam) Value() []string

Value returns param value

func (*InDictsQueryParam) ValueEqualsDefault

func (p *InDictsQueryParam) ValueEqualsDefault() bool

ValueEqualsDefault implements interface URLQueryParam

type IntegerQueryParam

type IntegerQueryParam struct {
	// contains filtered or unexported fields
}

IntegerQueryParam integer url query param

func NewIntegerQueryParam

func NewIntegerQueryParam(name string, defaultValue int) *IntegerQueryParam

NewIntegerQueryParam creates new IntegerURLQueryParam

func (*IntegerQueryParam) Clone

func (p *IntegerQueryParam) Clone() QueryParam

Clone implements interface URLQueryParam

func (*IntegerQueryParam) Decode

func (p *IntegerQueryParam) Decode(value string)

Decode implements interface URLQueryParam

func (*IntegerQueryParam) Encode

func (p *IntegerQueryParam) Encode() string

Encode implements interface URLQueryParam

func (*IntegerQueryParam) Name

func (p *IntegerQueryParam) Name() string

Name implements interface URLQueryParam

func (*IntegerQueryParam) Reset

func (p *IntegerQueryParam) Reset()

Reset implements interface URLQueryParam

func (*IntegerQueryParam) SetValue

func (p *IntegerQueryParam) SetValue(v int)

SetValue set's value

func (*IntegerQueryParam) Value

func (p *IntegerQueryParam) Value() int

Value returns param value

func (*IntegerQueryParam) ValueEqualsDefault

func (p *IntegerQueryParam) ValueEqualsDefault() bool

ValueEqualsDefault implements interface URLQueryParam

type LetterFilter

type LetterFilter struct {
	Prefix []rune

	LetterLink func(prefix string) string
	// contains filtered or unexported fields
}

LetterFilter letter filter used on dictionary page

func (*LetterFilter) AddLevel

func (lf *LetterFilter) AddLevel(level []LetterFilterEntity)

AddLevel adds filter level

func (lf LetterFilter) Links() [][]LetterFilterLink

Links generates links

type LetterFilterEntity

type LetterFilterEntity struct {
	Key      string `json:"key"`
	DocCount int    `json:"doc_count"`
}

LetterFilterEntity letter filter entity

type LetterFilterLink struct {
	URL    string
	Text   string
	Active bool
	Title  string
}

LetterFilterLink letter filter link

type MetaRobotsTag

type MetaRobotsTag struct {
	Index  bool
	Follow bool
}

MetaRobotsTag represents meta robots tag value

type Pagination

type Pagination struct {
	Current   int
	Total     int
	PageToURL func(n int) string
}

Pagination pagination

func (p Pagination) Links() []PaginationLink

Links returns pagination links

type PaginationLink struct {
	URL      string
	Text     string
	Active   bool
	Disabled bool
}

PaginationLink pagination link

type Query

type Query []QueryParam

Query url query

func (Query) Clone

func (ps Query) Clone() Query

Clone clones url query params

func (Query) Encode

func (ps Query) Encode() string

Encode encodes url query

func (Query) From

func (ps Query) From(values url.Values)

From loads url query param value from the specified url.Values

func (Query) Get

func (ps Query) Get(name string) QueryParam

Get returns a query param by it's name

type QueryParam

type QueryParam interface {
	Name() string
	Decode(value string)
	Encode() string
	Clone() QueryParam
	Reset()
	ValueEqualsDefault() bool
}

QueryParam url query param

type StringQueryParam

type StringQueryParam struct {
	// contains filtered or unexported fields
}

StringQueryParam string url query param

func NewStringQueryParam

func NewStringQueryParam(name, defaultValue string) *StringQueryParam

NewStringQueryParam creates new StringURLQueryParam

func (*StringQueryParam) Clone

func (p *StringQueryParam) Clone() QueryParam

Clone implements interface URLQueryParam

func (*StringQueryParam) Decode

func (p *StringQueryParam) Decode(value string)

Decode implements interface URLQueryParam

func (*StringQueryParam) Encode

func (p *StringQueryParam) Encode() string

Encode implements interface URLQueryParam

func (*StringQueryParam) Name

func (p *StringQueryParam) Name() string

Name implements interface URLQueryParam

func (*StringQueryParam) Reset

func (p *StringQueryParam) Reset()

Reset implements interface URLQueryParam

func (*StringQueryParam) SetValue

func (p *StringQueryParam) SetValue(v string)

SetValue set's value

func (*StringQueryParam) Value

func (p *StringQueryParam) Value() string

Value returns param value

func (*StringQueryParam) ValueEqualsDefault

func (p *StringQueryParam) ValueEqualsDefault() bool

ValueEqualsDefault implements interface URLQueryParam

Jump to

Keyboard shortcuts

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