utils

package
v3.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Code generated by OpenAPI Generator; DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Atoi

func Atoi(in string) (int, error)

func Contains

func Contains(haystack []string, needle string) bool

Contains is a case insensitive match, finding needle in a haystack

func FormatErrorMessage

func FormatErrorMessage(status string, v interface{}) string

FormatErrorMessage using title and detail when model implements rfc7807

func IsNil

func IsNil(i interface{}) bool

IsNil checks if an input is nil

func ParameterAddToHeaderOrQuery

func ParameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string)

ParameterAddToHeaderOrQuery adds the provided object to the request header or url query supporting deep object syntax

func ParameterValueToString

func ParameterValueToString(obj interface{}, key string) string

func PtrBool

func PtrBool(v bool) *bool

PtrBool is a helper routine that returns a pointer to given boolean value.

func PtrFloat32

func PtrFloat32(v float32) *float32

PtrFloat32 is a helper routine that returns a pointer to given float value.

func PtrFloat64

func PtrFloat64(v float64) *float64

PtrFloat64 is a helper routine that returns a pointer to given float value.

func PtrInt

func PtrInt(v int) *int

PtrInt is a helper routine that returns a pointer to given integer value.

func PtrInt32

func PtrInt32(v int32) *int32

PtrInt32 is a helper routine that returns a pointer to given integer value.

func PtrInt64

func PtrInt64(v int64) *int64

PtrInt64 is a helper routine that returns a pointer to given integer value.

func PtrString

func PtrString(v string) *string

PtrString is a helper routine that returns a pointer to given string value.

func PtrTime

func PtrTime(v time.Time) *time.Time

PtrTime is helper routine that returns a pointer to given Time value.

func ReportError

func ReportError(format string, a ...interface{}) error

Prevent trying to import "fmt"

func SelectHeaderAccept

func SelectHeaderAccept(accepts []string) string

SelectHeaderAccept join all accept types and return

func SelectHeaderContentType

func SelectHeaderContentType(contentTypes []string) string

SelectHeaderContentType select a content type from the available list.

Types

type FormFile

type FormFile struct {
	FileBytes    []byte
	FileName     string
	FormFileName string
}

type MappedNullable

type MappedNullable interface {
	ToMap() (map[string]interface{}, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL