Documentation ¶
Index ¶
- func Error(w http.ResponseWriter, r *http.Request, status int, cause error, ...)
- func HTML(s string) template.HTML
- func IsEmpty(s *string) bool
- func Iter(w http.ResponseWriter, r *http.Request, it fetch.Iter)
- func Remote(w http.ResponseWriter, r *http.Request, iri *url.URL)
- func Render(w http.ResponseWriter, r *http.Request, page string, ...)
- func URL(s string) template.URL
- type WebVocab
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Error ¶
func Error(w http.ResponseWriter, r *http.Request, status int, cause error, data map[string]interface{})
Write out the Error template with given status and cause. cause may be left nil.
Types ¶
type WebVocab ¶
type WebVocab interface { // Render out the HTML representation of the wrapped object. Fragment() template.HTML // Get the type of the underlying wrapped object. Type() string // Get the IRI of the underlying wrapped object. Id() template.URL }
Represents a wrapped instance of a vocab.Type object. WebVocab provides method for rendering out the underlying vocab object to some safe HTML representation.
func Fetch ¶
func Fetch(fc *fedcontext.FedContext, target *url.URL) (WebVocab, error)
Fetch the ActivityPub object at iri and return a wraped version.
func New ¶
func New(fc *fedcontext.FedContext, target vocab.Type) (WebVocab, error)
Return a wrapped version of target.
func News ¶
func News(fc *fedcontext.FedContext, targets ...vocab.Type) ([]WebVocab, error)
Return wrapped versions of all targets. Returns an error if at least one of the conversations failed.
Click to show internal directories.
Click to hide internal directories.