datacite

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DATACITE_REPOSITORY_ID, DATACITE_PASSWORD string

Functions

func DOIRequest

func DOIRequest(url, payload string) error

func Publish added in v0.6.1

func Publish(did, description string, record any) (string, string, error)

Publish provides publication of did into datacite

Types

type Affiliation

type Affiliation struct {
	AffiliationIdentifier       string `json:"affiliationIdentifier"`
	AffiliationIdentifierScheme string `json:"affiliationIdentifierScheme"`
	Name                        string `json:"name"`
	SchemeUri                   string `json:"schemeUri"`
}

Affiliation represents affiliation

type Attributes

type Attributes struct {
	Doi                  string        `json:"doi"`
	Prefix               string        `json:"prefix"`
	Suffix               string        `json:"suffix"`
	Identifiers          []string      `json:"identifiers"`
	AlternateIdentifiers []string      `json:"alternateIdentifiers"`
	Creators             []Creator     `json:"creators"`
	Titles               []Title       `json:"titles"`
	Publisher            string        `json:"publisher"`
	Container            Container     `json:"container"`
	PublicationYear      int           `json:"publicationYear"`
	Subjects             []string      `json:"subjects"`
	Contributors         []Contributor `json:"contributors"`
	Dates                []Date        `json:"dates"`
	Language             interface{}   `json:"language"`
	Types                Types         `json:"types"`
	RelatedIdentifiers   []string      `json:"relatedIdentifiers"`
	RelatedItems         []string      `json:"relatedItems"`
	Sizes                []string      `json:"sizes"`
	Formats              []string      `json:"formats"`
	Version              interface{}   `json:"version"`
	RightsList           []string      `json:"rightsList"`
	Descriptions         []string      `json:"descriptions"`
	GeoLocations         []string      `json:"geoLocations"`
	FundingReferences    []string      `json:"fundingReferences"`
	XML                  string        `json:"xml"`
	URL                  string        `json:"url"`
	ContentURL           interface{}   `json:"contentUrl"`
	MetadataVersion      int           `json:"metadataVersion"`
	SchemaVersion        interface{}   `json:"schemaVersion"`
	Source               string        `json:"source"`
	IsActive             bool          `json:"isActive"`
	State                string        `json:"state"`
	Reason               interface{}   `json:"reason"`
	LandingPage          interface{}   `json:"landingPage"`
	ViewCount            int           `json:"viewCount"`
	ViewsOverTime        []string      `json:"viewsOverTime"`
	DownloadCount        int           `json:"downloadCount"`
	DownloadsOverTime    []string      `json:"downloadsOverTime"`
	ReferenceCount       int           `json:"referenceCount"`
	CitationCount        int           `json:"citationCount"`
	CitationsOverTime    []string      `json:"citationsOverTime"`
	PartCount            int           `json:"partCount"`
	PartOfCount          int           `json:"partOfCount"`
	VersionCount         int           `json:"versionCount"`
	VersionOfCount       int           `json:"versionOfCount"`
	Created              time.Time     `json:"created"`
	Registered           time.Time     `json:"registered"`
	Published            string        `json:"published"`
	Updated              time.Time     `json:"updated"`

	MetaData any `json:"metaData"`
}

Attributes represent attributes

type Container

type Container struct {
}

Container represents container

type Contributor

type Contributor struct {
	Name        string
	NameType    string
	GivenName   string
	FamilyName  string
	Affiliation []Affiliation
}

Contributor represents contributor

type Creator

type Creator struct {
	Name            string   `json:"name"`
	Affiliation     []string `json:"affiliation"`
	NameIdentifiers []string `json:"nameIdentifiers"`
}

Creator represents creator struct

type Date

type Date struct {
	Date            string `json:"dataType"`
	DataType        string `json:"dataType"`
	DateInformation string `json:"dateInformation"`
}

Date represents date

type RelationData

type RelationData struct {
	Data RelationInfo `json:"data"`
}

RelationData represents relation data

type RelationInfo

type RelationInfo struct {
	ID   string `json:"id"`
	Type string `json:"type"`
}

RelationInfo represents relation info

type Relationships

type Relationships struct {
	Client     RelationData `json:"client"`
	Provider   RelationData `json:"provider"`
	Media      RelationData `json:"media"`
	References RelationData `json:"references"`
	Citations  RelationData `json:"citations"`
	Parts      RelationData `json:"parts"`
	PartOf     RelationData `json:"partOf"`
	Versions   RelationData `json:"versions"`
	VersionOf  RelationData `json:"versionOf"`
}

Relationships represents relationships

type RequestData

type RequestData struct {
	Type            string     `json:"type"`
	Attributes      Attributes `json:"attributes"`
	Titles          []Title    `json:"titles"`
	Publisher       string     `json:"publisher"`
	PublicationYear int        `json:"publicationYear"`
	Types           Types      `json:"types"`
	Url             string     `json:"url"`
}

RequestData represents request payload

type ResposeData

type ResposeData struct {
	ID         string        `json:"id"`
	Type       string        `json:"type"`
	Attributes Attributes    `json:"attributes"`
	Relations  Relationships `json:"relationships"`
}

ResponseData represents response payload

type Title

type Title struct {
	Title string `json:"title"`
}

Title represents title

type Types

type Types struct {
	SchemaOrg           string `json:"schemaOrg"`
	Citeproc            string `json:"citeproc"`
	Bibtex              string `json:"bibtex"`
	RIS                 string `json:"ris"`
	ResourceTypeGeneral string `json:"resourceTypeGeneral"`
}

Types represents types

Jump to

Keyboard shortcuts

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