Documentation ¶
Index ¶
- type Agent
- type Catalog
- type Dataset
- type DatasetLink
- type Distribution
- type DistributionCfg
- type Option
- type RegisterConfig
- type Service
- func (s *Service) AddDatasets(orgID string, catalog *Catalog) error
- func (s *Service) HandleCatalog(w http.ResponseWriter, r *http.Request)
- func (s *Service) HandleDataset(w http.ResponseWriter, r *http.Request)
- func (s *Service) Routes(router chi.Router)
- func (s *Service) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (s *Service) Shutdown(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Catalog ¶
type Catalog struct { Context string `json:"@context,omitempty"` ID string `json:"@id,omitempty"` Type string `json:"@type,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Publisher Agent `json:"publisher,omitempty"` Dataset []*Dataset `json:"dataset,omitempty"` }
type Dataset ¶
type Dataset struct { Context string `json:"@context,omitempty"` Type string `json:"@type,omitempty"` ID string `json:"@id,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` License string `json:"license,omitempty"` DateCreated string `json:"dateCreated,omitempty"` DateModified string `json:"dateModified,omitempty"` DatePublished string `json:"datePublished,omitempty"` Keywords []string `json:"keywords,omitempty"` IncludedInDataCatalog string `json:"includedInDataCatalog,omitempty"` InLanguage []string `json:"inLanguage,omitempty"` MainEntityOfPage string `json:"mainEntityOfPage,omitempty"` Publisher Agent `json:"publisher,omitempty"` Creator Agent `json:"creator,omitempty"` Distribution []Distribution `json:"distribution,omitempty"` }
type DatasetLink ¶
type Distribution ¶
type Distribution struct { Type string `json:"@type,omitempty"` ContentSize string `json:"contentSize,omitempty"` ContentURL string `json:"contentUrl,omitempty"` DateModified string `json:"dateModified,omitempty"` DatePublished string `json:"datePublished,omitempty"` EncodingFormat string `json:"encodingFormat,omitempty"` Name string `json:"name,omitempty"` }
type DistributionCfg ¶
type RegisterConfig ¶
type RegisterConfig struct { RDFBaseURL string Description string Name string DefaultLicense string DefaultLanguages []string Publisher struct { Name string AltName string URL string } DataPath string // for ead support for now. Replace with dataset service later DatasetFmt string Distributions []DistributionCfg }
func (*RegisterConfig) GetAgent ¶
func (r *RegisterConfig) GetAgent() Agent
func (*RegisterConfig) GetDistributions ¶
func (r *RegisterConfig) GetDistributions(spec, datasetType string) []Distribution
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) HandleCatalog ¶
func (s *Service) HandleCatalog(w http.ResponseWriter, r *http.Request)
func (*Service) HandleDataset ¶
func (s *Service) HandleDataset(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.