Documentation ¶
Overview ¶
Copyright © 2023 Thomas von Dein
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright © 2023 Thomas von Dein ¶
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Index ¶
- Constants
- func CreateForm(w io.Writer, c *cfg.Config) error
- func Delete(w io.Writer, c *cfg.Config, args []string, typ int) error
- func Describe(w io.Writer, c *cfg.Config, args []string, typ int) error
- func Download(w io.Writer, c *cfg.Config, args []string) error
- func FormsRespondTable(w io.Writer, resp *req.Response) error
- func GatherFiles(rq *Request, args []string) error
- func GetResponse(resp *req.Response) (*common.Response, error)
- func HandleResponse(c *cfg.Config, resp *req.Response) error
- func List(w io.Writer, c *cfg.Config, args []string, typ int) error
- func Modify(w io.Writer, c *cfg.Config, args []string, typ int) error
- func RespondExtended(w io.Writer, resp *req.Response) error
- func UploadFiles(w io.Writer, c *cfg.Config, args []string) error
- func UploadsRespondTable(w io.Writer, resp *req.Response) error
- func WriteExtended(w io.Writer, response *common.Response)
- func WriteTable(w io.Writer, headers []string, data [][]string)
- type ListParams
- type Request
- type Response
Constants ¶
const Maxwidth = 12
Variables ¶
This section is empty.
Functions ¶
func FormsRespondTable ¶
turn the Forms{} struct into a table and print it
func GatherFiles ¶
Iterate over args, considering the elements are filenames, and add them to the request.
func GetResponse ¶
extract an common.Response{} struct from json response
func HandleResponse ¶
Check HTTP Response Code and validate JSON status output, if any. Turns'em into a regular error
func RespondExtended ¶
turn the Uploads{} struct into xtnd output and print it
func UploadsRespondTable ¶
turn the Uploads{} struct into a table and print it
func WriteExtended ¶
Print output like psql \x
Prints all Uploads and Forms which exist in common.Response, however, we expect only one kind of them to be actually filled, so the function can be used for forms and uploads.