Documentation ¶
Overview ¶
Package response provides extended functionality to handle API response data
Index ¶
- type Response
- func (r *Response) AddColumn(key string, data []string) *Response
- func (r *Response) AddRecord(h map[string]string) *Response
- func (r *Response) GetColumn(key string) *column.Column
- func (r *Response) GetColumnIndex(key string, index int) (string, error)
- func (r *Response) GetColumnKeys() []string
- func (r *Response) GetColumns() []column.Column
- func (r *Response) GetCommand() map[string]string
- func (r *Response) GetCommandPlain() string
- func (r *Response) GetCurrentPageNumber() (int, error)
- func (r *Response) GetCurrentRecord() *record.Record
- func (r *Response) GetFirstRecordIndex() (int, error)
- func (r *Response) GetLastRecordIndex() (int, error)
- func (r *Response) GetListHash() map[string]interface{}
- func (r *Response) GetNextPageNumber() (int, error)
- func (r *Response) GetNextRecord() *record.Record
- func (r *Response) GetNumberOfPages() int
- func (r *Response) GetPagination() map[string]interface{}
- func (r *Response) GetPreviousPageNumber() (int, error)
- func (r *Response) GetPreviousRecord() *record.Record
- func (r *Response) GetRecord(idx int) *record.Record
- func (r *Response) GetRecords() []record.Record
- func (r *Response) GetRecordsCount() int
- func (r *Response) GetRecordsLimitation() int
- func (r *Response) GetRecordsTotalCount() int
- func (r *Response) HasNextPage() bool
- func (r *Response) HasPreviousPage() bool
- func (r *Response) RewindRecordList() *Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Response ¶
type Response struct { *rt.ResponseTemplate // contains filtered or unexported fields }
Response is a struct used to cover basic functionality to work with API response data (or hardcoded API response data).
func NewResponse ¶
NewResponse represents the constructor for struct Response.
func (*Response) GetColumnIndex ¶
GetColumnIndex method to get data by column name and index
func (*Response) GetColumnKeys ¶
GetColumnKeys method to get the list of column names
func (*Response) GetColumns ¶
GetColumns method to get the list of columns
func (*Response) GetCommand ¶
GetCommand method to get the underlying API command
func (*Response) GetCommandPlain ¶
GetCommandPlain method to get the underlying API command in plain text
func (*Response) GetCurrentPageNumber ¶
GetCurrentPageNumber method to get the page number of current list query
func (*Response) GetCurrentRecord ¶
GetCurrentRecord method to get record of current record index
func (*Response) GetFirstRecordIndex ¶
GetFirstRecordIndex method to get index of first row
func (*Response) GetLastRecordIndex ¶
GetLastRecordIndex method to get last record index of the current list query
func (*Response) GetListHash ¶
GetListHash method to get Response as List Hash including useful meta data for tables
func (*Response) GetNextPageNumber ¶
GetNextPageNumber method to get Page Number of next list query
func (*Response) GetNextRecord ¶
GetNextRecord method to get next record in record list
func (*Response) GetNumberOfPages ¶
GetNumberOfPages method to get the number of pages available for this list query
func (*Response) GetPagination ¶
GetPagination method to get pagination data; useful for table pagination
func (*Response) GetPreviousPageNumber ¶
GetPreviousPageNumber method to get Page Number of previous list query
func (*Response) GetPreviousRecord ¶
GetPreviousRecord method to get previous record in record list
func (*Response) GetRecords ¶
GetRecords method to get all records
func (*Response) GetRecordsCount ¶
GetRecordsCount method to get count of rows in this response
func (*Response) GetRecordsLimitation ¶
GetRecordsLimitation method to get limit(ation) setting of the current list query
func (*Response) GetRecordsTotalCount ¶
GetRecordsTotalCount method to get total count of records available for the list query
func (*Response) HasNextPage ¶
HasNextPage method to check if this list query has a next page
func (*Response) HasPreviousPage ¶
HasPreviousPage method to check if this list query has a previous page
func (*Response) RewindRecordList ¶
RewindRecordList method to reset index in record list back to zero