Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entrie ¶
type Entrie struct { Publisher Publisher `json:"publisher"` Publications []Publication `json:"publications"` }
Entrie is one record in file, representing publisher and its publications
type ImportError ¶
type ImportError struct { Publisher Publisher Publication Publication Error error }
func (*ImportError) String ¶
func (e *ImportError) String() string
type Importer ¶
type Importer struct {
APIClient PublicationsAPIClient
}
type Publication ¶
type Publication struct { Name string `json:"name"` Description string `json:"description"` LanguageCode string `json:"language_code"` Type string `json:"type"` // Config content is different for different publication types. // when parsing, we decide on Type Config PublicationConfig `json:"config"` }
type PublicationConfig ¶
type PublicationConfig interface{}
PublicationConfig is used to pass around different config structs
type PublicationsAPIClient ¶
type PublicationsAPIClient interface { CreatePublisher(ctx context.Context, name string, url string) (entity.Publisher, error) CreatePublication(ctx context.Context, name string, description string, languageCode string, publisherUUID uuid.UUID, publicationType string, config interface{}) (entity.Publication, error) }
Click to show internal directories.
Click to hide internal directories.