validation

package
v0.0.0-...-9412d1a Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateCredential

func ValidateCredential(cred service.CredentialModel) error

ValidateCredential validates a credential object

Types

type AWSCredential

type AWSCredential struct {
	AccessKey string `json:"AWS_ACCESS_KEY_ID" mapstructure:"AWS_ACCESS_KEY_ID"`
	SecretKey string `json:"AWS_SECRET_ACCESS_KEY" mapstructure:"AWS_SECRET_ACCESS_KEY"`
}

type CredentialValidator

type CredentialValidator func(service.CredentialModel) error

CredentialValidator ...

type GitCredential

type GitCredential struct {
	Username string `json:"GIT_USERNAME" mapstructure:"GIT_USERNAME"`
	Password string `json:"GIT_PASSWORD" mapstructure:"GIT_PASSWORD"`
}

GitCredential describes schema for storing git password credential.

type KubeConfig

type KubeConfig struct {
	APIVersion     string                 `yaml:"apiVersion"`
	Clusters       []KubeConfigCluster    `yaml:"clusters"`
	Contexts       []KubeConfigContext    `yaml:"contexts"`
	CurrentContext string                 `yaml:"current-context"`
	Kind           string                 `yaml:"kind"`
	Preferences    map[string]interface{} `yaml:"preferences"`
	Users          []KubeConfigUser       `yaml:"users"`
}

KubeConfig describes schema for storing kubeconfig credential.

type KubeConfigCluster

type KubeConfigCluster struct {
	Cluster struct {
		CertificateAuthorityData string `yaml:"certificate-authority-data"`
		Server                   string `yaml:"server"`
	} `yaml:"cluster"`
	Name string `yaml:"name"`
}

type KubeConfigContext

type KubeConfigContext struct {
	Context struct {
		Cluster string `yaml:"cluster"`
		User    string `yaml:"user"`
	} `yaml:"context"`
	Name string `yaml:"name"`
}

type KubeConfigUser

type KubeConfigUser struct {
	Name string `yaml:"name"`
	User struct {
		ClientCertificateData string `yaml:"client-certificate-data"`
		ClientKeyData         string `yaml:"client-key-data"`
		Token                 string `yaml:"token"`
	} `yaml:"user"`
}

type OpenStackCredential

type OpenStackCredential struct {
	IdentityAPIVersion string `json:"OS_IDENTITY_API_VERSION" mapstructure:"OS_IDENTITY_API_VERSION"`
	RegionName         string `json:"OS_REGION_NAME" mapstructure:"OS_REGION_NAME"`
	Interface          string `json:"OS_INTERFACE" mapstructure:"OS_INTERFACE"`
	AuthURL            string `json:"OS_AUTH_URL" mapstructure:"OS_AUTH_URL"`

	ProjectDomainID   string `json:"OS_PROJECT_DOMAIN_ID" mapstructure:"OS_PROJECT_DOMAIN_ID"`
	ProjectDomainName string `json:"OS_PROJECT_DOMAIN_NAME" mapstructure:"OS_PROJECT_DOMAIN_NAME"`
	ProjectID         string `json:"OS_PROJECT_ID" mapstructure:"OS_PROJECT_ID"`
	ProjectName       string `json:"OS_PROJECT_NAME" mapstructure:"OS_PROJECT_NAME"`
	UserDomainName    string `json:"OS_USER_DOMAIN_NAME" mapstructure:"OS_USER_DOMAIN_NAME"`
	UserDomainID      string `json:"OS_USER_DOMAIN_ID" mapstructure:"OS_USER_DOMAIN_ID"`

	Username string `json:"OS_USERNAME" mapstructure:"OS_USERNAME"`
	Password string `json:"OS_PASSWORD" mapstructure:"OS_PASSWORD"`

	AuthType      string `json:"OS_AUTH_TYPE" mapstructure:"OS_AUTH_TYPE"`
	AppCredID     string `json:"OS_APPLICATION_CREDENTIAL_ID" mapstructure:"OS_APPLICATION_CREDENTIAL_ID"`
	AppCredName   string `json:"OS_APPLICATION_CREDENTIAL_NAME" mapstructure:"OS_APPLICATION_CREDENTIAL_NAME"`
	AppCredSecret string `json:"OS_APPLICATION_CREDENTIAL_SECRET" mapstructure:"OS_APPLICATION_CREDENTIAL_SECRET"`

	Token string `json:"OS_TOKEN" mapstructure:"OS_TOKEN"`
}

Jump to

Keyboard shortcuts

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