customer

package
v0.0.0-...-241bfea Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

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

func NewRepository

func NewRepository(database *postgres.Database) *Repository

func (*Repository) CreateCustomerContext

func (r *Repository) CreateCustomerContext(
	ctx context.Context,
	firstName string,
	lastName string,
	birthDate *protocore.Date,
	phoneNumber string,
) (int32, error)

func (*Repository) CustomerContext

func (r *Repository) CustomerContext(ctx context.Context, id int32) (*proto.Customer, error)

func (*Repository) CustomersContext

func (r *Repository) CustomersContext(ctx context.Context) ([]*proto.Customer, error)

func (*Repository) DeleteCustomerContext

func (r *Repository) DeleteCustomerContext(ctx context.Context, id int32) error

func (*Repository) UpdateCustomerContext

func (r *Repository) UpdateCustomerContext(ctx context.Context, customer *proto.Customer) error

Jump to

Keyboard shortcuts

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