Documentation ¶
Overview ¶
*
- Copyright 2020 Napptive *
- 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 *
- https://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 ApplicationInfoToJSON(metadata entities.ApplicationInfo) (string, error)
- func CreateTestApplicationInfo() *entities.ApplicationInfo
- func CreateTestApplicationInfoWithoutLogo() *entities.ApplicationInfo
- func CreateTestApplicationMetadata() *entities.ApplicationMetadata
- func CreateTestJWTAuthIncomingContext(username string, accountName string, accountAdmin bool) context.Context
- func DecomposeApplicationID(applicationID string) (string, *entities.ApplicationID, error)
- func GenerateRandomString(length int) (string, error)
- func GetFile(relativeFileName string, files []*entities.FileInfo) []byte
- func IsMetadata(data []byte) (bool, *entities.ApplicationMetadata, error)
- func IsYamlFile(filePath string) bool
- func RunIntegrationTests(id string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplicationInfoToJSON ¶
func ApplicationInfoToJSON(metadata entities.ApplicationInfo) (string, error)
ApplicationInfoToJSON converts an ApplicationInfo struct into a JSON
func CreateTestApplicationInfo ¶
func CreateTestApplicationInfo() *entities.ApplicationInfo
func CreateTestApplicationInfoWithoutLogo ¶
func CreateTestApplicationInfoWithoutLogo() *entities.ApplicationInfo
func CreateTestApplicationMetadata ¶
func CreateTestApplicationMetadata() *entities.ApplicationMetadata
func CreateTestJWTAuthIncomingContext ¶
func CreateTestJWTAuthIncomingContext(username string, accountName string, accountAdmin bool) context.Context
CreateTestJWTAuthIncomingContext creates a test context with metadata as found after passing the interceptor.
func DecomposeApplicationID ¶
func DecomposeApplicationID(applicationID string) (string, *entities.ApplicationID, error)
DecomposeApplicationID extracts the catalog URL, namespace, and application name from an application identifier in the form of: [catalogURL/]namespace/appName[:tag]
func GenerateRandomString ¶
GenerateRandomString is a method to generate a random string with a determinate length
func GetFile ¶
getFile looks for a file by name in the array retrieved and returns the data or nil if the file does not exist
func IsMetadata ¶
func IsMetadata(data []byte) (bool, *entities.ApplicationMetadata, error)
IsMetadata checks if the file is metadata file and returns it
func IsYamlFile ¶
check file extension and returns if is a yaml file
func RunIntegrationTests ¶
RunIntegrationTests checks whether integration tests should be executed.
Types ¶
This section is empty.