Documentation ¶
Index ¶
- type Dimension
- type Repo
- func (repo *Repo) GetContent(r *requests.Content) (c *content.SiteContent, err error)
- func (repo *Repo) GetNodes(r *requests.Nodes) map[string]*content.Node
- func (repo *Repo) GetRepo() map[string]*content.RepoNode
- func (repo *Repo) GetURIs(dimension string, ids []string) map[string]string
- func (repo *Repo) Recovered() bool
- func (repo *Repo) Update() (updateResponse *responses.Update)
- func (repo *Repo) WriteRepoBytes(w io.Writer)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dimension ¶
type Dimension struct { Directory map[string]*content.RepoNode URIDirectory map[string]*content.RepoNode Node *content.RepoNode }
Dimension dimension in a repo
type Repo ¶
Repo content repositiory
func NewRepo ¶
func NewRepo(server string, varDir string, repositoryTimeout time.Duration, pollForUpdates bool) *Repo
NewRepo constructor
func (*Repo) GetContent ¶
GetContent resolves content and fetches nodes in one call. It combines those two tasks for performance reasons.
In the first step it uses r.URI to look up content in all given r.Env.Dimensions of repo.Directory.
In the second step it collects the requested nodes.
those two steps are independent.
func (*Repo) WriteRepoBytes ¶
WriteRepoBytes get the whole repo in all dimensions reads the JSON history file from the Filesystem and copies it directly in to the supplied buffer the result is wrapped as service response, e.g: {"reply": <contentData>}
Click to show internal directories.
Click to hide internal directories.