Documentation ¶
Index ¶
- Constants
- func NewDummyOrganization(id string) *models.Organization
- func NewDummyPerson(id string) *models.Person
- func NewDummyProject(id string) *models.Project
- type BulkIndexer
- type BulkIndexerConfig
- type DatasetGetter
- type DatasetIDIndex
- type DatasetIndex
- type DatasetListExporter
- type DatasetListExporterFactory
- type FileStore
- type HandleService
- type IndexSwitcher
- type LicenseSearchService
- type MediaTypeSearchService
- type OrganizationSearchService
- type OrganizationService
- type PersonSearchService
- type PersonService
- type PersonWithOrganizationsService
- type ProjectSearchService
- type ProjectService
- type PublicationDecoder
- type PublicationDecoderFactory
- type PublicationEncoder
- type PublicationGetter
- type PublicationIDIndex
- type PublicationIndex
- type PublicationListExporter
- type PublicationListExporterFactory
- type SearchService
- type Services
- type UserSearchService
- type UserService
- type UserWithOrganizationsService
Constants ¶
View Source
const MissingValue = "missing"
Variables ¶
This section is empty.
Functions ¶
func NewDummyOrganization ¶
func NewDummyOrganization(id string) *models.Organization
TODO remove this when we always have an uptodate db of organizations
func NewDummyPerson ¶
func NewDummyProject ¶
Types ¶
type BulkIndexer ¶
type BulkIndexerConfig ¶
type DatasetIDIndex ¶
type DatasetIDIndex interface { Search(*models.SearchArgs) (*models.SearchHits, error) Each(searchArgs *models.SearchArgs, maxSize int, cb func(string)) error Delete(id string) error DeleteAll() error WithScope(string, ...string) DatasetIDIndex }
type DatasetIndex ¶
type DatasetIndex interface { Search(*models.SearchArgs) (*models.DatasetHits, error) Each(searchArgs *models.SearchArgs, maxSize int, cb func(*models.Dataset)) error Delete(id string) error DeleteAll() error WithScope(string, ...string) DatasetIndex }
func NewDatasetIndex ¶
func NewDatasetIndex(di DatasetIDIndex, r *repositories.Repo) DatasetIndex
type DatasetListExporter ¶
type DatasetListExporterFactory ¶
type DatasetListExporterFactory func(io.Writer) DatasetListExporter
type IndexSwitcher ¶
type LicenseSearchService ¶
type LicenseSearchService interface { IndexAll() error SuggestLicenses(string) ([]models.Completion, error) }
type MediaTypeSearchService ¶
type MediaTypeSearchService interface { IndexAll() error SuggestMediaTypes(string) ([]models.Completion, error) }
type OrganizationSearchService ¶
type OrganizationSearchService interface {
SuggestOrganizations(string) ([]models.Completion, error)
}
type OrganizationService ¶
type OrganizationService interface {
GetOrganization(string) (*models.Organization, error)
}
type PersonSearchService ¶
type PersonWithOrganizationsService ¶
type PersonWithOrganizationsService struct { PersonService PersonService OrganizationService OrganizationService }
type ProjectSearchService ¶
type ProjectSearchService interface {
SuggestProjects(string) ([]models.Completion, error)
}
type PublicationDecoder ¶
type PublicationDecoder interface {
Decode(*models.Publication) error
}
type PublicationDecoderFactory ¶
type PublicationDecoderFactory func(io.Reader) PublicationDecoder
type PublicationEncoder ¶
type PublicationEncoder func(*models.Publication) ([]byte, error)
type PublicationGetter ¶
type PublicationGetter interface {
GetPublication(string) (*models.Publication, error)
}
type PublicationIDIndex ¶
type PublicationIDIndex interface { Search(*models.SearchArgs) (*models.SearchHits, error) Each(searchArgs *models.SearchArgs, maxSize int, cb func(string)) error Delete(id string) error DeleteAll() error WithScope(string, ...string) PublicationIDIndex }
type PublicationIndex ¶
type PublicationIndex interface { Search(*models.SearchArgs) (*models.PublicationHits, error) Each(searchArgs *models.SearchArgs, maxSize int, cb func(*models.Publication)) error Delete(id string) error DeleteAll() error WithScope(string, ...string) PublicationIndex }
func NewPublicationIndex ¶
func NewPublicationIndex(di PublicationIDIndex, r *repositories.Repo) PublicationIndex
type PublicationListExporter ¶
type PublicationListExporter interface { GetContentType() string Add(*models.Publication) Flush() error }
type PublicationListExporterFactory ¶
type PublicationListExporterFactory func(io.Writer) PublicationListExporter
type SearchService ¶
type SearchService interface { NewDatasetIndex(*repositories.Repo) DatasetIndex NewDatasetBulkIndexer(BulkIndexerConfig) (BulkIndexer[*models.Dataset], error) NewDatasetIndexSwitcher(BulkIndexerConfig) (IndexSwitcher[*models.Dataset], error) NewPublicationIndex(*repositories.Repo) PublicationIndex NewPublicationBulkIndexer(BulkIndexerConfig) (BulkIndexer[*models.Publication], error) NewPublicationIndexSwitcher(BulkIndexerConfig) (IndexSwitcher[*models.Publication], error) }
type Services ¶
type Services struct { ORCIDSandbox bool ORCIDClient *orcid.MemberClient Repo *repositories.Repo FileStore FileStore SearchService SearchService DatasetSearchIndex DatasetIndex PublicationSearchIndex PublicationIndex OrganizationService OrganizationService PersonService PersonService ProjectService ProjectService UserService UserService OrganizationSearchService OrganizationSearchService PersonSearchService PersonSearchService ProjectSearchService ProjectSearchService UserSearchService UserSearchService LicenseSearchService LicenseSearchService MediaTypeSearchService MediaTypeSearchService PublicationSources map[string]PublicationGetter DatasetSources map[string]DatasetGetter PublicationEncoders map[string]PublicationEncoder PublicationDecoders map[string]PublicationDecoderFactory PublicationListExporters map[string]PublicationListExporterFactory DatasetListExporters map[string]DatasetListExporterFactory HandleService HandleService }
type UserSearchService ¶
type UserService ¶
type UserWithOrganizationsService ¶
type UserWithOrganizationsService struct { UserService UserService OrganizationService OrganizationService }
func (*UserWithOrganizationsService) GetUser ¶
func (s *UserWithOrganizationsService) GetUser(id string) (*models.Person, error)
func (*UserWithOrganizationsService) GetUserByUsername ¶
func (s *UserWithOrganizationsService) GetUserByUsername(username string) (*models.Person, error)
Click to show internal directories.
Click to hide internal directories.