cmd

package
v0.0.0-...-8196470 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Overview

The MIT License (MIT)

Copyright (c) 2020 - 2022 Reliza Incorporated (Reliza (tm), https://reliza.io)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Index

Constants

View Source
const (
	ShellToUse = "sh"
	KubectlApp = "tools/kubectl"
)
View Source
const FULL_RELEASE_GQL_DATA = RELEASE_GQL_DATA + `
	sourceCodeEntryDetails {
		uuid
		branchUuid
		vcsUuid
		vcsBranch
		commit
		commits
		commitMessage
		vcsTag
		notes
		org
		dateActual
	}
	vcsRepository {
		uuid
		name
		org
		uri
		type
	}
	artifactDetails {
		uuid
		identifier
		org
		branch
		buildId
		buildUri
		cicdMeta
		digests
		isInternal
		artifactType {
			name
			aliases
		}
		notes
		tagRecords{
            key
            value
        }
		dateFrom
		dateTo
		buildDuration
		packageType
		version
		publisher
		group
		dependencies
	}
	projectName
	namespace
`
View Source
const PROJECT_GQL_DATA = `` /* 246-byte string literal not displayed */
View Source
const RELEASE_GQL_DATA = `` /* 503-byte string literal not displayed */

Variables

View Source
var Version string = "Version_Managed_By_CI_AND_Reliza"

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func GetDigestedImageFromSubstitution

func GetDigestedImageFromSubstitution(subst Substitution) string

func GetMatchingKeyFromSubstitution

func GetMatchingKeyFromSubstitution(subst Substitution) string

func IsInBitnamiParse

func IsInBitnamiParse(line string, whitespacePrefix int) bool

func ReadBomJsonFromFile

func ReadBomJsonFromFile(filePath string) map[string]interface{}

func ReplaceTags

func ReplaceTags(replaceTagsVars ReplaceTagsVars) string

Types

type BomInput

type BomInput struct {
	Meta string                 `json:"meta"`
	Bom  map[string]interface{} `json:"bom"`
	Tags map[string]interface{} `json:"tags"`
}

type ErrorBody

type ErrorBody struct {
	Timestamp string
	Status    int
	Error     string
	Message   string
	Path      string
}

type IsHasCertRHResp

type IsHasCertRHResp struct {
	Responsewrapper bool `json:"isInstanceHasSealedSecretCert"`
}

type KeyValueSorted

type KeyValueSorted struct {
	Key    string
	Value  Substitution
	Length int
}

type ProjectAuthResp

type ProjectAuthResp struct {
	Responsewrapper ProjectAuthRespMaps `json:"artifactDownloadSecrets"`
}

type ProjectAuthRespMaps

type ProjectAuthRespMaps struct {
	Login    string `json:"login"`
	Password string `json:"password"`
	Type     string `json:"type"`
}

type PropSecretParse

type PropSecretParse struct {
	Type      string // PROPERTY or SECRET
	Key       string // key known to Reliza Hub
	Default   string // default value of property or secret
	Wholetext string // Whole string to substitute including $RELIZA prefix and {}
}

type ReplaceTagsVars

type ReplaceTagsVars struct {
	TagSourceFile string
	TypeVal       string
	ApiKeyId      string
	ApiKey        string
	Instance      string
	Revision      string
	InstanceURI   string
	Bundle        string
	Version       string
	Environment   string
	Namespace     string
	Infile        string
	Indirectory   string
	Outfile       string
}

type RequestSession

type RequestSession struct {
	JSessionId string
	Token      string
}

type ResolvedProperty

type ResolvedProperty struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type ResolvedSecret

type ResolvedSecret struct {
	Secret    string `json:"value"`
	Timestamp int64  `json:"lastUpdated"`
	Key       string `json:"key"`
}

type SecretProps

type SecretProps struct {
	Secrets    map[string]bool `json:"secrets"`
	Properties map[string]bool `json:"properties"`
}

type SecretPropsRHResp

type SecretPropsRHResp struct {
	Responsewrapper SecretPropsRHRespMaps `json:"getInstancePropSecrets"`
}

type SecretPropsRHRespMaps

type SecretPropsRHRespMaps struct {
	Secrets    []ResolvedSecret   `json:"secrets"`
	Properties []ResolvedProperty `json:"properties"`
}

type SecretTemplateResolver

type SecretTemplateResolver struct {
	Name      string
	Namespace string
	Secret    string
}

type SetCertRHResp

type SetCertRHResp struct {
	Responsewrapper bool `json:"setInstanceSealedSecretCert"`
}

type Substitution

type Substitution struct {
	Registry string
	Image    string
	Digest   string
	Tag      string
}

func GetSubstitutionFromDigestedString

func GetSubstitutionFromDigestedString(ds string) Substitution

type TagRecord

type TagRecord struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL