Documentation ¶
Index ¶
- Constants
- func BuildSMRequestParameters(namespace string, parametersFrom []servicesv1.ParametersFromSource, ...) (map[string]interface{}, []byte, error)
- func BuildUserInfo(ctx context.Context, userInfo *v1.UserInfo) string
- func GetConditionReason(opType smClientTypes.OperationCategory, state smClientTypes.OperationState) string
- func GetLogger(ctx context.Context) logr.Logger
- func GetSMClient(ctx context.Context, serviceInstance *v1.ServiceInstance) (sm.Client, error)
- func GetSecretForResource(ctx context.Context, namespace, name string) (*v1.Secret, error)
- func GetSecretFromManagementNamespace(ctx context.Context, name string) (*v1.Secret, error)
- func GetSecretWithFallback(ctx context.Context, namespacedName types.NamespacedName, secret *v1.Secret) error
- func HandleDeleteError(ctx context.Context, k8sClient client.Client, err error, ...) (ctrl.Result, error)
- func HandleError(ctx context.Context, k8sClient client.Client, ...) (ctrl.Result, error)
- func InitConditions(ctx context.Context, k8sClient client.Client, obj common.SAPBTPResource) error
- func InitializeSecretsClient(client, nonCachedClient client.Client, config config.Config)
- func IsFailed(resource common.SAPBTPResource) bool
- func IsInProgress(object common.SAPBTPResource) bool
- func IsMarkedForDeletion(object metav1.ObjectMeta) bool
- func IsTransientError(smError *sm.ServiceManagerError, log logr.Logger) bool
- func MarkAsNonTransientError(ctx context.Context, k8sClient client.Client, ...) (ctrl.Result, error)
- func MarkAsTransientError(ctx context.Context, k8sClient client.Client, ...) (ctrl.Result, error)
- func MarshalRawParameters(in map[string]interface{}) ([]byte, error)
- func RandStringRunes(n int) string
- func RemoveAnnotations(ctx context.Context, k8sClient client.Client, object common.SAPBTPResource, ...) error
- func RemoveFinalizer(ctx context.Context, k8sClient client.Client, object common.SAPBTPResource, ...) error
- func SetBlockedCondition(ctx context.Context, message string, object common.SAPBTPResource)
- func SetCredRotationInProgressConditions(reason, message string, object common.SAPBTPResource)
- func SetFailureConditions(operationType smClientTypes.OperationCategory, errorMessage string, ...)
- func SetInProgressConditions(ctx context.Context, operationType smClientTypes.OperationCategory, ...)
- func SetSuccessConditions(operationType smClientTypes.OperationCategory, object common.SAPBTPResource, ...)
- func SliceContains(slice []string, i string) bool
- func UnmarshalRawParameters(in []byte) (map[string]interface{}, error)
- func UpdateStatus(ctx context.Context, k8sClient client.Client, object common.SAPBTPResource) error
- type InvalidCredentialsError
- type LogKey
- type SecretMetadataProperty
Constants ¶
View Source
const ( TEXT format = "text" JSON format = "json" UNKNOWN format = "unknown" )
View Source
const ( SAPBTPOperatorSecretName = "sap-btp-service-operator" SAPBTPOperatorTLSSecretName = "sap-btp-service-operator-tls" )
Variables ¶
This section is empty.
Functions ¶
func BuildSMRequestParameters ¶
func BuildSMRequestParameters(namespace string, parametersFrom []servicesv1.ParametersFromSource, parameters *runtime.RawExtension) (map[string]interface{}, []byte, error)
BuildSMRequestParameters buildParameters generates the parameters JSON structure to be passed to the broker. The first return value is a map of parameters to send to the Broker, including secret values. The second return value is parameters marshalled to byt array The third return value is any error that caused the function to fail.
func GetConditionReason ¶
func GetConditionReason(opType smClientTypes.OperationCategory, state smClientTypes.OperationState) string
func GetSMClient ¶
func GetSecretForResource ¶ added in v0.6.6
func GetSecretFromManagementNamespace ¶ added in v0.6.6
func GetSecretWithFallback ¶ added in v0.6.6
func HandleDeleteError ¶ added in v0.6.9
func HandleError ¶
func HandleError(ctx context.Context, k8sClient client.Client, operationType smClientTypes.OperationCategory, err error, resource common.SAPBTPResource) (ctrl.Result, error)
func InitConditions ¶
func InitializeSecretsClient ¶ added in v0.6.6
func IsFailed ¶
func IsFailed(resource common.SAPBTPResource) bool
func IsInProgress ¶
func IsInProgress(object common.SAPBTPResource) bool
func IsMarkedForDeletion ¶
func IsMarkedForDeletion(object metav1.ObjectMeta) bool
func IsTransientError ¶
func IsTransientError(smError *sm.ServiceManagerError, log logr.Logger) bool
func MarkAsNonTransientError ¶
func MarkAsNonTransientError(ctx context.Context, k8sClient client.Client, operationType smClientTypes.OperationCategory, err error, object common.SAPBTPResource) (ctrl.Result, error)
func MarkAsTransientError ¶
func MarkAsTransientError(ctx context.Context, k8sClient client.Client, operationType smClientTypes.OperationCategory, err error, object common.SAPBTPResource) (ctrl.Result, error)
func MarshalRawParameters ¶
MarshalRawParameters marshals the specified map of parameters into JSON
func RandStringRunes ¶
func RemoveAnnotations ¶
func RemoveFinalizer ¶
func SetBlockedCondition ¶
func SetBlockedCondition(ctx context.Context, message string, object common.SAPBTPResource)
blocked condition marks to the user that action from his side is required, this is considered as in progress operation
func SetCredRotationInProgressConditions ¶
func SetCredRotationInProgressConditions(reason, message string, object common.SAPBTPResource)
func SetFailureConditions ¶
func SetFailureConditions(operationType smClientTypes.OperationCategory, errorMessage string, object common.SAPBTPResource, isAsyncOperation bool)
func SetInProgressConditions ¶
func SetInProgressConditions(ctx context.Context, operationType smClientTypes.OperationCategory, message string, object common.SAPBTPResource, isAsyncOperation bool)
func SetSuccessConditions ¶
func SetSuccessConditions(operationType smClientTypes.OperationCategory, object common.SAPBTPResource, isAsyncOperation bool)
func SliceContains ¶
func UnmarshalRawParameters ¶
UnmarshalRawParameters produces a map structure from a given raw YAML/JSON input
func UpdateStatus ¶
Types ¶
type InvalidCredentialsError ¶ added in v0.6.7
type InvalidCredentialsError struct{}
func (*InvalidCredentialsError) Error ¶ added in v0.6.7
func (ic *InvalidCredentialsError) Error() string
type SecretMetadataProperty ¶
type SecretMetadataProperty struct { Name string `json:"name"` Container bool `json:"container,omitempty"` Format string `json:"format"` }
func NormalizeCredentials ¶
func NormalizeCredentials(credentialsJSON json.RawMessage) (map[string][]byte, []SecretMetadataProperty, error)
Click to show internal directories.
Click to hide internal directories.