phonenumbers

package
v0.0.0-...-f261bde Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateCmd

type CreateCmd struct {
	Contact *contacts.Contact
	Type    string
	Region  string
	Input   string
}

type FakePhoneBuilder

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

func NewFakePhone

func NewFakePhone(t testing.TB) *FakePhoneBuilder

func (*FakePhoneBuilder) Build

func (f *FakePhoneBuilder) Build() *Phone

func (*FakePhoneBuilder) WithContact

func (f *FakePhoneBuilder) WithContact(contact *contacts.Contact) *FakePhoneBuilder

type MockService

type MockService struct {
	mock.Mock
}

MockService is an autogenerated mock type for the Service type

func NewMockService

func NewMockService(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockService

NewMockService creates a new instance of MockService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockService) Create

func (_m *MockService) Create(ctx context.Context, cmd *CreateCmd) (*Phone, error)

Create provides a mock function with given fields: ctx, cmd

func (*MockService) DeleteContactPhone

func (_m *MockService) DeleteContactPhone(ctx context.Context, contact *contacts.Contact, phoneID uuid.UUID) error

DeleteContactPhone provides a mock function with given fields: ctx, contact, phoneID

func (*MockService) GetAllForContact

func (_m *MockService) GetAllForContact(ctx context.Context, contact *contacts.Contact, cmd *sqlstorage.PaginateCmd) ([]Phone, error)

GetAllForContact provides a mock function with given fields: ctx, contact, cmd

type Phone

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

func (Phone) ContactID

func (p Phone) ContactID() uuid.UUID

func (Phone) CreatedAt

func (p Phone) CreatedAt() time.Time

func (Phone) ID

func (p Phone) ID() uuid.UUID

func (Phone) ISO2RegionCode

func (p Phone) ISO2RegionCode() string

func (Phone) InternationalFormatted

func (p Phone) InternationalFormatted() string

func (Phone) NationalFormatted

func (p Phone) NationalFormatted() string

func (Phone) Type

func (p Phone) Type() string

type Service

type Service interface {
	Create(ctx context.Context, cmd *CreateCmd) (*Phone, error)
	GetAllForContact(ctx context.Context, contact *contacts.Contact, cmd *sqlstorage.PaginateCmd) ([]Phone, error)
	DeleteContactPhone(ctx context.Context, contact *contacts.Contact, phoneID uuid.UUID) error
}

func Init

func Init(
	tools tools.Tools,
	db sqlstorage.Querier,
) Service

Jump to

Keyboard shortcuts

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