customer

package
v0.0.0-...-0f0028d Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Svc

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

Svc is the service for customer related operations

func NewCustomerSvc

func NewCustomerSvc(db *gorm.DB) *Svc

NewCustomerSvc creates a new svc instance

func (Svc) CreateCustomer

func (svc Svc) CreateCustomer(cus *domaintype.Customer) (*domaintype.Customer, error)

CreateCustomer creates a new customer

func (Svc) DeleteCustomer

func (svc Svc) DeleteCustomer(customerID string) error

DeleteCustomer deletes a customer

func (Svc) GetAllCustomers

func (svc Svc) GetAllCustomers() []*domaintype.Customer

GetAllCustomers gets all customers

func (Svc) GetCustomer

func (svc Svc) GetCustomer(id string) (*domaintype.Customer, error)

GetCustomer gets a customer by ID

Jump to

Keyboard shortcuts

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