Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
func NewEncoder ¶
func NewEncoder(w io.Writer, o options.FederationOpt) *Encoder
func (Encoder) Encode ¶
func (e Encoder) Encode(payload interface{}, t EncodingFormat) error
Encode the specific format per payload
type EncoderAdapter ¶
type EncoderAdapter interface { BuildStructure(io.Writer, options.FederationOpt, interface{}) (interface{}, error) BuildData(io.Writer, options.FederationOpt, interface{}) (interface{}, error) }
type EncoderAdapterActivityStreams ¶
type EncoderAdapterActivityStreams struct{}
func (EncoderAdapterActivityStreams) BuildData ¶
func (a EncoderAdapterActivityStreams) BuildData(w io.Writer, o options.FederationOpt, p interface{}) (interface{}, error)
Build an activity streams format from default internal Corteza payload, including the author, activitystreams metadata and paging custom metadata
func (EncoderAdapterActivityStreams) BuildStructure ¶
func (a EncoderAdapterActivityStreams) BuildStructure(w io.Writer, o options.FederationOpt, p interface{}) (interface{}, error)
Build an activity streams format from default internal Corteza payload, including the author, activitystreams metadata and paging custom metadata
type EncoderAdapterCortezaInternal ¶
type EncoderAdapterCortezaInternal struct{}
func (EncoderAdapterCortezaInternal) BuildData ¶
func (a EncoderAdapterCortezaInternal) BuildData(w io.Writer, o options.FederationOpt, p interface{}) (interface{}, error)
Build a default Corteza response
func (EncoderAdapterCortezaInternal) BuildStructure ¶
func (a EncoderAdapterCortezaInternal) BuildStructure(w io.Writer, o options.FederationOpt, p interface{}) (interface{}, error)
Build a default Corteza response
type EncodingFormat ¶
type EncodingFormat int
const ( ActivityStreamsStructure EncodingFormat = 0 CortezaInternalStructure EncodingFormat = 1 ActivityStreamsData EncodingFormat = 2 CortezaInternalData EncodingFormat = 3 )
type ListDataPayload ¶
type ListStructurePayload ¶
type ListStructurePayload struct { NodeID uint64 Filter *types.ExposedModuleFilter `json:"filter"` Set *types.ExposedModuleSet `json:"set"` }
type ResponseWrapper ¶
type ResponseWrapper struct {
Response interface{} `json:"response"`
}
Click to show internal directories.
Click to hide internal directories.