Documentation
¶
Index ¶
- Constants
- func CertFromFilePair(certFile, keyFile string) (*tls.Certificate, error)
- func CertPoolFromFile(filename string) (*x509.CertPool, error)
- func CreateCertificateFile(registryName, caString string) (certificatePath string, err error)
- func DeleteCertificateFolder(filePath string) error
- func GetHttpClient(config *Configuration) (*http.Client, error)
- func GetLoggedInClient(client *registry.Client, config *Configuration) (*registry.Client, error)
- func GetTlsConfig(config *Configuration) (*tls.Config, error)
- func NewClientTLS(certFile, keyFile, caFile string, insecureSkipTLSverify bool) (*tls.Config, error)
- type Configuration
- type DefaultSettingsGetter
- type DefaultSettingsGetterImpl
- type RegistryConnectionType
- type Settings
- type SettingsFactory
- type SettingsFactoryImpl
- type SettingsGetter
Constants ¶
View Source
const ( REGISTRY_TYPE_ECR = "ecr" REGISTRYTYPE_GCR = "gcr" REGISTRYTYPE_ARTIFACT_REGISTRY = "artifact-registry" JSON_KEY_USERNAME string = "_json_key" )
View Source
const ( INSECURE_CONNECTION = "insecure" SECURE_WITH_CERT = "secure-with-cert" )
View Source
const (
REGISTRY_CREDENTIAL_BASE_PATH = "/home/devtron/registry-credentials"
)
Variables ¶
This section is empty.
Functions ¶
func CertFromFilePair ¶
func CertFromFilePair(certFile, keyFile string) (*tls.Certificate, error)
func CreateCertificateFile ¶
func DeleteCertificateFolder ¶
func GetHttpClient ¶
func GetHttpClient(config *Configuration) (*http.Client, error)
func GetLoggedInClient ¶
func GetTlsConfig ¶
func GetTlsConfig(config *Configuration) (*tls.Config, error)
Types ¶
type Configuration ¶
type Configuration struct { RegistryId string RegistryUrl string Username string Password string AwsAccessKey string AwsSecretKey string AwsRegion string RegistryConnectionType string //secure, insecure, secure-with-cert RegistryCertificateString string RegistryCAFilePath string RegistryType string IsPublicRegistry bool RemoteConnectionConfig *bean.RemoteConnectionConfigBean }
type DefaultSettingsGetter ¶
type DefaultSettingsGetter interface { SettingsGetter }
type DefaultSettingsGetterImpl ¶
type DefaultSettingsGetterImpl struct {
// contains filtered or unexported fields
}
func NewDefaultSettingsGetter ¶
func NewDefaultSettingsGetter(logger *zap.SugaredLogger) *DefaultSettingsGetterImpl
func (*DefaultSettingsGetterImpl) GetRegistrySettings ¶
func (s *DefaultSettingsGetterImpl) GetRegistrySettings(config *Configuration) (*Settings, error)
type RegistryConnectionType ¶
type RegistryConnectionType string
const ( REGISTRY_CONNECTION_TYPE_DIRECT RegistryConnectionType = "DIRECT" REGISTRY_CONNECTION_TYPE_PROXY RegistryConnectionType = "PROXY" REGISTRY_CONNECTION_TYPE_SSH RegistryConnectionType = "SSH" )
type SettingsFactory ¶
type SettingsFactory interface {
GetSettings(config *Configuration) (SettingsGetter, error)
}
type SettingsFactoryImpl ¶
type SettingsFactoryImpl struct {
DefaultSettings DefaultSettingsGetter
}
func NewSettingsFactoryImpl ¶
func NewSettingsFactoryImpl( DefaultSettings DefaultSettingsGetter, ) *SettingsFactoryImpl
func (SettingsFactoryImpl) GetSettings ¶
func (impl SettingsFactoryImpl) GetSettings(config *Configuration) (SettingsGetter, error)
type SettingsGetter ¶
type SettingsGetter interface {
GetRegistrySettings(config *Configuration) (*Settings, error)
}
Click to show internal directories.
Click to hide internal directories.