Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Customer ¶
type Customer struct { ID string `json:"id"` Name string `json:"name"` Cpf string `json:"cpf"` Birth string `json:"birth"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` }
func NewCustomer ¶
func NewCustomer() *Customer
type CustomerInterface ¶
type CustomerService ¶
type CustomerService struct {
Store CustomerStoreInterface
}
func NewCustomerService ¶
func NewCustomerService(store CustomerStoreInterface) *CustomerService
func (*CustomerService) Create ¶
func (c *CustomerService) Create(name, cpf, birth string) (CustomerInterface, error)
func (*CustomerService) FindCustomerByCpf ¶
func (c *CustomerService) FindCustomerByCpf(cpf string) (CustomerInterface, error)
type CustomerServiceInterface ¶
type CustomerServiceInterface interface { FindCustomerByCpf(id string) (CustomerInterface, error) Create(name, cpf, birth string) (CustomerInterface, error) }
type CustomerStoreInterface ¶
type CustomerStoreInterface interface { FindByCpf(cpf string) (CustomerInterface, error) Save(customer CustomerInterface) (CustomerInterface, error) }
Click to show internal directories.
Click to hide internal directories.