utils

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidServiceName = fmt.Errorf("invalid name")
)
View Source
var (
	Scopes []string = []string{
		"openid",
		"profile",
		"offline_access",

		"deploy:service",
		"read:service",
	}
)

Auth Vars

Functions

func GetEnv

func GetEnv() string

func GetGrpcTrailer

func GetGrpcTrailer() grpc.CallOption

func GetSupportedRuntimes

func GetSupportedRuntimes() []string

func IsValidEnvironmentType

func IsValidEnvironmentType(environmentType string) bool

func IsValidName

func IsValidName(s string) bool

func NewApiConnection

func NewApiConnection(cfg ApiConnectionConfig) (*grpc.ClientConn, error)

Returns a GRPC client that has been authenticated for use with Nucleus API

func NewApiConnectionByEnv added in v0.0.12

func NewApiConnectionByEnv(envType string) (*grpc.ClientConn, error)

func NewAuthenticatedConnection

func NewAuthenticatedConnection(accessToken string) (*grpc.ClientConn, error)

func PromptToProceed added in v0.0.16

func PromptToProceed(cmd *cobra.Command, environmentType string, yesPromptFlagName string) error

Types

type ApiConnectionConfig

type ApiConnectionConfig struct {
	AuthBaseUrl  string
	AuthClientId string
	ApiAudience  string
}

Jump to

Keyboard shortcuts

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