Documentation ¶
Overview ¶
Package libgin provides functionality shared between the G-Node GIN services. These include: - GIN Web: The G-Node/GOGS fork (https://github.com/G-Node/gogs) - GIN DOI: The DOI registration service (https://github.com/G-Node/gin-doi) - GIN DEX: The indexing service for GIN (https://github.com/G-Node/gin-dex)
Index ¶
- Constants
- func IsRegisteredDOI(doi string) bool
- func MakeZip(dest io.Writer, source ...string) error
- func ReadConf(key string) string
- func ReadConfDefault(key, defval string) string
- func RepoPathToUUID(URI string) string
- type Author
- type BlobSResult
- type CommitSResult
- type DOIRegInfo
- type IndexBlob
- type IndexCommit
- type License
- type NamedIdentifier
- type Reference
- type SearchRequest
- type SearchResults
Constants ¶
const ( SEARCH_MATCH = iota SEARCH_FUZZY SEARCH_WILDCARD SEARCH_QUERRY SEARCH_SUGGEST )
Variables ¶
This section is empty.
Functions ¶
func IsRegisteredDOI ¶
func MakeZip ¶
MakeZip creates a zip archive using the dest io.Writer from the files specified by source. Any directories listed in source are archived recursively. Empty directories are ignored.
func ReadConf ¶
ReadConf returns the value of a configuration env variable and exits with an error if it is not set.
func ReadConfDefault ¶
ReadConfDefault returns the value of a configuration env variable. If the variable is not set, the default is returned.
func RepoPathToUUID ¶
RepoPathToUUID computes a UUID from a repository path.
Types ¶
type Author ¶
func (*Author) GetValidID ¶
func (c *Author) GetValidID() *NamedIdentifier
func (*Author) RenderAuthor ¶
type BlobSResult ¶
type CommitSResult ¶
type CommitSResult struct { Source *IndexCommit `json:"_source"` Score float64 `json:"_score"` Highlight interface{} `json:"highlight"` }
type DOIRegInfo ¶
type DOIRegInfo struct { Missing []string DOI string UUID string FileSize int64 Title string Authors []Author Description string Keywords []string References []Reference Funding []string License *License DType string }
DOIRegInfo holds all the metadata and information necessary for a DOI registration request.
func (*DOIRegInfo) EscXML ¶
func (c *DOIRegInfo) EscXML(txt string) string
func (*DOIRegInfo) GetCitation ¶
func (c *DOIRegInfo) GetCitation() string
func (*DOIRegInfo) GetType ¶
func (c *DOIRegInfo) GetType() string
type IndexCommit ¶
type NamedIdentifier ¶
type SearchRequest ¶
type SearchResults ¶
type SearchResults struct { Blobs []BlobSResult Commits []CommitSResult }