Documentation
¶
Overview ¶
Copyright 2021 IBM Corporation
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2021 IBM Corporation ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2021 IBM Corporation ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func FileExists(path string) (bool, error)
- func GetModelType(req *mmesh.LoadModelRequest, log logr.Logger) string
- func GetSchemaPath(req *mmesh.LoadModelRequest) (string, error)
- func RemoveFileFromListOfFileInfo(filename string, files []os.FileInfo) (bool, []os.FileInfo)
- func SecureJoin(elem ...string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetModelType ¶ added in v0.8.0
func GetModelType(req *mmesh.LoadModelRequest, log logr.Logger) string
GetModelType first tries to read the type from the LoadModelRequest.ModelKey json If there is an error parsing LoadModelRequest.ModelKey or the type is not found there, this will return the LoadModelRequest.ModelType which could possibly be an empty string
func GetSchemaPath ¶ added in v0.8.0
func GetSchemaPath(req *mmesh.LoadModelRequest) (string, error)
GetSchemaPath extracts the schema path from the ModelKey field Will return an error if schema path exists but is in an invalid format
func RemoveFileFromListOfFileInfo ¶
RemoveFileFromListOfFileInfo The input `files` content is modified, the order of elements is changed
func SecureJoin ¶
Types ¶
This section is empty.