types

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 License: BSD-3-Clause Imports: 6 Imported by: 23

Documentation

Index

Constants

View Source
const (
	PamTTLDefault int = 1
)

Variables

This section is empty.

Functions

func GetFileOpenFlagSeekToEnd

func GetFileOpenFlagSeekToEnd(mode FileOpenMode) (int, bool)

GetFileOpenFlagSeekToEnd ...

func IsFileNotFoundError

func IsFileNotFoundError(err error) bool

IsFileNotFoundError evaluates if the given error is FileNotFoundError

func IsFileOpenFlagOpeningExisting

func IsFileOpenFlagOpeningExisting(mode FileOpenMode) bool

IsFileOpenFlagOpeningExisting ...

func IsFileOpenFlagRead

func IsFileOpenFlagRead(mode FileOpenMode) bool

IsFileOpenFlagRead ...

func IsFileOpenFlagWrite

func IsFileOpenFlagWrite(mode FileOpenMode) bool

IsFileOpenFlagWrite ...

Types

type AuthScheme

type AuthScheme string

AuthScheme defines Authentication Scheme

const (
	// AuthSchemeNative uses Native authentication scheme
	AuthSchemeNative AuthScheme = "native"
	// AuthSchemeGSI uses GSI authentication scheme
	AuthSchemeGSI AuthScheme = "gsi"
	// AuthSchemePAM uses PAM authentication scheme
	AuthSchemePAM AuthScheme = "pam"
)

func GetAuthScheme

func GetAuthScheme(authScheme string) (AuthScheme, error)

GetAuthScheme returns AuthScheme value from string

type CSNegotiationPolicy

type CSNegotiationPolicy string

CSNegotiationPolicy defines Negotiation result

const (
	// CSNegotiationFailure presents negotiation is failed
	CSNegotiationFailure CSNegotiationPolicy = "CS_NEG_FAILURE"
	// CSNegotiationUseTCP uses Plain TCP connection
	CSNegotiationUseTCP CSNegotiationPolicy = "CS_NEG_USE_TCP"
	// CSNegotiationUseSSL uses SSL connection
	CSNegotiationUseSSL CSNegotiationPolicy = "CS_NEG_USE_SSL"
)

func GetCSNegotiationPolicy

func GetCSNegotiationPolicy(policy string) (CSNegotiationPolicy, error)

GetCSNegotiationPolicy returns CSNegotiationPolicy value from string

func PerformCSNegotiation

func PerformCSNegotiation(clientRequest CSNegotiationRequire, serverRequest CSNegotiationRequire) (CSNegotiationPolicy, int)

PerformCSNegotiation performs CSNegotiation and returns the policy determined

type CSNegotiationRequire

type CSNegotiationRequire string

CSNegotiationRequire defines Negotiation request

const (
	// CSNegotiationRequireTCP requires Plain TCP connection
	CSNegotiationRequireTCP CSNegotiationRequire = "CS_NEG_REFUSE"
	// CSNegotiationRequireSSL requires SSL connection
	CSNegotiationRequireSSL CSNegotiationRequire = "CS_NEG_REQUIRE"
	// CSNegotiationDontCare requires any of TCP or SSL connection
	CSNegotiationDontCare CSNegotiationRequire = "CS_NEG_DONT_CARE"
)

func GetCSNegotiationRequire

func GetCSNegotiationRequire(require string) (CSNegotiationRequire, error)

GetCSNegotiationRequire returns CSNegotiationRequire value from string

type ColumnType

type ColumnType string
const (
	ColumnTypeInteger  ColumnType = "Integer"
	ColumnTypeString   ColumnType = "String"
	ColumnTypeDateTime ColumnType = "DateTime"
)

type FileNotFoundError

type FileNotFoundError struct {
	// contains filtered or unexported fields
}

FileNotFoundError ...

func NewFileNotFoundError

func NewFileNotFoundError(message string) *FileNotFoundError

NewFileNotFoundError creates FileNotFoundError struct

func NewFileNotFoundErrorf

func NewFileNotFoundErrorf(format string, v ...interface{}) *FileNotFoundError

NewFileNotFoundErrorf creates FileNotFoundError struct

func (*FileNotFoundError) Error

func (e *FileNotFoundError) Error() string

type FileOpenFlag

type FileOpenFlag int
const (
	O_RDONLY FileOpenFlag = 0
	O_WRONLY FileOpenFlag = 1
	O_RDWR   FileOpenFlag = 2
	O_APPEND FileOpenFlag = 1024
	O_CREAT  FileOpenFlag = 64
	O_EXCL   FileOpenFlag = 128
	O_TRUNC  FileOpenFlag = 512
)

