icommands

package
v0.12.16 Latest Latest
Warning

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

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

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 .irodsA file

func DecodePasswordString

func DecodePasswordString(encodedPassword string, uid int) string

DecodePasswordString decodes password string in .irodsA file

func EncodePasswordFile

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

EncodePasswordFile encodes password string and store in .irodsA file

func EncodePasswordString

func EncodePasswordString(s string, uid int) string

EncodePasswordString encodes password string to be stored in .irodsA file

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 added in v0.9.2

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 added in v0.9.2

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

ICommandsEnvironmentManager is a struct that manages icommands environment files

func CreateIcommandsEnvironmentManager added in v0.9.2

func CreateIcommandsEnvironmentManager() (*ICommandsEnvironmentManager, error)

CreateIcommandsEnvironmentManager creates ICommandsEnvironmentManager

func CreateIcommandsEnvironmentManagerFromIRODSAccount added in v0.9.2

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

CreateIcommandsEnvironmentManagerFromIRODSAccount creates ICommandsEnvironmentManager from IRODSAccount

func (*ICommandsEnvironmentManager) GetEnvironmentFilePath added in v0.10.0

func (manager *ICommandsEnvironmentManager) GetEnvironmentFilePath() string

GetEnvironmentFilePath returns environment file (irods_environment.json) path

func (*ICommandsEnvironmentManager) GetPasswordFilePath added in v0.10.0

func (manager *ICommandsEnvironmentManager) GetPasswordFilePath() string

GetPasswordFilePath returns password file (.irodsA) path

func (*ICommandsEnvironmentManager) GetSessionFilePath added in v0.10.0

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

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

func (*ICommandsEnvironmentManager) Load added in v0.9.2

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

Load loads from environment file

func (*ICommandsEnvironmentManager) SaveEnvironment added in v0.10.0

func (manager *ICommandsEnvironmentManager) SaveEnvironment() error

SaveEnvironment saves environment

func (*ICommandsEnvironmentManager) SaveSession added in v0.9.2

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

SaveSession saves session to a dir

func (*ICommandsEnvironmentManager) SetEnvironmentFilePath added in v0.10.0

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

func (*ICommandsEnvironmentManager) SetUID added in v0.10.0

func (manager *ICommandsEnvironmentManager) SetUID(uid int)

func (*ICommandsEnvironmentManager) ToIRODSAccount added in v0.9.2

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