api

package
v0.0.0-...-811e01b Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivityUpdate

type ActivityUpdate struct {
	UpdateCode string     `json:"update_code,omitempty"`
	Work       WorkSchema `json:"work,omitempty"`
}

ActivityUpdate -- the activity update request

type HealthCheckResponse

type HealthCheckResponse struct {
	DbCheck          HealthCheckResult `json:"mysql"`
	OrcidPublicCheck HealthCheckResult `json:"orcid_public"`
	OrcidSecureCheck HealthCheckResult `json:"orcid_member"`
}

HealthCheckResponse -- response to the health check query

type HealthCheckResult

type HealthCheckResult struct {
	Healthy bool   `json:"healthy"`
	Message string `json:"message,omitempty"`
}

HealthCheckResult -- used for a health check result; we can have many of these

type OrcidAttributes

type OrcidAttributes struct {
	ID                string `json:"id,omitempty"`
	Cid               string `json:"cid,omitempty"`
	Orcid             string `json:"orcid,omitempty"`
	URI               string `json:"uri,omitempty"`
	OauthAccessToken  string `json:"oauth_access_token,omitempty"`
	OauthRefreshToken string `json:"oauth_refresh_token,omitempty"`
	OauthScope        string `json:"scope,omitempty"`
	UserTypes         string `json:"user_types,omitempty"`
	CreatedAt         string `json:"created_at,omitempty"`
	UpdatedAt         string `json:"updated_at,omitempty"`
}

OrcidAttributes -- orcid attributes structure

type OrcidAttributesResponse

type OrcidAttributesResponse struct {
	Status     int                `json:"status"`
	Message    string             `json:"message"`
	Attributes []*OrcidAttributes `json:"results"`
}

OrcidAttributesResponse -- response to the attributes request

type OrcidDetails

type OrcidDetails struct {
	Relevancy    string   `json:"relevancy,omitempty"`
	Orcid        string   `json:"orcid,omitempty"`
	URI          string   `json:"uri,omitempty"`
	DisplayName  string   `json:"display_name,omitempty"`
	FirstName    string   `json:"first_name,omitempty"`
	LastName     string   `json:"last_name,omitempty"`
	Biography    string   `json:"biography,omitempty"`
	Keywords     []string `json:"keywords,omitempty"`
	ResearchUrls []string `json:"urls,omitempty"`
}

OrcidDetails -- orcid details structure

type OrcidDetailsResponse

type OrcidDetailsResponse struct {
	Status  int           `json:"status"`
	Message string        `json:"message"`
	Details *OrcidDetails `json:"orcid"`
}

OrcidDetailsResponse -- response to the orcid details request

type OrcidSearchResponse

type OrcidSearchResponse struct {
	Status  int             `json:"status"`
	Message string          `json:"message"`
	Start   int             `json:"start"`
	Count   int             `json:"count"`
	Total   int             `json:"total"`
	Results []*OrcidDetails `json:"results"`
}

OrcidSearchResponse -- orcid search response

type PeopleSorter

type PeopleSorter []Person

PeopleSorter sorts people by index

func (PeopleSorter) Len

func (people PeopleSorter) Len() int

func (PeopleSorter) Less

func (people PeopleSorter) Less(i, j int) bool

func (PeopleSorter) Swap

func (people PeopleSorter) Swap(i, j int)

type Person

type Person struct {
	Index     int    `json:"index"`
	FirstName string `json:"first_name,omitempty"`
	LastName  string `json:"last_name,omitempty"`
}

Person -- the basic person details used for authors

func SortPeople

func SortPeople(people []Person) []Person

SortPeople -- helpers to sort the people lists

type StandardResponse

type StandardResponse struct {
	Status  int    `json:"status"`
	Message string `json:"message"`
}

StandardResponse -- the basic response

type UpdateActivityResponse

type UpdateActivityResponse struct {
	Status     int    `json:"status"`
	Message    string `json:"message"`
	UpdateCode string `json:"update_code"`
}

UpdateActivityResponse -- response for the update activity request

type VersionResponse

type VersionResponse struct {
	Version string `json:"build"`
}

VersionResponse -- response to the version request

type WorkSchema

type WorkSchema struct {
	Title           string   `json:"title,omitempty"`
	Abstract        string   `json:"abstract,omitempty"`
	PublicationDate string   `json:"publication_date,omitempty"`
	URL             string   `json:"url,omitempty"`
	Authors         []Person `json:"authors,omitempty"`
	ResourceType    string   `json:"resource_type,omitempty"`
}

WorkSchema -- the work schema

Jump to

Keyboard shortcuts

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