client

package
v0.0.0-...-9562ddc Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: MIT Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientDto

type ClientDto struct {
	CreatedBy    string  `json:"createdBy"`
	Id           *string `json:"id"`
	Phone        *string `json:"phone"`
	Email        *string `json:"email"`
	ClientName   string  `json:"clientName"`
	CreatedAt    string  `json:"createdAt"`
	LastUpdateAt string  `json:"lastUpdateAt"`
	Description  string  `json:"description"`
}

type ClientService

type ClientService struct {
	Store Store
}

func NewClientService

func NewClientService(s Store) *ClientService

func (ClientService) CreateClient

func (c ClientService) CreateClient(client ClientDto) (ClientDto, error)

func (ClientService) DeleteClient

func (c ClientService) DeleteClient(createdBy, id string) error

func (ClientService) GetClientById

func (c ClientService) GetClientById(createdBy, id string) (*ClientDto, error)

func (ClientService) GetClientWithFilters

func (c ClientService) GetClientWithFilters(createdBy string, clientDto ClientDto) ([]ClientDto, error)

func (ClientService) GetClientsByCreator

func (c ClientService) GetClientsByCreator(createdBy string) ([]ClientDto, error)

func (ClientService) UpdateUser

func (c ClientService) UpdateUser(createdBy string, clientId string, client ClientDto) (ClientDto, error)

type Store

type Store interface {
	GetClientsByCreator(string) ([]ClientDto, error)
	UpdateUser(createdBy string, userId string, client ClientDto) (ClientDto, error)
	CreateClient(ClientDto) (ClientDto, error)
	DeleteClient(createdBy, id string) error
	GetClientById(createdBy, id string) (*ClientDto, error)
	GetClientWithFilters(createdBy string, clientDto ClientDto) ([]ClientDto, error)
}

Jump to

Keyboard shortcuts

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