organization

package
v1.31.0-beta.22 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package organization is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockRepository

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

MockRepository is a mock of Repository interface.

func NewMockRepository

func NewMockRepository(ctrl *gomock.Controller) *MockRepository

NewMockRepository creates a new mock instance.

func (*MockRepository) Create

func (m *MockRepository) Create(ctx context.Context, organization *mmodel.Organization) (*mmodel.Organization, error)

Create mocks base method.

func (*MockRepository) Delete

func (m *MockRepository) Delete(ctx context.Context, id uuid.UUID) error

Delete mocks base method.

func (*MockRepository) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockRepository) Find

Find mocks base method.

func (*MockRepository) FindAll

func (m *MockRepository) FindAll(ctx context.Context, filter http.Pagination) ([]*mmodel.Organization, error)

FindAll mocks base method.

func (*MockRepository) ListByIDs

func (m *MockRepository) ListByIDs(ctx context.Context, ids []uuid.UUID) ([]*mmodel.Organization, error)

ListByIDs mocks base method.

func (*MockRepository) Update

func (m *MockRepository) Update(ctx context.Context, id uuid.UUID, organization *mmodel.Organization) (*mmodel.Organization, error)

Update mocks base method.

type MockRepositoryMockRecorder

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

MockRepositoryMockRecorder is the mock recorder for MockRepository.

func (*MockRepositoryMockRecorder) Create

func (mr *MockRepositoryMockRecorder) Create(ctx, organization any) *gomock.Call

Create indicates an expected call of Create.

func (*MockRepositoryMockRecorder) Delete

func (mr *MockRepositoryMockRecorder) Delete(ctx, id any) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockRepositoryMockRecorder) Find

func (mr *MockRepositoryMockRecorder) Find(ctx, id any) *gomock.Call

Find indicates an expected call of Find.

func (*MockRepositoryMockRecorder) FindAll

func (mr *MockRepositoryMockRecorder) FindAll(ctx, filter any) *gomock.Call

FindAll indicates an expected call of FindAll.

func (*MockRepositoryMockRecorder) ListByIDs

func (mr *MockRepositoryMockRecorder) ListByIDs(ctx, ids any) *gomock.Call

ListByIDs indicates an expected call of ListByIDs.

func (*MockRepositoryMockRecorder) Update

func (mr *MockRepositoryMockRecorder) Update(ctx, id, organization any) *gomock.Call

Update indicates an expected call of Update.

type OrganizationPostgreSQLModel

type OrganizationPostgreSQLModel struct {
	ID                   string
	ParentOrganizationID *string
	LegalName            string
	DoingBusinessAs      *string
	LegalDocument        string
	Address              mmodel.Address
	Status               string
	StatusDescription    *string
	CreatedAt            time.Time
	UpdatedAt            time.Time
	DeletedAt            sql.NullTime
	Metadata             map[string]any
}

OrganizationPostgreSQLModel represents the entity Organization into SQL context in Database

func (*OrganizationPostgreSQLModel) FromEntity

func (t *OrganizationPostgreSQLModel) FromEntity(organization *mmodel.Organization)

FromEntity converts an entity.Organization to OrganizationPostgresModel

func (*OrganizationPostgreSQLModel) ToEntity

ToEntity converts an OrganizationPostgreSQLModel to entity.Organization

type OrganizationPostgreSQLRepository

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

OrganizationPostgreSQLRepository is a Postgresql-specific implementation of the OrganizationRepository.

func NewOrganizationPostgreSQLRepository

func NewOrganizationPostgreSQLRepository(pc *mpostgres.PostgresConnection) *OrganizationPostgreSQLRepository

NewOrganizationPostgreSQLRepository returns a new instance of OrganizationPostgresRepository using the given Postgres connection.

func (*OrganizationPostgreSQLRepository) Create

Create inserts a new Organization entity into Postgresql and returns the created Organization.

func (*OrganizationPostgreSQLRepository) Delete

Delete removes an Organization entity from the database using the provided ID.

func (*OrganizationPostgreSQLRepository) Find

Find retrieves an Organization entity from the database using the provided ID.

func (*OrganizationPostgreSQLRepository) FindAll

FindAll retrieves Organizations entities from the database.

func (*OrganizationPostgreSQLRepository) ListByIDs

ListByIDs retrieves Organizations entities from the database using the provided IDs.

func (*OrganizationPostgreSQLRepository) Update

Update an Organization entity into Postgresql and returns the Organization updated.

type Repository

type Repository interface {
	Create(ctx context.Context, organization *mmodel.Organization) (*mmodel.Organization, error)
	Update(ctx context.Context, id uuid.UUID, organization *mmodel.Organization) (*mmodel.Organization, error)
	Find(ctx context.Context, id uuid.UUID) (*mmodel.Organization, error)
	FindAll(ctx context.Context, filter http.Pagination) ([]*mmodel.Organization, error)
	ListByIDs(ctx context.Context, ids []uuid.UUID) ([]*mmodel.Organization, error)
	Delete(ctx context.Context, id uuid.UUID) error
}

Repository provides an interface for operations related to organization entities.

Jump to

Keyboard shortcuts

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