connection

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleNameArgoCd      string = "argo-cd"
	ModuleStatusInstalled string = "installed"
)

Variables

This section is empty.

Functions

func EncodeX509KeyPair

func EncodeX509KeyPair(cert tls.Certificate) ([]byte, []byte)

EncodeX509KeyPair encodes a TLS Certificate into its pem encoded format for storage

func SetTokenAuth

func SetTokenAuth(token string)

func SettingsManager

func SettingsManager(cfg *Config) (*settings.SettingsManager, error)

Types

type ArgoCDConnectionManager

type ArgoCDConnectionManager interface {
	GetConnection(token string) *grpc.ClientConn
}

type ArgoCDConnectionManagerImpl

type ArgoCDConnectionManagerImpl struct {
	// contains filtered or unexported fields
}

func NewArgoCDConnectionManagerImpl

func NewArgoCDConnectionManagerImpl(Logger *zap.SugaredLogger, settingsManager *settings.SettingsManager,
	moduleRepository moduleRepo.ModuleRepository) (*ArgoCDConnectionManagerImpl, error)

func (*ArgoCDConnectionManagerImpl) GetConnection

func (impl *ArgoCDConnectionManagerImpl) GetConnection(token string) *grpc.ClientConn

GetConnection - this function will call only for acd connection

type Config

type Config struct {
	Host      string `env:"CD_HOST" envDefault:"localhost"`
	Port      string `env:"CD_PORT" envDefault:"8000"`
	Namespace string `env:"CD_NAMESPACE" envDefault:"devtroncd"`
}

func GetConfig

func GetConfig() (*Config, error)

type TokenAuth

type TokenAuth struct {
	// contains filtered or unexported fields
}

func GetTokenAuth

func GetTokenAuth() *TokenAuth

func (TokenAuth) GetRequestMetadata

func (t TokenAuth) GetRequestMetadata(ctx context.Context, in ...string) (map[string]string, error)

Return value is mapped to request headers.

func (TokenAuth) RequireTransportSecurity

func (TokenAuth) RequireTransportSecurity() bool

Jump to

Keyboard shortcuts

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