customer

package
v3.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 License: OSL-3.0 Imports: 6 Imported by: 3

README

Customer Module

Provides the basic customer domain, which is required in other e-commerce related packages.

A customer represents the legal entity of a single person and is normally used in a "my account" area.

Secondary Ports

An implementation needs to provide an adapter for the CustomerService as well as an implementation of the Customer interface.

A typical implementation would fetch the Token from the auth object and with that information call a microservice that will return the customer data (authorized by the token).

Your specific implementation of a customer can also include much more properties - as long as the two interfaces (ports) are implemented.

No customer data needed?

You can enable the provided adapter for the customerService with:

commerce.customer.useNilCustomerAdapter: true

GraphQL

Queries:

  • Commerce_Customer_Status returns the customer's login status
  • Commerce_Customer returns the logged-in customer

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

type Module struct {
	// contains filtered or unexported fields
}

Module registers our customer module

func (*Module) Configure

func (m *Module) Configure(injector *dingo.Injector)

Configure module

func (*Module) Depends added in v3.3.0

func (m *Module) Depends() []dingo.Module

Depends on other modules

func (*Module) Inject

func (m *Module) Inject(config *struct {
	UseNilCustomerAdapter bool `inject:"config:commerce.customer.useNilCustomerAdapter,optional"`
})

Inject module

Directories

Path Synopsis
interfaces
graphql
Package graphql generated by go-bindata.// sources: schema.graphql
Package graphql generated by go-bindata.// sources: schema.graphql

Jump to

Keyboard shortcuts

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