Documentation ¶
Index ¶
- type Contributor
- type Contributors
- type DataUseAgreement
- type Dataset
- type DatasetContributor
- type DatasetRelease
- type DatasetReleaseDTO
- type DatasetStatus
- type DatasetStorage
- type DatasetTeam
- type DatasetUser
- type DbPermission
- type ErrFileNotFound
- type ErrMultipleRowsAffected
- type FeatureFlags
- type File
- type FileParams
- type Organization
- type OrganizationStorage
- type OrganizationUser
- type Package
- type PackageMap
- type PackageParams
- type PackageStorage
- type Properties
- type Tags
- type Token
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Contributor ¶ added in v1.4.0
type Contributor struct { Id int64 `json:"id"` FirstName string `json:"first_name"` LastName string `json:"last_name"` Email string `json:"email"` Orcid sql.NullString `json:"orcid"` UserId sql.NullInt64 `json:"user_id"` UpdatedAt time.Time `json:"updated_at"` CreatedAt time.Time `json:"created_at"` MiddleInitial sql.NullString `json:"middle_initial"` Degree sql.NullString `json:"degree"` }
type Contributors ¶
type Contributors []string
func (*Contributors) Scan ¶
func (c *Contributors) Scan(src any) error
type DataUseAgreement ¶ added in v1.4.0
type Dataset ¶
type Dataset struct { Id int64 `json:"id"` Name string `json:"name"` State string `json:"state"` Description sql.NullString `json:"description"` UpdatedAt time.Time `json:"updated_at"` CreatedAt time.Time `json:"created_at"` NodeId sql.NullString `json:"node_id"` PermissionBit sql.NullInt32 `json:"permission_bit"` Type string `json:"type"` Role sql.NullString `json:"role"` Status string `json:"status"` AutomaticallyProcessPackages bool `json:"automatically_process_packages"` License sql.NullString `json:"license"` Tags Tags `json:"tags"` Contributors Contributors `json:"contributors"` BannerId uuid.UUID `json:"banner_id"` ReadmeId uuid.UUID `json:"readme_id"` StatusId int32 `json:"status_id"` PublicationStatusId sql.NullInt32 `json:"publication_status_id"` Size sql.NullInt64 `json:"size"` ETag time.Time `json:"etag"` DataUseAgreementId sql.NullInt32 `json:"data_use_agreement_id"` ChangelogId uuid.NullUUID `json:"changelog_id"` }
type DatasetContributor ¶ added in v1.4.0
type DatasetRelease ¶ added in v1.9.0
type DatasetRelease struct { Id int64 `json:"id"` DatasetId int64 `json:"dataset_id"` Origin string `json:"origin"` Url string `json:"url"` Label sql.NullString `json:"label"` Marker sql.NullString `json:"marker"` Properties Properties `json:"properties"` Tags Tags `json:"tags"` ReleaseDate sql.NullTime `json:"release_date"` ReleaseStatus string `json:"release_status"` PublishingStatus string `json:"publishing_status"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type DatasetReleaseDTO ¶ added in v1.9.0
type DatasetReleaseDTO struct { Dataset Dataset `json:"dataset"` Release DatasetRelease `json:"release"` }
type DatasetStatus ¶ added in v1.4.0
type DatasetStorage ¶
type DatasetTeam ¶
type DatasetUser ¶
type DbPermission ¶
type DbPermission int64
const ( NoPermission DbPermission = 0 Guest DbPermission = 1 Read DbPermission = 2 Write DbPermission = 4 Delete DbPermission = 8 Administer DbPermission = 16 Owner DbPermission = 32 )
func FromRole ¶ added in v1.10.0
func FromRole(role string) DbPermission
func (DbPermission) AsRoleString ¶ added in v1.10.0
func (s DbPermission) AsRoleString() string
func (DbPermission) ImpliesRole ¶ added in v1.12.0
func (s DbPermission) ImpliesRole(requiredRole role.Role) bool
ImpliesRole returns true if this DbPermission implies the given requiredRole and false otherwise That is, if a user has this DbPermission and an action requires requiredRole, then the user is authorized to perform the action if this method returns true
func (DbPermission) String ¶
func (s DbPermission) String() string
func (DbPermission) ToRole ¶ added in v1.12.0
func (s DbPermission) ToRole() role.Role
type ErrFileNotFound ¶
type ErrFileNotFound struct{}
func (*ErrFileNotFound) Error ¶
func (m *ErrFileNotFound) Error() string
type ErrMultipleRowsAffected ¶
type ErrMultipleRowsAffected struct{}
func (*ErrMultipleRowsAffected) Error ¶
func (m *ErrMultipleRowsAffected) Error() string
type FeatureFlags ¶
type File ¶
type File struct { Id string `json:"id"` PackageId int `json:"package_id"` Name string `json:"name"` FileType fileType.Type `json:"file_type"` S3Bucket string `json:"s3_bucket"` S3Key string `json:"s3_key"` ObjectType objectType.ObjectType `json:"object_type"` Size int64 `json:"size"` CheckSum string `json:"checksum"` UUID uuid.UUID `json:"uuid"` ProcessingState processingState.ProcessingState `json:"processing_state"` UploadedState uploadState.UploadedState `json:"uploaded_state"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type FileParams ¶
type FileParams struct { PackageId int `json:"package_id"` Name string `json:"name"` FileType fileType.Type `json:"file_type"` S3Bucket string `json:"s3_bucket"` S3Key string `json:"s3_key"` ObjectType objectType.ObjectType `json:"object_type"` Size int64 `json:"size"` CheckSum string `json:"checksum"` Sha256 string `json:"sha256"` UUID uuid.UUID `json:"uuid"` }
type Organization ¶
type Organization struct { Id int64 `json:"id"` Name string `json:"name"` Slug string `json:"slug"` NodeId string `json:"node_id"` StorageBucket sql.NullString `json:"storage_bucket"` PublishBucket sql.NullString `json:"publish_bucket"` EmbargoBucket sql.NullString `json:"embargo_bucket"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type OrganizationStorage ¶
type OrganizationUser ¶
type Package ¶
type Package struct { Id int64 `json:"id"` Name string `json:"name"` PackageType packageType.Type `json:"type"` PackageState packageState.State `json:"state"` NodeId string `json:"node_id"` ParentId sql.NullInt64 `json:"parent_id"` DatasetId int `json:"dataset_id"` OwnerId int `json:"owner_id"` Size sql.NullInt64 `json:"size"` ImportId sql.NullString `json:"import_id"` Attributes packageInfo.PackageAttributes `json:"attributes"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
Package is a representation of a container on Pennsieve that contains one or more sourceFiles
type PackageParams ¶
type PackageParams struct { Name string `json:"name"` PackageType packageType.Type `json:"type"` PackageState packageState.State `json:"state"` NodeId string `json:"node_id"` ParentId int64 `json:"parent_id"` DatasetId int `json:"dataset_id"` OwnerId int `json:"owner_id"` Size int64 `json:"size"` ImportId sql.NullString `json:"import_id"` Attributes packageInfo.PackageAttributes `json:"attributes"` }
PackageParams is used as the input to create a package ParentID is not an optional and -1 refers to the root folder.
type PackageStorage ¶
type Properties ¶ added in v1.9.0
type Properties map[string]interface{}
type Token ¶
type Token struct { Id int64 `json:"id"` Name string `json:"name"` Token string `json:"token"` OrganizationId string `json:"organization_id"` UserId bool `json:"user_id"` CognitoId string `json:"cognito_id"` LastUsed int64 `json:"last_used"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
Click to show internal directories.
Click to hide internal directories.