common

package
v1.0.99 Latest Latest
Warning

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

Go to latest
Published: May 29, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormUseCaseToFormVars

func FormUseCaseToFormVars(stackConfig models.ServiceCatalogConfigs, useCaseName string) (*models.FormVariables, error)

func GenerateCanonical

func GenerateCanonical(name string) string

GenerateCanonical will generate a canonical from the name passed in input

func GetPipelineName

func GetPipelineName(project, env string) string

func ReplaceCycloidVars

func ReplaceCycloidVars(ctx CycloidContext, text []byte) []byte

func ReplaceCycloidVarsString

func ReplaceCycloidVarsString(ctx CycloidContext, text string) string

func RequiredFlag

func RequiredFlag(withFlag func(cmd *cobra.Command) string, cmd *cobra.Command)

func RequiredPersistentFlag

func RequiredPersistentFlag(withFlag func(cmd *cobra.Command) string, cmd *cobra.Command)

func UpdateMapField

func UpdateMapField(field string, value string, m map[string]map[string]map[string]any) error

Update map 'm' with field 'field' to 'value' the field must be in dot notation e.g. field='one.nested.key' value='myValue' If the map is nil, it will be created

func WithFlagCan

func WithFlagCan(cmd *cobra.Command) string

func WithFlagCred

func WithFlagCred(cmd *cobra.Command) string

func WithFlagEnv

func WithFlagEnv(cmd *cobra.Command) string

func WithFlagID

func WithFlagID(cmd *cobra.Command) string

func WithFlagProject

func WithFlagProject(cmd *cobra.Command) string

func WithPersistentFlagCan

func WithPersistentFlagCan(cmd *cobra.Command) string

Types

type APIClient

type APIClient struct {
	*client.API

	Config APIConfig
}

func NewAPI

func NewAPI(opts ...APIOptions) *APIClient

func (*APIClient) Credentials

func (a *APIClient) Credentials(org *string) runtime.ClientAuthInfoWriter

func (*APIClient) GetToken

func (a *APIClient) GetToken(org *string) string

type APIConfig

type APIConfig struct {
	URL      string
	Insecure bool
	Token    string
}

type APIOptions

type APIOptions func(acfg *APIConfig)

func WithInsecure

func WithInsecure(i bool) APIOptions

func WithToken

func WithToken(t string) APIOptions

func WithURL

func WithURL(u string) APIOptions

type CycloidContext

type CycloidContext struct {
	Org     string
	Env     string
	Project string
}

Jump to

Keyboard shortcuts

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