icommands

package
v0.14.5 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: BSD-3-Clause Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodePasswordFile

func DecodePasswordFile(path string, uid int) (string, error)

DecodePasswordFile decodes password string in an auth file (defaults to .irodsA)

func DecodePasswordString

func DecodePasswordString(encodedPassword string, uid int) string

DecodePasswordString decodes password string in an auth file (defaults to .irodsA)

func EncodePasswordFile

func EncodePasswordFile(path string, s string, uid int) error

EncodePasswordFile encodes password string and stores it in an auth file (defaults to .irodsA)

func EncodePasswordString

func EncodePasswordString(s string, uid int) string

EncodePasswordString encodes password string to be stored in an auth file (defaults to .irodsA)

Types

type ICommandsEnvironment

type ICommandsEnvironment struct {
	AuthenticationFile      string `json:"irods_authentication_file,omitempty"`
	AuthenticationScheme    string `json:"irods_authentication_scheme,omitempty"`
	ClientServerNegotiation string `json:"irods_client_server_negotiation,omitempty"`
	ClientServerPolicy      string `json:"irods_client_server_policy,omitempty"`
	ControlPlanePort        int    `json:"irods_control_plane_port,omitempty"`
	ControlPlaneKey         string `json:"irods_control_plane_key,omitempty"`
	CurrentWorkingDir       string `json:"irods_cwd,omitempty"`
	Debug                   int    `json:"irods_debug,omitempty"`
	DefaultHashScheme       string `json:"irods_default_hash_scheme,omitempty"`
	Host                    string `json:"irods_host,omitempty"`
	Port                    int    `json:"irods_port,omitempty"`
	Username                string `json:"irods_user_name,omitempty"`
	Zone                    string `json:"irods_zone_name,omitempty"`
	DefaultResource         string `json:"irods_default_resource,omitempty"`
	EncryptionAlgorithm     string `json:"irods_encryption_algorithm,omitempty"`
	EncryptionKeySize       int    `json:"irods_encryption_key_size,omitempty"`
	EncryptionNumHashRounds int    `json:"irods_encryption_num_hash_rounds,omitempty"`
	EncryptionSaltSize      int    `json:"irods_encryption_salt_size,omitempty"`
	GSIServerDN             string `json:"irods_gsi_server_dn,omitempty"`
	Home                    string `json:"irods_home,omitempty"`
	LogLevel                int    `json:"irods_log_level,omitempty"`
	MatchHashPolicy         string `json:"irods_match_hash_policy,omitempty"`
	PluginsHome             string `json:"irods_plugins_home,omitempty"`
	SSLCACertificateFile    string `json:"irods_ssl_ca_certificate_file,omitempty"`
	SSLCACertificatePath    string `json:"irods_ssl_ca_certificate_path,omitempty"`
	SSLCertificateChainFile string `json:"irods_ssl_certificate_chain_file,omitempty"`
	SSLCertificateKeyFile   string `json:"irods_ssl_certificate_key_file,omitempty"`
	SSLDHParamsFile         string `json:"irods_ssl_dh_params_file,omitempty"`
	SSLVerifyServer         string `json:"irods_ssl_verify_server,omitempty"`
	XMessageHost            string `json:"irods_xmsg_host,omitempty"`
	XMessagePort            int    `json:"irods_xmsg_port,omitempty"`
}

ICommandsEnvironment stores irods environment data (config file)

func CreateICommandsEnvironmentFromFile

func CreateICommandsEnvironmentFromFile(envPath string) (*ICommandsEnvironment, error)

CreateICommandsEnvironmentFromFile creates ICommandsEnvironment from a file

func CreateICommandsEnvironmentFromJSON

func CreateICommandsEnvironmentFromJSON(jsonBytes []byte) (*ICommandsEnvironment, error)

CreateICommandsEnvironmentFromJSON creates ICommandsEnvironment from JSON

func (*ICommandsEnvironment) ToFile

func (env *ICommandsEnvironment) ToFile(envPath string) error

ToFile saves to a file

func (*ICommandsEnvironment) ToIRODSAccount

func (env *ICommandsEnvironment) ToIRODSAccount() *types.IRODSAccount

ToIRODSAccount creates IRODSAccount

func (*ICommandsEnvironment) ToJSON

func (env *ICommandsEnvironment) ToJSON() ([]byte, error)

ToJSON converts to JSON bytes

type ICommandsEnvironmentManager

type ICommandsEnvironmentManager struct {
	HomeEnvironmentDirPath string
	EnvironmentDirPath     string
	EnvironmentFilename    string
	UID                    int
	Password               string
	PamToken               string
	Environment            *ICommandsEnvironment
	Session                *ICommandsEnvironment
}

ICommandsEnvironmentManager is a struct that manages icommands environment files

func CreateIcommandsEnvironmentManager

func CreateIcommandsEnvironmentManager() (*ICommandsEnvironmentManager, error)

CreateIcommandsEnvironmentManager creates ICommandsEnvironmentManager

func CreateIcommandsEnvironmentManagerFromIRODSAccount

func CreateIcommandsEnvironmentManagerFromIRODSAccount(account *types.IRODSAccount) (*ICommandsEnvironmentManager, error)

CreateIcommandsEnvironmentManagerFromIRODSAccount creates ICommandsEnvironmentManager from IRODSAccount

func (*ICommandsEnvironmentManager) GetEnvironmentFilePath

func (manager *ICommandsEnvironmentManager) GetEnvironmentFilePath() string

GetEnvironmentFilePath returns environment file (irods_environment.json) path

func (*ICommandsEnvironmentManager) GetPasswordFilePath

func (manager *ICommandsEnvironmentManager) GetPasswordFilePath() string

GetPasswordFilePath returns password file (.irodsA) path

func (*ICommandsEnvironmentManager) GetSessionFilePath

func (manager *ICommandsEnvironmentManager) GetSessionFilePath(processID int) string

GetSessionFilePath returns session file (irods_environment.json.<sessionid>) path

func (*ICommandsEnvironmentManager) Load

func (manager *ICommandsEnvironmentManager) Load(processID int) error

Load loads from environment file

func (*ICommandsEnvironmentManager) SaveEnvironment

func (manager *ICommandsEnvironmentManager) SaveEnvironment() error

SaveEnvironment saves environment

func (*ICommandsEnvironmentManager) SaveSession

func (manager *ICommandsEnvironmentManager) SaveSession(processID int) error

SaveSession saves session to a dir

func (*ICommandsEnvironmentManager) SetEnvironmentFilePath

func (manager *ICommandsEnvironmentManager) SetEnvironmentFilePath(envFilePath string) error

func (*ICommandsEnvironmentManager) SetUID

func (manager *ICommandsEnvironmentManager) SetUID(uid int)

func (*ICommandsEnvironmentManager) ToIRODSAccount

func (manager *ICommandsEnvironmentManager) ToIRODSAccount() (*types.IRODSAccount, error)

Jump to

Keyboard shortcuts

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