Documentation
¶
Index ¶
- type OrderedMap
- func (m *OrderedMap) Add(key, value string)
- func (m *OrderedMap) Del(key string)
- func (m *OrderedMap) Get(key string) string
- func (m *OrderedMap) GetAll(key string) []string
- func (m *OrderedMap) Keys() []string
- func (m *OrderedMap) Len() int
- func (m *OrderedMap) Map() map[string][]string
- func (m *OrderedMap) Remove(key, val string)
- func (m *OrderedMap) Set(key, val string)
- func (m *OrderedMap) String() string
- type OrderedMappable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OrderedMap ¶
OrderedMap handles url query string paramaters respecting order We replicate the interface of the default net/url.Values
func NewOrderedMap ¶
func NewOrderedMap(keypairs [][]string) (*OrderedMap, error)
NewOrderedMap takes a set of params, validates them and return the params to use Seriously, use this rather than constructing OrderedMap directly. It'll keep your sanity
func (*OrderedMap) Add ¶
func (m *OrderedMap) Add(key, value string)
Add add the key-value to the params list This will not delete any existing pairs matching the key param
func (*OrderedMap) Del ¶
func (m *OrderedMap) Del(key string)
Del removes all values with the passed in key
func (*OrderedMap) Get ¶
func (m *OrderedMap) Get(key string) string
Get gets the first value associated with key. If empty, returns an empty string
func (*OrderedMap) GetAll ¶
func (m *OrderedMap) GetAll(key string) []string
Get a list of values based on the key
func (*OrderedMap) Keys ¶
func (m *OrderedMap) Keys() []string
Keys returns all keys that exist in our OrderedMap
func (*OrderedMap) Len ¶
func (m *OrderedMap) Len() int
Len get's the total number of entries within the map
func (*OrderedMap) Map ¶
func (m *OrderedMap) Map() map[string][]string
Map converts the our ordered list to a map
func (*OrderedMap) Remove ¶
func (m *OrderedMap) Remove(key, val string)
Remove removes the key value pair from the params list
func (*OrderedMap) Set ¶
func (m *OrderedMap) Set(key, val string)
Set sets the key to val. All existing values are replaced
func (*OrderedMap) String ¶
func (m *OrderedMap) String() string
String converts the query params into consumable query param strings