Documentation
¶
Index ¶
- type ActivityUpdate
- type HealthCheckResponse
- type HealthCheckResult
- type OrcidAttributes
- type OrcidAttributesResponse
- type OrcidDetails
- type OrcidDetailsResponse
- type OrcidSearchResponse
- type PeopleSorter
- type Person
- type StandardResponse
- type UpdateActivityResponse
- type VersionResponse
- type WorkSchema
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 ¶
SortPeople -- helpers to sort the people lists
type StandardResponse ¶
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