publish

package
v0.0.0-...-6f58fc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2015 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package publish exposes the types and functions that can be used from a Go template, for publishing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemberFileInfo

type MemberFileInfo struct {
	FileName         string
	FileDomID        string
	FilePath         string
	FileThumbnailURL string
}

MemberFileInfo contains the file related data available for each member, if the member is the permanode for a file.

type Nav struct {
	ParentPath string
	PrevPath   string
	NextPath   string
}

Nav holds links to the previous, next, and parent elements, when displaying members.

type PageFile

type PageFile struct {
	FileName     string
	Size         int64
	MIMEType     string
	IsImage      bool
	DownloadURL  string
	ThumbnailURL string
	DomID        string
	Nav          func() *Nav
}

PageFile contains the file related data available to the subject template, if the page describes some file contents.

type PageHeader struct {
	Title         string      // Page title.
	CSSFiles      []string    // Available CSS files.
	JSDeps        []string    // Dependencies (for e.g closure) that can/should be included as javascript files.
	CamliClosure  template.JS // Closure namespace defined in the provided js. e.g camlistore.GalleryPage from pics.js
	Subject       string      // Subject of this page (i.e the object which is described and published).
	Meta          string      // All the metadata describing the subject of this page.
	ViewerIsOwner bool        // Whether the viewer of the page is also the owner of the displayed subject. (localhost check for now.)
}

PageHeader contains the data available to the template, and relevant to the page header.

type PageMembers

type PageMembers struct {
	SubjectPath string                                      // URL prefix path to the subject (i.e the permanode).
	ZipName     string                                      // Name of the downloadable zip file which contains all the members.
	Members     []*search.DescribedBlob                     // List of the members.
	Description func(*search.DescribedBlob) string          // Returns the description of the given member.
	Title       func(*search.DescribedBlob) string          // Returns the title for the given member.
	Path        func(*search.DescribedBlob) string          // Returns the url prefix path to the given the member.
	DomID       func(*search.DescribedBlob) string          // Returns the Dom ID of the given member.
	FileInfo    func(*search.DescribedBlob) *MemberFileInfo // Returns some file info if the given member is a file permanode.
}

PageMembers contains the data relevant to the members if the published subject is a permanode with members.

type SubjectPage

type SubjectPage struct {
	Header  func() *PageHeader
	File    func() *PageFile
	Members func() *PageMembers
}

SubjectPage is the data structure used when serving a publishing template. It contains the functions that can be called from the template.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL