request

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2025 License: BSD-3-Clause Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PonzuRepeatPrefix          = ".__ponzu-repeat"
	PonzuFieldCollectionPrefix = ".__ponzu-field-collection"
)
View Source
var ErrInvalidRequest = errors.New("invalid request")
View Source
var ErrUnsupportedContentType = errors.New("unsupported content type")
View Source
var RowsPerPage = 20

Functions

func GetAuthToken

func GetAuthToken(req *http.Request) string

func GetContentType

func GetContentType(req *http.Request) string

func GetEntity

func GetEntity(entity interface{}, req *http.Request) (interface{}, error)

func GetEntityFromFormData

func GetEntityFromFormData(entity interface{}, data url.Values) (interface{}, error)

func GetFileUploadFromFormData

func GetFileUploadFromFormData(data url.Values) (interface{}, error)

func GetPaginationRequest

func GetPaginationRequest(qs url.Values) (*request.PaginationRequestDto, error)

func GetRequestAsURLValues

func GetRequestAsURLValues(req *http.Request) (url.Values, error)

func GetRequestContentId

func GetRequestContentId(req *http.Request) (bool, string)

func GetRequestFiles

func GetRequestFiles(req *http.Request) (map[string]*multipart.FileHeader, error)

func GetSearchRequestDto

func GetSearchRequestDto(req *http.Request) (*request.SearchRequestDto, error)

func GetSelectedItems

func GetSelectedItems(req *http.Request) ([]string, error)

func MapAuthRequest

func MapAuthRequest(req *http.Request) (string, *auth.Credential, error)

func MapPayloadToGenericEntity

func MapPayloadToGenericEntity(entity interface{}, payload map[string][]string) (interface{}, error)

func MapRequestToContentUpdate

func MapRequestToContentUpdate(req *http.Request) (map[string]interface{}, error)

func MapSearchRequest

func MapSearchRequest(searchRequest *request.SearchRequestDto) (*search.Search, error)

func MapToURLValues

func MapToURLValues(payload map[string]interface{}) url.Values

Types

This section is empty.

Jump to

Keyboard shortcuts

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