type FileOpenMode

type FileOpenMode string
const (
	FileOpenModeReadOnly      FileOpenMode = "r"
	FileOpenModeReadWrite     FileOpenMode = "r+"
	FileOpenModeWriteOnly     FileOpenMode = "w"
	FileOpenModeWriteTruncate FileOpenMode = "w+"
	FileOpenModeAppend        FileOpenMode = "a"
	FileOpenModeReadAppend    FileOpenMode = "a+"
)

type IRODSAccess

type IRODSAccess struct {
	Path        string
	UserName    string
	UserZone    string
	UserType    IRODSUserType
	AccessLevel IRODSAccessLevelType
}

IRODSAccess contains irods access information

func (*IRODSAccess) ToString

func (access *IRODSAccess) ToString() string

ToString stringifies the object

type IRODSAccessLevelType added in v0.3.0

type IRODSAccessLevelType string
const (
	IRODSAccessLevelOwner IRODSAccessLevelType = "own"
	IRODSAccessLevelWrite IRODSAccessLevelType = "modify object"
	IRODSAccessLevelRead  IRODSAccessLevelType = "read object"
	IRODSAccessLevelNone  IRODSAccessLevelType = ""
)

type IRODSAccount

type IRODSAccount struct {
	AuthenticationScheme    AuthScheme
	ClientServerNegotiation bool
	CSNegotiationPolicy     CSNegotiationRequire
	Host                    string
	Port                    int
	ClientUser              string
	ClientZone              string
	ProxyUser               string
	ProxyZone               string
	ServerDN                string
	Password                string
	PamTTL                  int
	SSLConfiguration        *IRODSSSLConfig
}

IRODSAccount contains irods login information

func CreateIRODSAccount

func CreateIRODSAccount(host string, port int, user string, zone string,
	authScheme AuthScheme, password string,
	serverDN string) (*IRODSAccount, error)

CreateIRODSAccount creates IRODSAccount

func CreateIRODSAccountFromYAML

func CreateIRODSAccountFromYAML(yamlBytes []byte) (*IRODSAccount, error)

CreateIRODSAccountFromYAML creates IRODSAccount from YAML

func CreateIRODSProxyAccount

func CreateIRODSProxyAccount(host string, port int, clientUser string, clientZone string,
	proxyUser string, proxyZone string,
	authScheme AuthScheme, password string) (*IRODSAccount, error)

CreateIRODSProxyAccount creates IRODSAccount for proxy access

func (*IRODSAccount) MaskSensitiveData

func (account *IRODSAccount) MaskSensitiveData() *IRODSAccount

MaskSensitiveData returns IRODSAccount object with sensitive data masked

func (*IRODSAccount) SetSSLConfiguration

func (account *IRODSAccount) SetSSLConfiguration(sslConf *IRODSSSLConfig)

SetSSLConfiguration sets SSL Configuration

func (*IRODSAccount) UseProxyAccess

func (account *IRODSAccount) UseProxyAccess() bool

UseProxyAccess returns whether it uses proxy access or not

type IRODSCollection

type IRODSCollection struct {
	ID int64
	// Path has an absolute path to the collection
	Path string
	// Name has only the name part of the path
	Name string
	// Owner has the owner's name
	Owner string
	// CreateTime has creation time
	CreateTime time.Time
	// ModifyTime has last modified time
	ModifyTime time.Time
}

IRODSCollection contains irods collection information

func (*IRODSCollection) ToString

func (coll *IRODSCollection) ToString() string

ToString stringifies the object

type IRODSColumn

type IRODSColumn struct {
	Type    ColumnType
	ICatKey string
	ICatID  int
}

IRODSColumn ..

type IRODSDataObject

type IRODSDataObject struct {
	ID           int64
	CollectionID int64
	// Path has an absolute path to the data object
	Path string
	// Name has only the name part of the path
	Name string
	// Size has the file size
	Size int64
	// Attributes has attributes
	//Attributes string
	// Replicas has replication information
	Replicas []*IRODSReplica
}

IRODSDataObject contains irods data object information

func (*IRODSDataObject) ToString

func (obj *IRODSDataObject) ToString() string

ToString stringifies the object

type IRODSFileHandle

type IRODSFileHandle struct {
	FileDescriptor int
	// Path has an absolute path to the data object
	Path string
}

IRODSFileHandle contains file handle

