Documentation
¶
Index ¶
- func GetDefaultLogPath() string
- func GetReleaseVersion() string
- func GetVersionJSON() (string, error)
- func SetLog(logDir string)
- type Config
- func (config *Config) GetHomeDirPath() string
- func (config *Config) GetSharedDirName() string
- func (config *Config) HasSFTPGoAPI() bool
- func (config *Config) HasSharedDir() bool
- func (config *Config) IsAnonymousUser() bool
- func (config *Config) IsProxyAuth() bool
- func (config *Config) IsPublicKeyAuth() bool
- func (config *Config) Validate() error
- func (config *Config) ValidateForPublicKeyAuth() error
- type VersionInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDefaultLogPath ¶
func GetDefaultLogPath() string
func GetReleaseVersion ¶
func GetReleaseVersion() string
GetReleaseVersion returns release version in string
func GetVersionJSON ¶
GetVersionJSON returns VersionInfo object in JSON string
Types ¶
type Config ¶
type Config struct {
// for public key auth
IRODSProxyUsername string `envconfig:"IRODS_PROXY_USER"`
IRODSProxyPassword string `envconfig:"IRODS_PROXY_PASSWORD"`
// for iRODS auth
IRODSHost string `envconfig:"IRODS_HOST"`
IRODSPort int `envconfig:"IRODS_PORT"`
IRODSZone string `envconfig:"IRODS_ZONE"`
// IRODSAuthScheme should be one of ['native','pam','pam_for_users']
IRODSAuthScheme string `envconfig:"IRODS_AUTH_SCHEME"`
IRODSRequireCSNegotiation bool `envconfig:"IRODS_REQUIRE_CS_NEGOTIATION"`
// IRODSCSNegotiationPolicy should be one of ['CS_NEG_REFUSE','CS_NEG_REQUIRE','CS_NEG_DONT_CARE']
IRODSCSNegotiationPolicy string `envconfig:"IRODS_CS_NEGOTIATION_POLICY"`
// for SSL/PAM auth
IRODSSSLCACertificatePath string `envconfig:"IRODS_SSL_CA_CERT_PATH"`
IRODSSSLAlgorithm string `envconfig:"IRODS_SSL_ALGORITHM"`
IRODSSSLKeySize int `envconfig:"IRODS_SSL_KEY_SIZE"`
IRODSSSLSaltSize int `envconfig:"IRODS_SSL_SALT_SIZE"`
IRODSSSLHashRounds int `envconfig:"IRODS_SSL_HASH_ROUNDS"`
// for fs mount
SFTPGoHomeDir string `envconfig:"SFTPGO_HOME_PATH"`
// SFTP args
SFTPGoAuthdUsername string `envconfig:"SFTPGO_AUTHD_USERNAME"`
SFTPGoAuthdPassword string `envconfig:"SFTPGO_AUTHD_PASSWORD"`
SFTPGoAuthdPublickey string `envconfig:"SFTPGO_AUTHD_PUBLIC_KEY"`
SFTPGoAuthdIP string `envconfig:"SFTPGO_AUTHD_IP"`
// for Logging
SFTPGoLogDir string `envconfig:"SFTPGO_LOG_DIR"`
// for SFTPGo REST API (folder management)
SFTPGoAPIBaseURL string `envconfig:"SFTPGO_API_BASE_URL"`
SFTPGoAPIKey string `envconfig:"SFTPGO_API_KEY"`
}
Config is a configuration struct
func ReadFromEnv ¶
func (*Config) GetHomeDirPath ¶ added in v0.1.7
GetSharedDirName returns shared dir's name
func (*Config) GetSharedDirName ¶
GetSharedDirName returns shared dir's name
func (*Config) HasSFTPGoAPI ¶ added in v0.2.0
HasSFTPGoAPI checks if SFTPGo REST API is configured
func (*Config) HasSharedDir ¶
HasSharedDir checks if shared dir is provided
func (*Config) IsAnonymousUser ¶
IsAnonymousUser checks if the user is anonymous
func (*Config) IsProxyAuth ¶ added in v0.1.10
IsProxyAuth checks if it uses proxy auth
func (*Config) IsPublicKeyAuth ¶
IsPublicKeyAuth checks if the auth mode is public key auth
func (*Config) ValidateForPublicKeyAuth ¶
ValidateForPublicKeyAuth validates field values and returns error if occurs
type VersionInfo ¶
type VersionInfo struct {
ReleaseVersion string `json:"releaseVersion"`
GitCommit string `json:"gitCommit"`
BuildDate string `json:"buildDate"`
GoVersion string `json:"goVersion"`
Compiler string `json:"compiler"`
Platform string `json:"platform"`
}
VersionInfo object contains version related info
Click to show internal directories.
Click to hide internal directories.