dr

package
v0.0.0-...-ed85594 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindCollectionsByMeta

func FindCollectionsByMeta(config Config, key, value string) (chan *DRCollection, error)

func GetAllCollections

func GetAllCollections(config Config) (chan *DRCollection, error)

func GetAllUsers

func GetAllUsers(config Config) (chan *DRUser, error)

func NewAccount

func NewAccount(config Config) (*types.IRODSAccount, error)

NewAccount returned a configured `types.IRODSAccount` iRODS client that is ready for making iRODS connections.

func NewServiceAccounts

func NewServiceAccounts(config Config) (map[string]*types.IRODSAccount, error)

NewServiceAccounts returned a map of configured `types.IRODSAccount` iRODS clients that is ready for making iRODS connections.

The key of the map is the organizational unit name provided by the `config.OrganizationalUnits`; and the value is the iRODS client initiated with the organizational unit's service account credential.

Types

type CollectionState

type CollectionState int
const (
	UnknownState CollectionState = iota
	Editable
	ReviewableInternal
	ReviewableExternal
	Archived
	Published
)

func NewCollectionState

func NewCollectionState(stat string) CollectionState

func (CollectionState) String

func (c CollectionState) String() string

type CollectionType

type CollectionType int
const (
	UnknownType CollectionType = iota
	DAC
	RDC
	DSC
)

func NewCollectionType

func NewCollectionType(t string) CollectionType

func (CollectionType) String

func (t CollectionType) String() string

type Config

type Config struct {
	IrodsHost           string
	IrodsPort           int
	IrodsZone           string
	IrodsUser           string
	IrodsPass           string
	IrodsAuthScheme     string
	IrodsSslCacert      string
	IrodsSslKeysize     int
	IrodsSslAlgorithm   string
	IrodsSslSaltSize    int
	IrodsHashRounds     int
	OrganisationalUnits []ServiceAccount
}

func (Config) AuthSchemeType

func (c Config) AuthSchemeType() types.AuthScheme

type DRCollection

type DRCollection struct {
	Identifier         string
	IdentifierDOI      string
	ProjectID          string
	Path               string
	Type               CollectionType
	State              CollectionState
	OrganisationalUnit string
	QuotaInBytes       int64
	SizeInBytes        int64
	NumberOfFiles      int64
}

type DRUser

type DRUser struct {
	DisplayName         string
	IdentityProvider    string
	Email               string
	OrganizationalUnits []string
}

type ServiceAccount

type ServiceAccount struct {
	Name      string
	IrodsUser string
	IrodsPass string
}

ServiceAccount defines the configuration data structure for OU-specific service account data-access credential.

Jump to

Keyboard shortcuts

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