func (*IRODSFileHandle) ToString

func (handle *IRODSFileHandle) ToString() string

ToString stringifies the object

type IRODSMeta

type IRODSMeta struct {
	AVUID int64 // is ignored on metadata operations (set, add, mod, rm)
	Name  string
	Value string
	Units string
}

IRODSMeta contains irods metadata

func (*IRODSMeta) ToString

func (meta *IRODSMeta) ToString() string

ToString stringifies the object

type IRODSMetaCollection

type IRODSMetaCollection struct {
	Path string
}

IRODSMetaCollection contains irods data object information

func (*IRODSMetaCollection) ToString

func (meta *IRODSMetaCollection) ToString() string

ToString stringifies the object

type IRODSMetaItemType added in v0.2.0

type IRODSMetaItemType string

IRODSMetaItemType describes a type to set metadata on

const (
	IRODSDataObjectMetaItemType IRODSMetaItemType = "-d"
	IRODSCollectionMetaItemType IRODSMetaItemType = "-C"
	IRODSResourceMetaItemType   IRODSMetaItemType = "-R"
	IRODSUserMetaItemType       IRODSMetaItemType = "-u"
)

func GetIRODSMetaItemType added in v0.2.0

func GetIRODSMetaItemType(data interface{}) (IRODSMetaItemType, error)

GetIRODSMetaItemType gets the irods metadata item type from an object.

type IRODSReplica

type IRODSReplica struct {
	Number int64

	// Owner has the owner's name
	Owner string

	// CheckSum has the checksum of the file
	CheckSum     string
	Status       string
	ResourceName string

	// Path has an absolute path to the data object
	Path              string
	ResourceHierarchy string

	// CreateTime has creation time
	CreateTime time.Time
	// ModifyTime has last modified time
	ModifyTime time.Time
}

IRODSReplica contains irods data object replication information

func (*IRODSReplica) ToString

func (obj *IRODSReplica) ToString() string

ToString stringifies the object

type IRODSResource added in v0.4.0

type IRODSResource struct {
	RescID   int64
	Name     string
	Zone     string
	Type     string
	Class    string
	Location string

	// Path has the path string of the resource
	Path string

	// Context has the context string
	Context string

	// CreateTime has creation time
	CreateTime time.Time
	// ModifyTime has last modified time
	ModifyTime time.Time
}

IRODSResource describes a resource host

func (*IRODSResource) ToString added in v0.4.0

func (res *IRODSResource) ToString() string

ToString stringifies the object

type IRODSSSLConfig

type IRODSSSLConfig struct {
	CACertificateFile   string
	EncryptionKeySize   int
	EncryptionAlgorithm string
	SaltSize            int
	HashRounds          int
}

IRODSSSLConfig contains irods ssl configuration

func CreateIRODSSSLConfig

func CreateIRODSSSLConfig(caCertFile string, keySize int, algorithm string, saltSize int,
	hashRounds int) (*IRODSSSLConfig, error)

CreateIRODSSSLConfig creates IRODSSSLConfig

func (*IRODSSSLConfig) ReadCACert

func (config *IRODSSSLConfig) ReadCACert() ([]byte, error)

ReadCACert returns CA Cert data

type IRODSUser

type IRODSUser struct {
	ID   int64
	Name string
	Zone string
	Type IRODSUserType
}

IRODSUser contains irods user information

func (*IRODSUser) ToString

func (user *IRODSUser) ToString() string

ToString stringifies the object

type IRODSUserType added in v0.3.0

type IRODSUserType string
const (
	IRODSUserRodsGroup  IRODSUserType = "rodsgroup"
	IRODSUserRodsUser   IRODSUserType = "rodsuser"
	IRODSUserRodsAdmin  IRODSUserType = "rodsadmin"
	IRODSUserGroupAdmin IRODSUserType = "groupadmin"
)

type IRODSVersion

type IRODSVersion struct {
	ReleaseVersion string
	APIVersion     string
	ReconnectPort  int
	ReconnectAddr  string
	Cookie         int
}

IRODSVersion contains irods version information

type IRODSZone

type IRODSZone struct {
	ID   string
	Name string
	Type string
}

IRODSZone contains irods zone information

func (*IRODSZone) ToString

func (zone *IRODSZone) ToString() string

ToString stringifies the object

type Whence

type Whence int

Whence ...

const (
	SeekSet Whence = 0
	SeekCur Whence = 1
	SeekEnd Whence = 2
)

Jump to

Keyboard shortcuts

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