package
0.0.0-20230608101232-bf5f9efbcbd8
Repository: https://github.com/g-node/gin-doi.git
Documentation: pkg.go.dev

# Functions

AuthorBlock builds the author section for the landing page template.
AwardNumber splits the award number from a funding string of the form <FunderName>; <AwardNumber>.
EscXML runs a string through xml.EscapeText.
FormatAuthorList returns a string of comma separated authors with leading last names followed by the first name initials.
FormatCitation returns the formatted citation string for a given dataset.
FormatIssuedDate returns the issued date of the dataset in the format DD Mon.
FormatReferences returns the references cited by a dataset.
FunderName splits the funder name from a funding string of the form <FunderName>; <AwardNumber>.
GetGINURL returns the full URL to the configured GIN server.
GINServerURL is the default template function returning the main GIN server URL.
HasGitModules checks whether a repository on the defined GIN server features a '.gitmodules' file and returns the result as boolean.
JoinComma joins a slice of strings into a single string separated by commas (and space).
KeywordPath returns a keyword sanitised for use in a URL path: Lowercase + replace / with _.
MakeZip recursively writes all the files found under the provided sources to the dest io.Writer in ZIP format.
NewVersionNotice returns an HTML template containing links to a newer version of a given dataset if it exists.
OldVersionLink returns an HTML template containing links to a previous version of a given dataset if it exists.
ReadCommonLicenses returns an array of common DOI licenses.
URLexists runs a GET against an URL, returns true if the return code is 200 and false otherwise.

# Constants

ALNUM provides characters for the randAlnum function.
DEFAULTTO is a fallback email address to notify in case of error.
MAILLOG is currently not used in any project and should be considered deprecated.

# Structs

AssetFS embeds a http.FileSystem for serving static assets.
ChecklistTemplate is the full data struct required to properly render the checklist file template.
Configuration is used to store and pass the configuration settings throughout the service.
Dispatcher holds waiting jobs and sends the next job in the queue to the first available worker.
DOILicense holds Name (official license title), URL (license online reference) and Alias names for a license used for a DOI registration.
RegistrationJob holds a reference to the Metadata associated with a job and the service Configuration.
RegistrationRequest holds the encrypted and decrypted data of a registration request, as well as the unmarshalled data of the target repository's datacite.yml metadata.
Worker holds a JobQueue that will accept and handle incoming DOI registration jobs.