Documentation
¶
Index ¶
- func FilterOptionAbsent[T any](item mo.Option[T], _ int) bool
- func FilterOptionPresent[T any](item mo.Option[T], _ int) bool
- func FromMap[T any, MK comparable, MV any](m map[MK]MV) (*T, error)
- func FromString[T any](str string) (T, error)
- func FromStringOrEmpty[T any](str string) T
- func GetByJSONPath[T any](input any, template string) T
- func GetByJSONPathWithoutConvert(input any, template string) (string, error)
- func IsNumber(str string) bool
- func MapOptionMust(item mo.Option[error], _ int) error
- func MapOptionOrEmpty[T any](item mo.Option[T], _ int) T
- func MapOptionsPresent[T any](items []mo.Option[T]) []T
- func NewJSONResponseError(statusCode int, responseBody io.Reader) mo.Result[*JSONResponseError]
- func NewTextResponseError(statusCode int, responseBody io.Reader) mo.Result[*TextResponseError]
- func ReadAsJSON(reader io.Reader) (*bytes.Buffer, map[string]any, error)
- func ReadAsJSONWithClose(readCloser io.ReadCloser) (*bytes.Buffer, map[string]any, error)
- func ResultToOption[T any](item mo.Result[T]) mo.Option[T]
- type JSONResponseError
- type TextResponseError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterOptionAbsent ¶ added in v0.0.3
func FilterOptionPresent ¶ added in v0.0.3
func FromString ¶
func FromStringOrEmpty ¶
func GetByJSONPath ¶
func MapOptionsPresent ¶ added in v0.0.3
func NewJSONResponseError ¶ added in v0.1.0
func NewTextResponseError ¶ added in v0.1.0
func ReadAsJSONWithClose ¶
Types ¶
type JSONResponseError ¶ added in v0.1.0
type JSONResponseError struct {
StatusCode int `json:"status_code"`
Message string `json:"message"`
// contains filtered or unexported fields
}
func (*JSONResponseError) Error ¶ added in v0.1.0
func (r *JSONResponseError) Error() string
type TextResponseError ¶ added in v0.1.0
func (*TextResponseError) Error ¶ added in v0.1.0
func (r *TextResponseError) Error() string
Click to show internal directories.
Click to hide internal directories.