-func (*ProviderManager) updateFunction(function provapi.APIProviderFunctionDetails, registeredProvider provapi.APIProviderEnrolmentDetails, ctx echo.Context) (bool, error) {
- pos, registeredFunction, err := getApiFunc(*function.ApiProvFuncId, registeredProvider.ApiProvFuncs)
- if err != nil {
- return true, sendCoreError(ctx, http.StatusBadRequest, "Unable to update provider due to: "+err.Error())
- }
- if function.ApiProvFuncInfo != nil {
- registeredFunction.ApiProvFuncInfo = function.ApiProvFuncInfo
- (*registeredProvider.ApiProvFuncs)[pos] = registeredFunction
- }
- return false, nil
-}
-
-func getApiFunc(funcId string, apiFunctions *[]provapi.APIProviderFunctionDetails) (int, provapi.APIProviderFunctionDetails, error) {
- for pos, function := range *apiFunctions {
- if *function.ApiProvFuncId == funcId {
- return pos, function, nil
- }
- }
- return 0, provapi.APIProviderFunctionDetails{}, fmt.Errorf("function with ID %s is not registered for the provider", funcId)
-}
-
-func (pm *ProviderManager) ModifyIndApiProviderEnrolment(ctx echo.Context, registrationId string) error {
- return ctx.NoContent(http.StatusNotImplemented)
-}
-
-func (pm *ProviderManager) registerFunctions(provFuncs *[]provapi.APIProviderFunctionDetails) {
- if provFuncs == nil {
- return
- }
- for i, provFunc := range *provFuncs {
- (*provFuncs)[i].ApiProvFuncId = pm.getFuncId(provFunc.ApiProvFuncRole, provFunc.ApiProvFuncInfo)
- }
-}
-
-func (pm *ProviderManager) getDomainId(domainInfo *string) *string {
- idAsString := "domain_id_" + strings.ReplaceAll(*domainInfo, " ", "_")
- return &idAsString
-}