customerapi

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CustomerModel

func CustomerModel(ctx context.Context, customer *customerdb.Customer) *v1.Customer

CustomerModel converts a database customer record to it's API representation.

func DeleteCustomerEndpoint

func DeleteCustomerEndpoint(r *app.Router)

func ExtendedSearchEndpoint

func ExtendedSearchEndpoint(grp *app.Router)

ExtendedSearchEndpoint searches for one or more customers that match a given criteria.

WARNING: this endpoint gives direct FindMany access to the mongodb collection! Make sure users are properly authenticated!

POST /api/v1/customer/search.

func FuzzySearchEndpoint

func FuzzySearchEndpoint(grp *app.Router)

FuzzySearchEndpoint allows searching for customers using a double metaphone driven search on the customers name. trunk-ignore(golangci-lint/gocognit)

func GetByIDEndpoint

func GetByIDEndpoint(grp *app.Router)

GetByIDEndpoint returns a JSON version of the customer with the given :source/:id.

GET /api/customer/v1/:source/:id.

func ListSourcesEndpoint

func ListSourcesEndpoint(r *app.Router)

func Setup

func Setup(a *app.App, grp *echo.Group)

Setup registers all API endpoints for the customer api.

Types

This section is empty.

Jump to

Keyboard shortcuts

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