package
0.0.0-20191119134328-9ff59ee4c896
Repository: https://github.com/dictybase/apihelpers.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
AssignFieldsToStructs copy fields value between structure.
No description provided by the author
No description provided by the author
CustomHTTPError is a custom error handler for grpc-gateway to generate JSONAPI formatted HTTP response.
No description provided by the author
No description provided by the author
FilterToBindValue generates a postgresql compatible query expression from the given filters.
FilterToWhereClause generates a postgresql compatible where clause from the provided filters.
No description provided by the author
No description provided by the author
GenPaginatedLinks generates paginated resource links from various page properties.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
GetDefinedTags check for fields that are initialized and returns a slice oftheir matching tag values.
GetDefinedTagsWithValue check for fields that are initialized and returns a mapwith the tag and their values.
GetReqCtx generate a context data from get request.
GetTotalPageNum calculate total no of pages from total no.
HandleCreateResponse modifies the grpc gateway filter which adds the JSON API header and modifies the http status response for POST request.
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
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
No description provided by the author
No description provided by the author
No description provided by the author
JSONAPIError generates JSONAPI formatted error message.
No description provided by the author
ListReqCtx generate context data from list(collection) request.
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
SkipHTTPLinks looks up the context for the presence of gprc metadata for skipping the generation of HTTP links.
No description provided by the author
No description provided by the author
ValidateAndParseGetParams validate and parse the JSON API include and fields parameters that are used for singular resources.
ValidateAndParseListParams validate and parse the JSON API include, fields, filter parameters.
ValidateAndParseSimpleListParams validate and parse the JSON API include, fields, filter parameters.

# Constants

No description provided by the author
No description provided by the author
MetaKey is the key used for storing all metadata.

# Variables

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
ErrDatabaseDelete represents database update delete errors.
ErrDatabaseInsert represents database insert related errors.
ErrDatabaseQuery represents database query related errors.
ErrDatabaseUpdate represents database update related errors.
ErrExists represents the presence of an HTTP resource.
ErrSparseFieldSets represents any error with invalid sparse fieldsets query parameter.
ErrFilterParam represents any error with invalid filter query paramter.
ErrIncludeParam represents any error with invalid include query parameter.
ErrInValidParam represents any error with validating input parameters.
ErrJSONEncoding represents any json encoding error.
ErrNotAcceptable represents any error with wrong or inappropriate http Accept header.
ErrNotFound represents the absence of an HTTP resource.
ErrRetrieveMetadata represents any error to retrieve grpc metadata from the running context.
ErrStructMarshal represents any error with marshalling structure.
ErrUnsupportedMedia represents any error with unsupported media type in http header.
ErrXForwardedHost represents any failure or absence of x-forwarded-host HTTP header in the grpc context.

# Structs

APIFilter is a container for filter parameters.
Error can be used for all kind of application errors e.g.
ErrorLinks is used to provide an About URL that leads to further details about the particular occurrence of the problem.
ErrorSource is used to provide references to the source of an error.
HTTPError is used for errors.
JSONAPIParams is a container for various JSON API query parameters.
No description provided by the author
No description provided by the author

# Interfaces

JSONAPIParamsInfo interface should be implement by all grpc-gateway services that supports JSON API specifications.
JSONAPIResource interface provides information about HTTP resource.

# Type aliases

No description provided by the author