Documentation ¶
Index ¶
- func LoadParametersFromHTTPRequest(params ParametersAPI, r *http.Request)
- func LoadParametersFromMultipartForm(params ParametersAPI, mpartform *multipart.Form) (err error)
- func LoadParametersFromRawURL(params ParametersAPI, rawURL string)
- func LoadParametersFromUrlValues(params ParametersAPI, urlvalues url.Values) (err error)
- type Parameters
- func (params *Parameters) AppendPhrase(phrases ...string)
- func (params *Parameters) CleanupParameters()
- func (params *Parameters) ContainsFileParameter(pname string) bool
- func (params *Parameters) ContainsParameter(pname string) bool
- func (params *Parameters) ContainsPhrase(...string) (exists bool)
- func (params *Parameters) FileKeys() (keys []string)
- func (params *Parameters) FileName(pname string, index ...int) (nmes []string)
- func (params *Parameters) FileParameter(pname string, index ...int) []interface{}
- func (params *Parameters) FileReader(pname string, index ...int) (rdrs []io.Reader)
- func (params *Parameters) FileSize(pname string, index ...int) (sizes []int64)
- func (params *Parameters) Parameter(pname string, index ...int) []string
- func (params *Parameters) Phrases() (phrases []string)
- func (params *Parameters) RemoveParameter(pname string) (value []string)
- func (params *Parameters) SetFileParameter(pname string, clear bool, pfile ...interface{})
- func (params *Parameters) SetParameter(pname string, clear bool, pvalue ...string)
- func (params *Parameters) StandardKeys() (keys []string)
- func (params *Parameters) StringParameter(pname string, sep string, index ...int) (s string)
- type ParametersAPI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadParametersFromHTTPRequest ¶
func LoadParametersFromHTTPRequest(params ParametersAPI, r *http.Request)
LoadParametersFromHTTPRequest - Load Parameters from http.Request
func LoadParametersFromMultipartForm ¶
func LoadParametersFromMultipartForm(params ParametersAPI, mpartform *multipart.Form) (err error)
LoadParametersFromMultipartForm - Load Parameters from *multipart.Form
func LoadParametersFromRawURL ¶
func LoadParametersFromRawURL(params ParametersAPI, rawURL string)
LoadParametersFromRawURL - populate paramaters just from raw url
func LoadParametersFromUrlValues ¶
func LoadParametersFromUrlValues(params ParametersAPI, urlvalues url.Values) (err error)
LoadParametersFromUrlValues - Load Parameters from url.Values
Types ¶
type Parameters ¶
type Parameters struct {
// contains filtered or unexported fields
}
Parameters -> structure containing parameters
func NewParameters ¶
func NewParameters() *Parameters
NewParameters return new instance of Paramaters container
func (*Parameters) AppendPhrase ¶
func (params *Parameters) AppendPhrase(phrases ...string)
func (*Parameters) CleanupParameters ¶
func (params *Parameters) CleanupParameters()
CleanupParameters function that can be called to assist in cleaning up instance of Parameter container
func (*Parameters) ContainsFileParameter ¶
func (params *Parameters) ContainsFileParameter(pname string) bool
ContainsFileParameter -> check if file parameter exist pname : name
func (*Parameters) ContainsParameter ¶
func (params *Parameters) ContainsParameter(pname string) bool
ContainsParameter -> check if parameter exist pname : name
func (*Parameters) ContainsPhrase ¶
func (params *Parameters) ContainsPhrase(...string) (exists bool)
func (*Parameters) FileKeys ¶
func (params *Parameters) FileKeys() (keys []string)
FileKeys - list of file parameters names (keys)
func (*Parameters) FileName ¶
func (params *Parameters) FileName(pname string, index ...int) (nmes []string)
FileName return file parameter name - array of string
func (*Parameters) FileParameter ¶
func (params *Parameters) FileParameter(pname string, index ...int) []interface{}
FileParameter return file paramater - array of file
func (*Parameters) FileReader ¶
func (params *Parameters) FileReader(pname string, index ...int) (rdrs []io.Reader)
FileReader return file parameter - array of io.Reader
func (*Parameters) FileSize ¶
func (params *Parameters) FileSize(pname string, index ...int) (sizes []int64)
FileSize return file parameter size - array of int64)
func (*Parameters) Parameter ¶
func (params *Parameters) Parameter(pname string, index ...int) []string
Parameter - return a specific parameter values
func (*Parameters) Phrases ¶
func (params *Parameters) Phrases() (phrases []string)
func (*Parameters) RemoveParameter ¶
func (params *Parameters) RemoveParameter(pname string) (value []string)
RemoveParameter -> remove parameter and return any slice of string value
func (*Parameters) SetFileParameter ¶
func (params *Parameters) SetFileParameter(pname string, clear bool, pfile ...interface{})
SetFileParameter -> set or append file parameter value pname : name pfile : value of interface to add either FileHeader from mime/multipart or any io.Reader implementation clear : clear existing value of parameter
func (*Parameters) SetParameter ¶
func (params *Parameters) SetParameter(pname string, clear bool, pvalue ...string)
SetParameter -> set or append parameter value pname : name pvalue : value of strings to add clear : clear existing value of parameter
func (*Parameters) StandardKeys ¶
func (params *Parameters) StandardKeys() (keys []string)
StandardKeys - list of standard parameters names (keys)
func (*Parameters) StringParameter ¶
func (params *Parameters) StringParameter(pname string, sep string, index ...int) (s string)
StringParameter return parameter as string concatenated with sep
type ParametersAPI ¶
type ParametersAPI interface { StandardKeys() []string FileKeys() []string SetParameter(string, bool, ...string) AppendPhrase(...string) Phrases() []string ContainsPhrase(...string) bool ContainsParameter(string) bool RemoveParameter(string) []string SetFileParameter(string, bool, ...interface{}) ContainsFileParameter(string) bool Parameter(string, ...int) []string StringParameter(string, string, ...int) string FileReader(string, ...int) []io.Reader FileName(string, ...int) []string FileSize(string, ...int) []int64 FileParameter(string, ...int) []interface{} CleanupParameters() }