Documentation
¶
Index ¶
- Constants
- func GetDefaultEnvironmentDirPath() string
- func GetDefaultEnvironmentFilePath() string
- func GetDefaultIRODSConfigPath() string
- func GetDefaultPasswordFilePath() string
- type Config
- func GetDefaultConfig() *Config
- func NewConfigFromEnv(config *Config) (*Config, error)
- func NewConfigFromFile(config *Config, filePath string) (*Config, error)
- func NewConfigFromJSON(config *Config, jsonBytes []byte) (*Config, error)
- func NewConfigFromJSONFile(config *Config, jsonPath string) (*Config, error)
- func NewConfigFromYAML(config *Config, yamlBytes []byte) (*Config, error)
- func NewConfigFromYAMLFile(config *Config, yamlPath string) (*Config, error)
- type ICommandsEnvironmentManager
- func (manager *ICommandsEnvironmentManager) FixAuthConfiguration()
- func (manager *ICommandsEnvironmentManager) FromIRODSAccount(account *types.IRODSAccount)
- func (manager *ICommandsEnvironmentManager) GetSessionConfig() (*Config, error)
- func (manager *ICommandsEnvironmentManager) Load() error
- func (manager *ICommandsEnvironmentManager) SaveEnvironment() error
- func (manager *ICommandsEnvironmentManager) SaveSession() error
- func (manager *ICommandsEnvironmentManager) SetEnvironmentDirPath(envDirPath string) error
- func (manager *ICommandsEnvironmentManager) SetEnvironmentFilePath(envFilePath string) error
- func (manager *ICommandsEnvironmentManager) SetPPID(ppid int)
- func (manager *ICommandsEnvironmentManager) ToIRODSAccount() (*types.IRODSAccount, error)
- type PasswordObfuscator
- func (obf *PasswordObfuscator) Decode(encodedPassword []byte) []byte
- func (obf *PasswordObfuscator) DecodeFile(path string) ([]byte, error)
- func (obf *PasswordObfuscator) Encode(password []byte) []byte
- func (obf *PasswordObfuscator) EncodeToFile(path string, password []byte) error
- func (obf *PasswordObfuscator) SetUID(uid int)
Constants ¶
const ( AuthenticationSchemeDefault string = string(types.AuthSchemeNative) ClientServerNegotiationDefault string = string(types.CSNegotiationOff) ClientServerPolicyDefault string = string(types.CSNegotiationPolicyRequestTCP) PortDefault int = 1247 HashSchemeDefault string = types.HashSchemeDefault EncryptionAlgorithmDefault string = "AES-256-CBC" EncryptionKeySizeDefault int = 32 EncryptionSaltSizeDefault int = 8 EncryptionNumHashRoundsDefault int = 16 SSLVerifyServerDefault string = "hostname" )
configuration default values
Variables ¶
This section is empty.
Functions ¶
func GetDefaultEnvironmentDirPath ¶
func GetDefaultEnvironmentDirPath() string
GetDefaultEnvironmentDirPath returns default environment dir path
func GetDefaultEnvironmentFilePath ¶
func GetDefaultEnvironmentFilePath() string
GetDefaultEnvironmentFilePath returns default environment file path
func GetDefaultIRODSConfigPath ¶
func GetDefaultIRODSConfigPath() string
GetDefaultIRODSConfigPath returns default config path
func GetDefaultPasswordFilePath ¶
func GetDefaultPasswordFilePath() string
GetDefaultPasswordFilePath returns default password file path
Types ¶
type Config ¶
type Config struct { AuthenticationScheme string `` /* 129-byte string literal not displayed */ AuthenticationFile string `json:"irods_authentication_file,omitempty" yaml:"irods_authentication_file,omitempty" envconfig:"IRODS_AUTHENTICATION_FILE"` ClientServerNegotiation string `` /* 141-byte string literal not displayed */ ClientServerPolicy string `` /* 126-byte string literal not displayed */ Host string `json:"irods_host,omitempty" yaml:"irods_host,omitempty" envconfig:"IRODS_HOST"` Port int `json:"irods_port,omitempty" yaml:"irods_port,omitempty" envconfig:"IRODS_PORT"` ZoneName string `json:"irods_zone_name,omitempty" yaml:"irods_zone_name,omitempty" envconfig:"IRODS_ZONE_NAME"` ClientZoneName string `json:"irods_client_zone_name,omitempty" yaml:"irods_client_zone_name,omitempty" envconfig:"IRODS_CLIENT_ZONE_NAME"` Username string `json:"irods_user_name,omitempty" yaml:"irods_user_name,omitempty" envconfig:"IRODS_USER_NAME"` ClientUsername string `json:"irods_client_user_name,omitempty" yaml:"irods_client_user_name,omitempty" envconfig:"IRODS_CLIENT_USER_NAME"` DefaultResource string `json:"irods_default_resource,omitempty" yaml:"irods_default_resource,omitempty" envconfig:"IRODS_DEFAULT_RESOURCE"` CurrentWorkingDir string `json:"irods_cwd,omitempty" yaml:"irods_cwd,omitempty" envconfig:"IRODS_CWD"` Home string `json:"irods_home,omitempty" yaml:"irods_home,omitempty" envconfig:"IRODS_HOME"` DefaultHashScheme string `json:"irods_default_hash_scheme,omitempty" yaml:"irods_default_hash_scheme,omitempty" envconfig:"IRODS_DEFAULT_HASH_SCHEME"` MatchHashPolicy string `json:"irods_match_hash_policy,omitempty" yaml:"irods_match_hash_policy,omitempty" envconfig:"IRODS_MATCH_HASH_POLICY"` Debug bool `json:"irods_debug,omitempty" yaml:"irods_debug,omitempty" envconfig:"IRODS_DEBUG"` LogLevel int `json:"irods_log_level,omitempty" yaml:"irods_log_level,omitempty" envconfig:"IRODS_LOG_LEVEL"` EncryptionAlgorithm string `` /* 126-byte string literal not displayed */ EncryptionKeySize int `json:"irods_encryption_key_size,omitempty" yaml:"irods_encryption_key_size,omitempty" envconfig:"IRODS_ENCRYPTION_KEY_SIZE"` EncryptionSaltSize int `` /* 126-byte string literal not displayed */ EncryptionNumHashRounds int `` /* 144-byte string literal not displayed */ SSLCACertificateFile string `` /* 135-byte string literal not displayed */ SSLCACertificatePath string `` /* 135-byte string literal not displayed */ SSLVerifyServer string `json:"irods_ssl_verify_server,omitempty" yaml:"irods_ssl_verify_server,omitempty" envconfig:"IRODS_SSL_VERIFY_SERVER"` SSLCertificateChainFile string `` /* 144-byte string literal not displayed */ SSLCertificateKeyFile string `` /* 138-byte string literal not displayed */ SSLDHParamsFile string `json:"irods_ssl_dh_params_file,omitempty" yaml:"irods_ssl_dh_params_file,omitempty" envconfig:"IRODS_SSL_DH_PARAMS_FILE"` // go-irodsclient only Password string `json:"irods_user_password,omitempty" yaml:"irods_user_password,omitempty" envconfig:"IRODS_USER_PASSWORD"` Ticket string `json:"irods_ticket,omitempty" yaml:"irods_ticket,omitempty" envconfig:"IRODS_TICKET"` PAMToken string `json:"irods_pam_token,omitempty" yaml:"irods_pam_token,omitempty" envconfig:"IRODS_PAM_TOKEN"` PAMTTL int `json:"irods_pam_ttl,omitempty" yaml:"irods_pam_ttl,omitempty" envconfig:"IRODS_PAM_TTL"` SSLServerName string `json:"irods_ssl_server_name,omitempty" yaml:"irods_ssl_server_name,omitempty" envconfig:"IRODS_SSL_SERVER_NAME"` // not used GSIServerDN string `json:"irods_gsi_server_dn,omitempty" yaml:"irods_gsi_server_dn,omitempty" envconfig:"IRODS_GSI_SERVER_DN"` }
Config stores irods config
func NewConfigFromEnv ¶
NewConfigFromEnv creates Config from Environmental variables
func NewConfigFromFile ¶ added in v0.15.4
NewConfigFromFile creates Config from file
func NewConfigFromJSON ¶
NewConfigFromJSON creates Config from JSON
func NewConfigFromJSONFile ¶
NewConfigFromJSONFile creates Config from JSON
func NewConfigFromYAML ¶ added in v0.15.4
NewConfigFromYAML creates Config from YAML
func NewConfigFromYAMLFile ¶ added in v0.15.3
NewConfigFromYAMLFile creates Config from YAML
func (*Config) ClearICommandsIncompatibleFields ¶
ClearICommandsIncompatibleFields clears all icommands-incompatible fields
func (*Config) FixAuthConfiguration ¶ added in v0.15.3
func (cfg *Config) FixAuthConfiguration()
FixAuthConfiguration fixes auth configuration
func (*Config) ToIRODSAccount ¶
func (cfg *Config) ToIRODSAccount() *types.IRODSAccount
ToIRODSAccount creates IRODSAccount
type ICommandsEnvironmentManager ¶
type ICommandsEnvironmentManager struct { EnvironmentDirPath string EnvironmentFilePath string SessionFilePath string PasswordFilePath string UID int PPID int Environment *Config Session *Config }
ICommandsEnvironmentManager is a struct that manages icommands environment files
func NewICommandsEnvironmentManager ¶
func NewICommandsEnvironmentManager() (*ICommandsEnvironmentManager, error)
NewICommandsEnvironmentManager creates ICommandsEnvironmentManager
func (*ICommandsEnvironmentManager) FixAuthConfiguration ¶ added in v0.15.3
func (manager *ICommandsEnvironmentManager) FixAuthConfiguration()
FixAuthConfiguration fixes auth configuration
func (*ICommandsEnvironmentManager) FromIRODSAccount ¶
func (manager *ICommandsEnvironmentManager) FromIRODSAccount(account *types.IRODSAccount)
FromIRODSAccount loads from IRODSAccount
func (*ICommandsEnvironmentManager) GetSessionConfig ¶
func (manager *ICommandsEnvironmentManager) GetSessionConfig() (*Config, error)
GetSessionConfig returns session config that is merged with environment
func (*ICommandsEnvironmentManager) Load ¶
func (manager *ICommandsEnvironmentManager) Load() error
Load loads from environment file
func (*ICommandsEnvironmentManager) SaveEnvironment ¶
func (manager *ICommandsEnvironmentManager) SaveEnvironment() error
SaveEnvironment saves environment
func (*ICommandsEnvironmentManager) SaveSession ¶
func (manager *ICommandsEnvironmentManager) SaveSession() error
SaveSession saves session to a dir
func (*ICommandsEnvironmentManager) SetEnvironmentDirPath ¶
func (manager *ICommandsEnvironmentManager) SetEnvironmentDirPath(envDirPath string) error
SetEnvironmentDirPath sets environment dir path
func (*ICommandsEnvironmentManager) SetEnvironmentFilePath ¶
func (manager *ICommandsEnvironmentManager) SetEnvironmentFilePath(envFilePath string) error
SetEnvironmentFilePath sets environment file path
func (*ICommandsEnvironmentManager) SetPPID ¶
func (manager *ICommandsEnvironmentManager) SetPPID(ppid int)
SetPPID sets ppid of environment, used to obfuscate password
func (*ICommandsEnvironmentManager) ToIRODSAccount ¶
func (manager *ICommandsEnvironmentManager) ToIRODSAccount() (*types.IRODSAccount, error)
ToIRODSAccount exports to IRODSAccount
type PasswordObfuscator ¶
type PasswordObfuscator struct {
UID int
}
PasswordObfuscator obfuscate icommands password
func NewPasswordObfuscator ¶
func NewPasswordObfuscator() *PasswordObfuscator
NewPasswordObfuscator creates a new PasswordObfuscator
func (*PasswordObfuscator) Decode ¶
func (obf *PasswordObfuscator) Decode(encodedPassword []byte) []byte
Decode decodes password
func (*PasswordObfuscator) DecodeFile ¶
func (obf *PasswordObfuscator) DecodeFile(path string) ([]byte, error)
DecodeFile decodes password string in a file
func (*PasswordObfuscator) Encode ¶
func (obf *PasswordObfuscator) Encode(password []byte) []byte
Encode encodes password
func (*PasswordObfuscator) EncodeToFile ¶
func (obf *PasswordObfuscator) EncodeToFile(path string, password []byte) error
EncodeToFile encodes password string and stores it in a file
func (*PasswordObfuscator) SetUID ¶
func (obf *PasswordObfuscator) SetUID(uid int)
SetUID sets UID for seeding