Versions in this module Expand all Collapse all v0 v0.0.3 May 16, 2022 Changes in this version type ManyPayload + func (s *ManyPayload[T, U]) TransformedData() []T type SinglePayload + func (s *SinglePayload[T, U]) TransformedData() T + type TransformDataFn func(obj *Data[T, U]) (T, error) v0.0.2 May 16, 2022 Changes in this version type ManyPayload + PaginationMeta *PaginationMeta type PaginationMeta + Page int v0.0.1 May 16, 2022 Changes in this version + const TypeFiles + const TypePreprintProviders + const TypePreprints + const TypeProviders + var Available = &available + var No = &no + var NotApplicable = ¬Applicable + func BoolPointer(b bool) *bool + func StringPointer(s string) *string + type BuildDataFn func(obj *Data[T, U]) (T, error) + type Client struct + BaseURL *url.URL + Files *FilesService + PreprintProviders *PreprintProvidersService + Preprints *PreprintsService + UserAgent string + func NewClient(httpClient *http.Client) *Client + func (c *Client) Client() *http.Client + func (c *Client) NewRequest(method, urlStr string, body interface{}) (*http.Request, error) + type Data struct + Attributes T + ID *string + Links U + Relationships Relationships + Type string + type Error struct + Detail string + Source *ErrorSource + func (e *Error) Error() string + type ErrorSource struct + Pointer string + type Errors []*Error + func (e Errors) Error() string + type File struct + CurrentUserCanComment bool + CurrentVersion int64 + DateCreated *Time + DateModified string + DeleteAllowed bool + FileLinks *FileLinks + GUID string + ID string + Kind string + LastTouched *Time + MaterializedPath string + Name string + Path string + Provider string + Size int64 + type FileLinks struct + Delete *string + Download *string + Move *string + NewFolder *string + Upload *string + type FilesService service + func (s *FilesService) DownloadFile(ctx context.Context, dir string, filename string, file *File) error + func (s *FilesService) GetFileByID(ctx context.Context, id string) (*File, *SinglePayload[*File, *FileLinks], error) + type Link struct + Href string + Meta Meta + type Links struct + Related *Link + Self *Link + type ListOptions struct + Filter map[string]string + Page int + PerPage int + type ManyPayload struct + Data []T + Errors Errors + PaginationLinks *PaginationLinks + RawData []*Data[T, U] + type Meta map[string]interface + type PaginationLinks struct + First *string + Last *string + Meta *PaginationMeta + Next *string + Prev *string + type PaginationMeta struct + PerPage int + Total int + type Preprint struct + ConflictOfInterestStatement *string + CurrentUserPermissions []string + DOI *string + DataLinks []string + DateCreated *Time + DateLastTransitioned *Time + DateModified *Time + DatePublished *Time + DateWithdrawn *Time + Description string + HasCOI bool + HasDataLinks *string + HasPreregLinks *string + ID string + IsPreprintOrphan bool + IsPublished bool + LicenseRecord *PreprintLicenseRecord + Links *PreprintLinks + OriginalPublicationDate *Time + PreprintDOICreated *Time + PreregLinkInfo *string + PreregLinks []string + Public bool + ReviewsState string + Subjects [][]*Subject + Tags []string + Title string + WhyNoData *string + WhyNoPrereg *string + type PreprintLicenseRecord struct + CopyrightHolders []string + Year string + type PreprintLinks struct + Html *string + PreprintDOI *string + Self *string + type PreprintProvider struct + AdditionalProviders []string + AdvisoryBoard *string + AllowCommenting bool + AllowSubmissions bool + Assets map[string]interface{} + BannerPath *string + Description string + Domain *string + DomainRedirectEnabled bool + EmailContact *string + EmailSupport *string + Example *string + FacebookAppID *int64 + FooterLinks *string + HeaderText *string + ID string + Links *PreprintProviderLinks + LogoPath *string + Name string + Permissions []string + PreprintWord *string + ReviewsCommentAnonymous bool + ReviewsCommentPrivate bool + ReviewsWorkflow *string + SharePublishType *string + ShareSource *string + SocialFacebook *string + SocialInstagram *string + SocialTwitter *string + SubjectsAcceptable []*PreprintProviderSubject + type PreprintProviderLinks struct + ExternalURL *string + Preprints *string + Self *string + type PreprintProviderSubject struct + IncludeAllChildren bool + TaxonomiesID []string + func (s *PreprintProviderSubject) UnmarshalJSON(b []byte) error + func (s PreprintProviderSubject) MarshalJSON() ([]byte, error) + type PreprintProvidersListOptions struct + type PreprintProvidersService service + func (s *PreprintProvidersService) GetPreprintProviderByID(ctx context.Context, id string) (*PreprintProvider, *SinglePayload[*PreprintProvider, *PreprintProviderLinks], ...) + func (s *PreprintProvidersService) ListPreprintProviders(ctx context.Context, opts *PreprintProvidersListOptions) ([]*PreprintProvider, *ManyPayload[*PreprintProvider, *PreprintProviderLinks], ...) + type PreprintRequest struct + ConflictOfInterestStatement *string + DOI *string + DataLinks *[]string + Description *string + HasCOI *bool + HasDataLinks *string + HasPreregLinks *string + IsPublished *bool + LicenseRecord *PreprintLicenseRecord + OriginalPublicationDate *Time + PreprintDOICreated *Time + PreprintProviderID string + PreregLinks *[]string + Public *bool + Subjects *[][]string + Tags *[]string + Title *string + WhyNoData *string + WhyNoPrereg *string + type PreprintsListOptions struct + type PreprintsService service + func (s *PreprintsService) CreatePreprint(ctx context.Context, input *PreprintRequest, primaryFile *os.File) (*Preprint, *SinglePayload[*Preprint, *PreprintLinks], error) + func (s *PreprintsService) GetPreprintByID(ctx context.Context, id string) (*Preprint, *SinglePayload[*Preprint, *PreprintLinks], error) + func (s *PreprintsService) GetPreprintPrimaryFileByID(ctx context.Context, id string) (*File, *SinglePayload[*File, *FileLinks], error) + func (s *PreprintsService) ListPreprints(ctx context.Context, opts *PreprintsListOptions) ([]*Preprint, *ManyPayload[*Preprint, *PreprintLinks], error) + func (s *PreprintsService) UpdatePreprint(ctx context.Context, id string, input *PreprintRequest, ...) (*Preprint, *SinglePayload[*Preprint, *PreprintLinks], error) + type Relationship struct + Data *Data[interface{}, interface{}] + Links *Links + Meta Meta + type Relationships map[string]Relationship + type SinglePayload struct + Data T + Errors Errors + RawData *Data[T, U] + type Subject struct + ID string + Text string + type Time struct + func MustParseTime(layout, value string) *Time + func ParseTime(layout, value string) (*Time, error) + func (t *Time) UnmarshalJSON(b []byte) error