Documentation
¶
Overview ¶
Package organization is a generated GoMock package.
Index ¶
- type MockService
- func (m *MockService) EXPECT() *MockServiceMockRecorder
- func (m *MockService) List(ctx context.Context, listParams store.ListParams) ([]*model.Organization, error)
- func (m *MockService) ListAllOrganizations(ctx context.Context, params domain.ListOrganizationsParams) (*domain.OrganizationList, domain.Status)
- func (m *MockService) ListByExternalIDs(ctx context.Context, externalIDs []string) ([]*model.Organization, error)
- func (m *MockService) ListByIDs(ctx context.Context, ids []string) ([]*model.Organization, error)
- func (m *MockService) ListOrganizations(ctx context.Context, params domain.ListOrganizationsParams) (*domain.OrganizationList, domain.Status)
- func (m *MockService) UpsertMany(ctx context.Context, orgs []*model.Organization) ([]*model.Organization, error)
- type MockServiceMockRecorder
- func (mr *MockServiceMockRecorder) List(ctx, listParams any) *gomock.Call
- func (mr *MockServiceMockRecorder) ListAllOrganizations(ctx, params any) *gomock.Call
- func (mr *MockServiceMockRecorder) ListByExternalIDs(ctx, externalIDs any) *gomock.Call
- func (mr *MockServiceMockRecorder) ListByIDs(ctx, ids any) *gomock.Call
- func (mr *MockServiceMockRecorder) ListOrganizations(ctx, params any) *gomock.Call
- func (mr *MockServiceMockRecorder) UpsertMany(ctx, orgs any) *gomock.Call
- type Service
- type ServiceHandler
- func (h *ServiceHandler) List(ctx context.Context, listParams store.ListParams) ([]*model.Organization, error)
- func (h *ServiceHandler) ListAllOrganizations(ctx context.Context, params domain.ListOrganizationsParams) (*domain.OrganizationList, domain.Status)
- func (h *ServiceHandler) ListByExternalIDs(ctx context.Context, externalIDs []string) ([]*model.Organization, error)
- func (h *ServiceHandler) ListByIDs(ctx context.Context, ids []string) ([]*model.Organization, error)
- func (h *ServiceHandler) ListOrganizations(ctx context.Context, params domain.ListOrganizationsParams) (*domain.OrganizationList, domain.Status)
- func (h *ServiceHandler) UpsertMany(ctx context.Context, orgs []*model.Organization) ([]*model.Organization, error)
- type TracedService
- func (_d *TracedService) List(ctx context.Context, listParams store.ListParams) (opa1 []*model.Organization, err error)
- func (_d *TracedService) ListAllOrganizations(ctx context.Context, params domain.ListOrganizationsParams) (op1 *domain.OrganizationList, s1 domain.Status)
- func (_d *TracedService) ListByExternalIDs(ctx context.Context, externalIDs []string) (opa1 []*model.Organization, err error)
- func (_d *TracedService) ListByIDs(ctx context.Context, ids []string) (opa1 []*model.Organization, err error)
- func (_d *TracedService) ListOrganizations(ctx context.Context, params domain.ListOrganizationsParams) (op1 *domain.OrganizationList, s1 domain.Status)
- func (_d *TracedService) UpsertMany(ctx context.Context, orgs []*model.Organization) (opa1 []*model.Organization, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockService ¶
type MockService struct {
// contains filtered or unexported fields
}
MockService is a mock of Service interface.
func NewMockService ¶
func NewMockService(ctrl *gomock.Controller) *MockService
NewMockService creates a new mock instance.
func (*MockService) EXPECT ¶
func (m *MockService) EXPECT() *MockServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockService) List ¶ added in v1.4.0
func (m *MockService) List(ctx context.Context, listParams store.ListParams) ([]*model.Organization, error)
List mocks base method.
func (*MockService) ListAllOrganizations ¶
func (m *MockService) ListAllOrganizations(ctx context.Context, params domain.ListOrganizationsParams) (*domain.OrganizationList, domain.Status)
ListAllOrganizations mocks base method.
func (*MockService) ListByExternalIDs ¶ added in v1.4.0
func (m *MockService) ListByExternalIDs(ctx context.Context, externalIDs []string) ([]*model.Organization, error)
ListByExternalIDs mocks base method.
func (*MockService) ListByIDs ¶ added in v1.4.0
func (m *MockService) ListByIDs(ctx context.Context, ids []string) ([]*model.Organization, error)
ListByIDs mocks base method.
func (*MockService) ListOrganizations ¶
func (m *MockService) ListOrganizations(ctx context.Context, params domain.ListOrganizationsParams) (*domain.OrganizationList, domain.Status)
ListOrganizations mocks base method.
func (*MockService) UpsertMany ¶ added in v1.4.0
func (m *MockService) UpsertMany(ctx context.Context, orgs []*model.Organization) ([]*model.Organization, error)
UpsertMany mocks base method.
type MockServiceMockRecorder ¶
type MockServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockServiceMockRecorder is the mock recorder for MockService.
func (*MockServiceMockRecorder) List ¶ added in v1.4.0
func (mr *MockServiceMockRecorder) List(ctx, listParams any) *gomock.Call
List indicates an expected call of List.
func (*MockServiceMockRecorder) ListAllOrganizations ¶
func (mr *MockServiceMockRecorder) ListAllOrganizations(ctx, params any) *gomock.Call
ListAllOrganizations indicates an expected call of ListAllOrganizations.
func (*MockServiceMockRecorder) ListByExternalIDs ¶ added in v1.4.0
func (mr *MockServiceMockRecorder) ListByExternalIDs(ctx, externalIDs any) *gomock.Call
ListByExternalIDs indicates an expected call of ListByExternalIDs.
func (*MockServiceMockRecorder) ListByIDs ¶ added in v1.4.0
func (mr *MockServiceMockRecorder) ListByIDs(ctx, ids any) *gomock.Call
ListByIDs indicates an expected call of ListByIDs.
func (*MockServiceMockRecorder) ListOrganizations ¶
func (mr *MockServiceMockRecorder) ListOrganizations(ctx, params any) *gomock.Call
ListOrganizations indicates an expected call of ListOrganizations.
func (*MockServiceMockRecorder) UpsertMany ¶ added in v1.4.0
func (mr *MockServiceMockRecorder) UpsertMany(ctx, orgs any) *gomock.Call
UpsertMany indicates an expected call of UpsertMany.
type Service ¶
type Service interface {
ListOrganizations(ctx context.Context, params domain.ListOrganizationsParams) (*domain.OrganizationList, domain.Status)
ListAllOrganizations(ctx context.Context, params domain.ListOrganizationsParams) (*domain.OrganizationList, domain.Status)
// Internal sync APIs used by IdentityMapper (model types, not API list shapes).
UpsertMany(ctx context.Context, orgs []*model.Organization) ([]*model.Organization, error)
ListByIDs(ctx context.Context, ids []string) ([]*model.Organization, error)
ListByExternalIDs(ctx context.Context, externalIDs []string) ([]*model.Organization, error)
List(ctx context.Context, listParams store.ListParams) ([]*model.Organization, error)
}
func WrapWithTracing ¶
WrapWithTracing returns a Service that wraps inner with tracing spans, or nil if inner is nil.
type ServiceHandler ¶
type ServiceHandler struct {
// contains filtered or unexported fields
}
func NewServiceHandler ¶
func NewServiceHandler(store organizationstore.Store) *ServiceHandler
NewServiceHandler creates a new organization ServiceHandler instance.
func (*ServiceHandler) List ¶ added in v1.4.0
func (h *ServiceHandler) List(ctx context.Context, listParams store.ListParams) ([]*model.Organization, error)
func (*ServiceHandler) ListAllOrganizations ¶
func (h *ServiceHandler) ListAllOrganizations(ctx context.Context, params domain.ListOrganizationsParams) (*domain.OrganizationList, domain.Status)
ListAllOrganizations returns every organization in the system, bypassing identity-based scoping. It is intended for trusted internal callers (workers, periodic tasks, alert exporter) that need a system-wide view rather than the requesting identity's own organizations.
func (*ServiceHandler) ListByExternalIDs ¶ added in v1.4.0
func (h *ServiceHandler) ListByExternalIDs(ctx context.Context, externalIDs []string) ([]*model.Organization, error)
func (*ServiceHandler) ListByIDs ¶ added in v1.4.0
func (h *ServiceHandler) ListByIDs(ctx context.Context, ids []string) ([]*model.Organization, error)
func (*ServiceHandler) ListOrganizations ¶
func (h *ServiceHandler) ListOrganizations(ctx context.Context, params domain.ListOrganizationsParams) (*domain.OrganizationList, domain.Status)
ListOrganizations returns the organizations the caller's mapped identity belongs to.
func (*ServiceHandler) UpsertMany ¶ added in v1.4.0
func (h *ServiceHandler) UpsertMany(ctx context.Context, orgs []*model.Organization) ([]*model.Organization, error)
type TracedService ¶
type TracedService struct {
// contains filtered or unexported fields
}
TracedService wraps a Service implementation with OpenTelemetry tracing.
func (*TracedService) List ¶ added in v1.4.0
func (_d *TracedService) List(ctx context.Context, listParams store.ListParams) (opa1 []*model.Organization, err error)
func (*TracedService) ListAllOrganizations ¶
func (_d *TracedService) ListAllOrganizations(ctx context.Context, params domain.ListOrganizationsParams) (op1 *domain.OrganizationList, s1 domain.Status)
func (*TracedService) ListByExternalIDs ¶ added in v1.4.0
func (_d *TracedService) ListByExternalIDs(ctx context.Context, externalIDs []string) (opa1 []*model.Organization, err error)
func (*TracedService) ListByIDs ¶ added in v1.4.0
func (_d *TracedService) ListByIDs(ctx context.Context, ids []string) (opa1 []*model.Organization, err error)
func (*TracedService) ListOrganizations ¶
func (_d *TracedService) ListOrganizations(ctx context.Context, params domain.ListOrganizationsParams) (op1 *domain.OrganizationList, s1 domain.Status)
func (*TracedService) UpsertMany ¶ added in v1.4.0
func (_d *TracedService) UpsertMany(ctx context.Context, orgs []*model.Organization) (opa1 []*model.Organization, err error)