codemeta

package
v1.0.4-dev Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2021 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Codemeta

type Codemeta struct {
	// Terms used by Caltech Library codemeta.json
	// Id should be the DOI if available
	Context           string                  `json:"@context"`
	Type              string                  `json:"@type"`
	Name              string                  `json:"name"`
	Description       string                  `json:"description"`
	CodeRepository    string                  `json:"codeRepository"`
	IssueTracker      string                  `json:"issueTracker"`
	License           string                  `json:"license"`
	Version           string                  `json:"version"`
	Author            []*PersonOrOrganization `json:"author"`
	Contributor       []*PersonOrOrganization `json:"contributor,omitempty"`
	Editor            []*PersonOrOrganization `json:"editor,omitempty"`
	DevelopmentStatus string                  `json:"developmentStatus"`
	DownloadURL       string                  `json:"downloadUrl"`
	Keywords          []string                `json:"keywords"`
	Maintainer        string                  `json:"maintainer,omitempty"`
	Funder            []*PersonOrOrganization `json:"funder,omitempty"`
	CopyrightHolder   []*PersonOrOrganization `json:"copyrightHolder,omitempty"`
	CopyrightYear     string                  `json:"copyrightYear,omitempty"`
	Created           string                  `json:"dateCreated,omitempty"`
	Updated           string                  `json:"dateModified,omitempty"`
	Published         string                  `json:"datePublished,omitempty"`
	Identifier        string                  `json:"identifier,omitempty"` //FIXME: Is this where I can put the DOI

}

func (*Codemeta) ToCff

func (cm *Codemeta) ToCff() ([]byte, error)

ToCff crosswalks a Codemeta data structure rendering CITATION.cff document as an array of byte. Based on documentation at https://citation-file-format.github.io/

func (*Codemeta) ToJSON

func (cm *Codemeta) ToJSON() ([]byte, error)

type PersonOrOrganization

type PersonOrOrganization struct {
	// ORCID is use for person id
	Id   string `json:"@id"`
	Type string `json:"@type"`
	// Name is used by organizations
	Name string `json:"name,omitempty"`
	// Given/Family are used by individual persons
	GivenName   string `json:"givenName,omitempty"`
	FamilyName  string `json:"familyName,omitempty"`
	Affiliation string `json:"affiliation"`
	Email       string `json:"email"`
}

func (*PersonOrOrganization) ToCFF

func (person *PersonOrOrganization) ToCFF() ([]byte, error)

func (*PersonOrOrganization) ToJSON

func (person *PersonOrOrganization) ToJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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