Categorygithub.com/FTChinese/go-rest
modulepackage
0.9.1
Repository: https://github.com/ftchinese/go-rest.git
Documentation: pkg.go.dev

# README

go-rest

Restful Utilities for Golang

NOTE: this is not a generic utility toolset for Golang. It is tailored to FTC restful API needs.

TODO

Create render package to replace view, providing both JSON and HTML rendering.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

GetPagination extracts pagination information from query parameter.
GetQueryParam get a pair of query parameter from URL.
NewPagination creates a new Pagination instance.
NewParam creates a new instance of Param.
ParseJSON parses input data to struct.
ParseSemVer parsed a string into to SemVer.
RandomBase64 returns a base64 url encoded, unpadded string of random bytes.
RandomHex generates a random hexadecimal number of 2*len chars.
Stringify turn an interface into json string.

# Structs

Pagination is used to calculate limit and offset parameter used int sql statement.
Param represents a pair of query parameter from URL.
SemVer represents a parsed value of semantic version string.

# Type aliases

StringSlice implments Scanner and Valuer interface for a slice of strings.