connection

package
v1.0.457 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 8 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSConnection

type AWSConnection struct {
	// ConnectionName of the connection. It'll be used to populate the endpoint, accessKey and secretKey.
	ConnectionName string       `yaml:"connection,omitempty" json:"connection,omitempty"`
	AccessKey      types.EnvVar `yaml:"accessKey" json:"accessKey,omitempty"`
	SecretKey      types.EnvVar `yaml:"secretKey" json:"secretKey,omitempty"`
	SessionToken   types.EnvVar `yaml:"sessionToken,omitempty" json:"sessionToken,omitempty"`
	Region         string       `yaml:"region,omitempty" json:"region,omitempty"`
	Endpoint       string       `yaml:"endpoint,omitempty" json:"endpoint,omitempty"`
	// Skip TLS verify when connecting to aws
	SkipTLSVerify bool `yaml:"skipTLSVerify,omitempty" json:"skipTLSVerify,omitempty"`
}

+kubebuilder:object:generate=true

func (*AWSConnection) DeepCopy

func (in *AWSConnection) DeepCopy() *AWSConnection

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSConnection.

func (*AWSConnection) DeepCopyInto

func (in *AWSConnection) DeepCopyInto(out *AWSConnection)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AWSConnection) GetPassword

func (t *AWSConnection) GetPassword() types.EnvVar

func (*AWSConnection) GetProperties

func (t *AWSConnection) GetProperties() map[string]string

func (*AWSConnection) GetURL

func (t *AWSConnection) GetURL() types.EnvVar

func (*AWSConnection) GetUsername

func (t *AWSConnection) GetUsername() types.EnvVar

func (*AWSConnection) Populate

func (t *AWSConnection) Populate(ctx ConnectionContext) error

Populate populates an AWSConnection with credentials and other information. If a connection name is specified, it'll be used to populate the endpoint, accessKey and secretKey.

type Authentication

type Authentication struct {
	Username types.EnvVar `yaml:"username,omitempty" json:"username,omitempty"`
	Password types.EnvVar `yaml:"password,omitempty" json:"password,omitempty"`
}

+kubebuilder:object:generate=true

func (*Authentication) DeepCopy

func (in *Authentication) DeepCopy() *Authentication

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Authentication.

func (*Authentication) DeepCopyInto

func (in *Authentication) DeepCopyInto(out *Authentication)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Authentication) GetDomain

func (auth Authentication) GetDomain() string

func (Authentication) GetPassword

func (auth Authentication) GetPassword() string

func (Authentication) GetUsername

func (auth Authentication) GetUsername() string

func (Authentication) IsEmpty

func (auth Authentication) IsEmpty() bool

type ConnectionContext

type ConnectionContext interface {
	context.Context
	HydrateConnectionByURL(connectionName string) (*models.Connection, error)
	GetEnvValueFromCache(env types.EnvVar, namespace string) (string, error)
}

type GCPConnection

type GCPConnection struct {
	// ConnectionName of the connection. It'll be used to populate the endpoint and credentials.
	ConnectionName string        `yaml:"connection,omitempty" json:"connection,omitempty"`
	Endpoint       string        `yaml:"endpoint" json:"endpoint,omitempty"`
	Credentials    *types.EnvVar `yaml:"credentials" json:"credentials,omitempty"`
}

+kubebuilder:object:generate=true

func (*GCPConnection) DeepCopy

func (in *GCPConnection) DeepCopy() *GCPConnection

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPConnection.

func (*GCPConnection) DeepCopyInto

func (in *GCPConnection) DeepCopyInto(out *GCPConnection)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*GCPConnection) GetCertificate added in v1.0.247

func (t *GCPConnection) GetCertificate() types.EnvVar

func (*GCPConnection) GetURL added in v1.0.247

func (t *GCPConnection) GetURL() types.EnvVar

func (*GCPConnection) HydrateConnection

func (g *GCPConnection) HydrateConnection(ctx ConnectionContext) error

HydrateConnection attempts to find the connection by name and populate the endpoint and credentials.

func (*GCPConnection) Validate

func (g *GCPConnection) Validate() *GCPConnection

type GCSConnection added in v1.0.247

