Documentation
¶
Overview ¶
Package authprovider is a generated GoMock package.
Index ¶
- func CreateAuthProviderFromUntrusted(ctx context.Context, svc Service, orgId uuid.UUID, ...) (*domain.AuthProvider, domain.Status)
- func ReplaceAuthProviderFromUntrusted(ctx context.Context, svc Service, orgId uuid.UUID, name string, ...) (*domain.AuthProvider, domain.Status)
- func SanitizeAuthProvider(authProvider *domain.AuthProvider)
- type MockService
- func (m *MockService) CreateAuthProvider(ctx context.Context, orgId uuid.UUID, authProvider domain.AuthProvider) (*domain.AuthProvider, domain.Status)
- func (m *MockService) DeleteAuthProvider(ctx context.Context, orgId uuid.UUID, name string) domain.Status
- func (m *MockService) EXPECT() *MockServiceMockRecorder
- func (m *MockService) GetAuthConfig(ctx context.Context, authConfig *domain.AuthConfig) (*domain.AuthConfig, domain.Status)
- func (m *MockService) GetAuthProvider(ctx context.Context, orgId uuid.UUID, name string) (*domain.AuthProvider, domain.Status)
- func (m *MockService) GetAuthProviderByAuthorizationUrl(ctx context.Context, orgId uuid.UUID, authorizationUrl string) (*domain.AuthProvider, domain.Status)
- func (m *MockService) GetAuthProviderByIssuerAndClientId(ctx context.Context, orgId uuid.UUID, issuer, clientId string) (*domain.AuthProvider, domain.Status)
- func (m *MockService) ListAllAuthProviders(ctx context.Context, params domain.ListAuthProvidersParams) (*domain.AuthProviderList, domain.Status)
- func (m *MockService) ListAuthProviders(ctx context.Context, orgId uuid.UUID, params domain.ListAuthProvidersParams) (*domain.AuthProviderList, domain.Status)
- func (m *MockService) PatchAuthProvider(ctx context.Context, orgId uuid.UUID, name string, patch domain.PatchRequest) (*domain.AuthProvider, domain.Status)
- func (m *MockService) ReplaceAuthProvider(ctx context.Context, orgId uuid.UUID, name string, ...) (*domain.AuthProvider, domain.Status)
- type MockServiceMockRecorder
- func (mr *MockServiceMockRecorder) CreateAuthProvider(ctx, orgId, authProvider any) *gomock.Call
- func (mr *MockServiceMockRecorder) DeleteAuthProvider(ctx, orgId, name any) *gomock.Call
- func (mr *MockServiceMockRecorder) GetAuthConfig(ctx, authConfig any) *gomock.Call
- func (mr *MockServiceMockRecorder) GetAuthProvider(ctx, orgId, name any) *gomock.Call
- func (mr *MockServiceMockRecorder) GetAuthProviderByAuthorizationUrl(ctx, orgId, authorizationUrl any) *gomock.Call
- func (mr *MockServiceMockRecorder) GetAuthProviderByIssuerAndClientId(ctx, orgId, issuer, clientId any) *gomock.Call
- func (mr *MockServiceMockRecorder) ListAllAuthProviders(ctx, params any) *gomock.Call
- func (mr *MockServiceMockRecorder) ListAuthProviders(ctx, orgId, params any) *gomock.Call
- func (mr *MockServiceMockRecorder) PatchAuthProvider(ctx, orgId, name, patch any) *gomock.Call
- func (mr *MockServiceMockRecorder) ReplaceAuthProvider(ctx, orgId, name, authProvider any) *gomock.Call
- type Service
- type ServiceHandler
- func (h *ServiceHandler) CreateAuthProvider(ctx context.Context, orgId uuid.UUID, authProvider domain.AuthProvider) (*domain.AuthProvider, domain.Status)
- func (h *ServiceHandler) DeleteAuthProvider(ctx context.Context, orgId uuid.UUID, name string) domain.Status
- func (h *ServiceHandler) GetAuthConfig(ctx context.Context, authConfig *domain.AuthConfig) (*domain.AuthConfig, domain.Status)
- func (h *ServiceHandler) GetAuthProvider(ctx context.Context, orgId uuid.UUID, name string) (*domain.AuthProvider, domain.Status)
- func (h *ServiceHandler) GetAuthProviderByAuthorizationUrl(ctx context.Context, orgId uuid.UUID, authorizationUrl string) (*domain.AuthProvider, domain.Status)
- func (h *ServiceHandler) GetAuthProviderByIssuerAndClientId(ctx context.Context, orgId uuid.UUID, issuer string, clientId string) (*domain.AuthProvider, domain.Status)
- func (h *ServiceHandler) ListAllAuthProviders(ctx context.Context, params domain.ListAuthProvidersParams) (*domain.AuthProviderList, domain.Status)
- func (h *ServiceHandler) ListAuthProviders(ctx context.Context, orgId uuid.UUID, params domain.ListAuthProvidersParams) (*domain.AuthProviderList, domain.Status)
- func (h *ServiceHandler) PatchAuthProvider(ctx context.Context, orgId uuid.UUID, name string, patch domain.PatchRequest) (*domain.AuthProvider, domain.Status)
- func (h *ServiceHandler) ReplaceAuthProvider(ctx context.Context, orgId uuid.UUID, name string, ...) (*domain.AuthProvider, domain.Status)
- type TracedService
- func (_d *TracedService) CreateAuthProvider(ctx context.Context, orgId uuid.UUID, authProvider domain.AuthProvider) (ap1 *domain.AuthProvider, s1 domain.Status)
- func (_d *TracedService) DeleteAuthProvider(ctx context.Context, orgId uuid.UUID, name string) (s1 domain.Status)
- func (_d *TracedService) GetAuthConfig(ctx context.Context, authConfig *domain.AuthConfig) (ap1 *domain.AuthConfig, s1 domain.Status)
- func (_d *TracedService) GetAuthProvider(ctx context.Context, orgId uuid.UUID, name string) (ap1 *domain.AuthProvider, s1 domain.Status)
- func (_d *TracedService) GetAuthProviderByAuthorizationUrl(ctx context.Context, orgId uuid.UUID, authorizationUrl string) (ap1 *domain.AuthProvider, s1 domain.Status)
- func (_d *TracedService) GetAuthProviderByIssuerAndClientId(ctx context.Context, orgId uuid.UUID, issuer string, clientId string) (ap1 *domain.AuthProvider, s1 domain.Status)
- func (_d *TracedService) ListAllAuthProviders(ctx context.Context, params domain.ListAuthProvidersParams) (ap1 *domain.AuthProviderList, s1 domain.Status)
- func (_d *TracedService) ListAuthProviders(ctx context.Context, orgId uuid.UUID, params domain.ListAuthProvidersParams) (ap1 *domain.AuthProviderList, s1 domain.Status)
- func (_d *TracedService) PatchAuthProvider(ctx context.Context, orgId uuid.UUID, name string, patch domain.PatchRequest) (ap1 *domain.AuthProvider, s1 domain.Status)
- func (_d *TracedService) ReplaceAuthProvider(ctx context.Context, orgId uuid.UUID, name string, ...) (ap1 *domain.AuthProvider, s1 domain.Status)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAuthProviderFromUntrusted ¶
func CreateAuthProviderFromUntrusted(ctx context.Context, svc Service, orgId uuid.UUID, authProvider domain.AuthProvider) (*domain.AuthProvider, domain.Status)
CreateAuthProviderFromUntrusted sanitizes an untrusted auth provider document, then creates it.
func ReplaceAuthProviderFromUntrusted ¶
func ReplaceAuthProviderFromUntrusted(ctx context.Context, svc Service, orgId uuid.UUID, name string, authProvider domain.AuthProvider) (*domain.AuthProvider, domain.Status)
ReplaceAuthProviderFromUntrusted sanitizes an untrusted auth provider document, then replaces it.
func SanitizeAuthProvider ¶
func SanitizeAuthProvider(authProvider *domain.AuthProvider)
SanitizeAuthProvider clears managed metadata from an untrusted auth provider document (HTTP body).
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) CreateAuthProvider ¶
func (m *MockService) CreateAuthProvider(ctx context.Context, orgId uuid.UUID, authProvider domain.AuthProvider) (*domain.AuthProvider, domain.Status)
CreateAuthProvider mocks base method.
func (*MockService) DeleteAuthProvider ¶
func (m *MockService) DeleteAuthProvider(ctx context.Context, orgId uuid.UUID, name string) domain.Status
DeleteAuthProvider mocks base method.
func (*MockService) EXPECT ¶
func (m *MockService) EXPECT() *MockServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockService) GetAuthConfig ¶
func (m *MockService) GetAuthConfig(ctx context.Context, authConfig *domain.AuthConfig) (*domain.AuthConfig, domain.Status)
GetAuthConfig mocks base method.
func (*MockService) GetAuthProvider ¶
func (m *MockService) GetAuthProvider(ctx context.Context, orgId uuid.UUID, name string) (*domain.AuthProvider, domain.Status)
GetAuthProvider mocks base method.
func (*MockService) GetAuthProviderByAuthorizationUrl ¶
func (m *MockService) GetAuthProviderByAuthorizationUrl(ctx context.Context, orgId uuid.UUID, authorizationUrl string) (*domain.AuthProvider, domain.Status)
GetAuthProviderByAuthorizationUrl mocks base method.
func (*MockService) GetAuthProviderByIssuerAndClientId ¶
func (m *MockService) GetAuthProviderByIssuerAndClientId(ctx context.Context, orgId uuid.UUID, issuer, clientId string) (*domain.AuthProvider, domain.Status)
GetAuthProviderByIssuerAndClientId mocks base method.
func (*MockService) ListAllAuthProviders ¶
func (m *MockService) ListAllAuthProviders(ctx context.Context, params domain.ListAuthProvidersParams) (*domain.AuthProviderList, domain.Status)
ListAllAuthProviders mocks base method.
func (*MockService) ListAuthProviders ¶
func (m *MockService) ListAuthProviders(ctx context.Context, orgId uuid.UUID, params domain.ListAuthProvidersParams) (*domain.AuthProviderList, domain.Status)
ListAuthProviders mocks base method.
func (*MockService) PatchAuthProvider ¶
func (m *MockService) PatchAuthProvider(ctx context.Context, orgId uuid.UUID, name string, patch domain.PatchRequest) (*domain.AuthProvider, domain.Status)
PatchAuthProvider mocks base method.
func (*MockService) ReplaceAuthProvider ¶
func (m *MockService) ReplaceAuthProvider(ctx context.Context, orgId uuid.UUID, name string, authProvider domain.AuthProvider) (*domain.AuthProvider, domain.Status)
ReplaceAuthProvider mocks base method.
type MockServiceMockRecorder ¶
type MockServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockServiceMockRecorder is the mock recorder for MockService.
func (*MockServiceMockRecorder) CreateAuthProvider ¶
func (mr *MockServiceMockRecorder) CreateAuthProvider(ctx, orgId, authProvider any) *gomock.Call
CreateAuthProvider indicates an expected call of CreateAuthProvider.
func (*MockServiceMockRecorder) DeleteAuthProvider ¶
func (mr *MockServiceMockRecorder) DeleteAuthProvider(ctx, orgId, name any) *gomock.Call
DeleteAuthProvider indicates an expected call of DeleteAuthProvider.
func (*MockServiceMockRecorder) GetAuthConfig ¶
func (mr *MockServiceMockRecorder) GetAuthConfig(ctx, authConfig any) *gomock.Call
GetAuthConfig indicates an expected call of GetAuthConfig.
func (*MockServiceMockRecorder) GetAuthProvider ¶
func (mr *MockServiceMockRecorder) GetAuthProvider(ctx, orgId, name any) *gomock.Call
GetAuthProvider indicates an expected call of GetAuthProvider.
func (*MockServiceMockRecorder) GetAuthProviderByAuthorizationUrl ¶
func (mr *MockServiceMockRecorder) GetAuthProviderByAuthorizationUrl(ctx, orgId, authorizationUrl any) *gomock.Call
GetAuthProviderByAuthorizationUrl indicates an expected call of GetAuthProviderByAuthorizationUrl.
func (*MockServiceMockRecorder) GetAuthProviderByIssuerAndClientId ¶
func (mr *MockServiceMockRecorder) GetAuthProviderByIssuerAndClientId(ctx, orgId, issuer, clientId any) *gomock.Call
GetAuthProviderByIssuerAndClientId indicates an expected call of GetAuthProviderByIssuerAndClientId.
func (*MockServiceMockRecorder) ListAllAuthProviders ¶
func (mr *MockServiceMockRecorder) ListAllAuthProviders(ctx, params any) *gomock.Call
ListAllAuthProviders indicates an expected call of ListAllAuthProviders.
func (*MockServiceMockRecorder) ListAuthProviders ¶
func (mr *MockServiceMockRecorder) ListAuthProviders(ctx, orgId, params any) *gomock.Call
ListAuthProviders indicates an expected call of ListAuthProviders.
func (*MockServiceMockRecorder) PatchAuthProvider ¶
func (mr *MockServiceMockRecorder) PatchAuthProvider(ctx, orgId, name, patch any) *gomock.Call
PatchAuthProvider indicates an expected call of PatchAuthProvider.
func (*MockServiceMockRecorder) ReplaceAuthProvider ¶
func (mr *MockServiceMockRecorder) ReplaceAuthProvider(ctx, orgId, name, authProvider any) *gomock.Call
ReplaceAuthProvider indicates an expected call of ReplaceAuthProvider.
type Service ¶
type Service interface {
CreateAuthProvider(ctx context.Context, orgId uuid.UUID, authProvider domain.AuthProvider) (*domain.AuthProvider, domain.Status)
ListAuthProviders(ctx context.Context, orgId uuid.UUID, params domain.ListAuthProvidersParams) (*domain.AuthProviderList, domain.Status)
ListAllAuthProviders(ctx context.Context, params domain.ListAuthProvidersParams) (*domain.AuthProviderList, domain.Status)
GetAuthProvider(ctx context.Context, orgId uuid.UUID, name string) (*domain.AuthProvider, domain.Status)
GetAuthProviderByIssuerAndClientId(ctx context.Context, orgId uuid.UUID, issuer string, clientId string) (*domain.AuthProvider, domain.Status)
GetAuthProviderByAuthorizationUrl(ctx context.Context, orgId uuid.UUID, authorizationUrl string) (*domain.AuthProvider, domain.Status)
ReplaceAuthProvider(ctx context.Context, orgId uuid.UUID, name string, authProvider domain.AuthProvider) (*domain.AuthProvider, domain.Status)
PatchAuthProvider(ctx context.Context, orgId uuid.UUID, name string, patch domain.PatchRequest) (*domain.AuthProvider, domain.Status)
DeleteAuthProvider(ctx context.Context, orgId uuid.UUID, name string) domain.Status
GetAuthConfig(ctx context.Context, authConfig *domain.AuthConfig) (*domain.AuthConfig, domain.Status)
}
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 authproviderstore.Store, events events.Service, log logrus.FieldLogger) *ServiceHandler
NewServiceHandler creates a new authprovider ServiceHandler instance.
func (*ServiceHandler) CreateAuthProvider ¶
func (h *ServiceHandler) CreateAuthProvider(ctx context.Context, orgId uuid.UUID, authProvider domain.AuthProvider) (*domain.AuthProvider, domain.Status)
func (*ServiceHandler) DeleteAuthProvider ¶
func (*ServiceHandler) GetAuthConfig ¶
func (h *ServiceHandler) GetAuthConfig(ctx context.Context, authConfig *domain.AuthConfig) (*domain.AuthConfig, domain.Status)
GetAuthConfig returns the authentication configuration The auth config from the middleware already includes all static and dynamic providers
func (*ServiceHandler) GetAuthProvider ¶
func (h *ServiceHandler) GetAuthProvider(ctx context.Context, orgId uuid.UUID, name string) (*domain.AuthProvider, domain.Status)
func (*ServiceHandler) GetAuthProviderByAuthorizationUrl ¶
func (h *ServiceHandler) GetAuthProviderByAuthorizationUrl(ctx context.Context, orgId uuid.UUID, authorizationUrl string) (*domain.AuthProvider, domain.Status)
func (*ServiceHandler) GetAuthProviderByIssuerAndClientId ¶
func (*ServiceHandler) ListAllAuthProviders ¶
func (h *ServiceHandler) ListAllAuthProviders(ctx context.Context, params domain.ListAuthProvidersParams) (*domain.AuthProviderList, domain.Status)
func (*ServiceHandler) ListAuthProviders ¶
func (h *ServiceHandler) ListAuthProviders(ctx context.Context, orgId uuid.UUID, params domain.ListAuthProvidersParams) (*domain.AuthProviderList, domain.Status)
func (*ServiceHandler) PatchAuthProvider ¶
func (h *ServiceHandler) PatchAuthProvider(ctx context.Context, orgId uuid.UUID, name string, patch domain.PatchRequest) (*domain.AuthProvider, domain.Status)
func (*ServiceHandler) ReplaceAuthProvider ¶
func (h *ServiceHandler) ReplaceAuthProvider(ctx context.Context, orgId uuid.UUID, name string, authProvider domain.AuthProvider) (*domain.AuthProvider, domain.Status)
type TracedService ¶
type TracedService struct {
// contains filtered or unexported fields
}
TracedService wraps a Service implementation with OpenTelemetry tracing.
func (*TracedService) CreateAuthProvider ¶
func (_d *TracedService) CreateAuthProvider(ctx context.Context, orgId uuid.UUID, authProvider domain.AuthProvider) (ap1 *domain.AuthProvider, s1 domain.Status)
func (*TracedService) DeleteAuthProvider ¶
func (*TracedService) GetAuthConfig ¶
func (_d *TracedService) GetAuthConfig(ctx context.Context, authConfig *domain.AuthConfig) (ap1 *domain.AuthConfig, s1 domain.Status)
func (*TracedService) GetAuthProvider ¶
func (_d *TracedService) GetAuthProvider(ctx context.Context, orgId uuid.UUID, name string) (ap1 *domain.AuthProvider, s1 domain.Status)
func (*TracedService) GetAuthProviderByAuthorizationUrl ¶
func (_d *TracedService) GetAuthProviderByAuthorizationUrl(ctx context.Context, orgId uuid.UUID, authorizationUrl string) (ap1 *domain.AuthProvider, s1 domain.Status)
func (*TracedService) GetAuthProviderByIssuerAndClientId ¶
func (*TracedService) ListAllAuthProviders ¶
func (_d *TracedService) ListAllAuthProviders(ctx context.Context, params domain.ListAuthProvidersParams) (ap1 *domain.AuthProviderList, s1 domain.Status)
func (*TracedService) ListAuthProviders ¶
func (_d *TracedService) ListAuthProviders(ctx context.Context, orgId uuid.UUID, params domain.ListAuthProvidersParams) (ap1 *domain.AuthProviderList, s1 domain.Status)
func (*TracedService) PatchAuthProvider ¶
func (_d *TracedService) PatchAuthProvider(ctx context.Context, orgId uuid.UUID, name string, patch domain.PatchRequest) (ap1 *domain.AuthProvider, s1 domain.Status)
func (*TracedService) ReplaceAuthProvider ¶
func (_d *TracedService) ReplaceAuthProvider(ctx context.Context, orgId uuid.UUID, name string, authProvider domain.AuthProvider) (ap1 *domain.AuthProvider, s1 domain.Status)