type GCSConnection struct {
	GCPConnection `json:",inline"`
	Bucket        string `yaml:"bucket,omitempty" json:"bucket,omitempty"`
}

+kubebuilder:object:generate=true

func (*GCSConnection) DeepCopy added in v1.0.247

func (in *GCSConnection) DeepCopy() *GCSConnection

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCSConnection.

func (*GCSConnection) DeepCopyInto added in v1.0.247

func (in *GCSConnection) DeepCopyInto(out *GCSConnection)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*GCSConnection) GetProperties added in v1.0.247

func (t *GCSConnection) GetProperties() map[string]string

func (*GCSConnection) HydrateConnection added in v1.0.247

func (g *GCSConnection) HydrateConnection(ctx ConnectionContext) error

HydrateConnection attempts to find the connection by name and populate the endpoint and credentials.

func (*GCSConnection) Validate added in v1.0.247

func (g *GCSConnection) Validate() *GCSConnection

type S3Connection added in v1.0.247

type S3Connection struct {
	AWSConnection `json:",inline"`
	Bucket        string `yaml:"bucket,omitempty" json:"bucket,omitempty"`
	// glob path to restrict matches to a subset
	ObjectPath string `yaml:"objectPath,omitempty" json:"objectPath,omitempty"`
	// Use path style path: http://s3.amazonaws.com/BUCKET/KEY instead of http://BUCKET.s3.amazonaws.com/KEY
	UsePathStyle bool `yaml:"usePathStyle,omitempty" json:"usePathStyle,omitempty"`
}

+kubebuilder:object:generate=true

func (*S3Connection) DeepCopy added in v1.0.247

func (in *S3Connection) DeepCopy() *S3Connection

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S3Connection.

func (*S3Connection) DeepCopyInto added in v1.0.247

func (in *S3Connection) DeepCopyInto(out *S3Connection)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*S3Connection) GetProperties added in v1.0.247

func (t *S3Connection) GetProperties() map[string]string

func (*S3Connection) Populate added in v1.0.247

func (t *S3Connection) Populate(ctx ConnectionContext) error

Populate populates an AWSConnection with credentials and other information. If a connection name is specified, it'll be used to populate the endpoint, accessKey and secretKey.

type SFTPConnection

type SFTPConnection struct {
	// ConnectionName of the connection. It'll be used to populate the connection fields.
	ConnectionName string `yaml:"connection,omitempty" json:"connection,omitempty"`
	// Port for the SSH server. Defaults to 22
	Port           int    `yaml:"port,omitempty" json:"port,omitempty"`
	Host           string `yaml:"host" json:"host"`
	Authentication `yaml:",inline" json:",inline"`
}

+kubebuilder:object:generate=true

func (*SFTPConnection) DeepCopy

func (in *SFTPConnection) DeepCopy() *SFTPConnection

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SFTPConnection.

func (*SFTPConnection) DeepCopyInto

func (in *SFTPConnection) DeepCopyInto(out *SFTPConnection)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (SFTPConnection) GetPort

func (c SFTPConnection) GetPort() int

func (*SFTPConnection) HydrateConnection

func (c *SFTPConnection) HydrateConnection(ctx ConnectionContext) (found bool, err error)

type SMBConnection

type SMBConnection struct {
	// ConnectionName of the connection. It'll be used to populate the connection fields.
	ConnectionName string `yaml:"connection,omitempty" json:"connection,omitempty"`
	//Port on which smb server is running. Defaults to 445
	Port           int `yaml:"port,omitempty" json:"port,omitempty"`
	Authentication `yaml:",inline" json:",inline"`
	//Domain...
	Domain string `yaml:"domain,omitempty" json:"domain,omitempty"`
}

+kubebuilder:object:generate=true

func (*SMBConnection) DeepCopy

func (in *SMBConnection) DeepCopy() *SMBConnection

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SMBConnection.

func (*SMBConnection) DeepCopyInto

func (in *SMBConnection) DeepCopyInto(out *SMBConnection)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (SMBConnection) GetPort

func (c SMBConnection) GetPort() int

func (*SMBConnection) HydrateConnection

func (c *SMBConnection) HydrateConnection(ctx ConnectionContext) (found bool, err error)

Jump to

Keyboard shortcuts

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