Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONRender ¶
type JSONRender struct { Data proto.Message protojson.MarshalOptions // contains filtered or unexported fields }
func (*JSONRender) Render ¶
func (r *JSONRender) Render(w http.ResponseWriter) error
Render writes data with custom ContentType.
func (*JSONRender) RenderToBytes ¶
func (r *JSONRender) RenderToBytes() ([]byte, error)
RenderToBytes renders data to bytes.
func (*JSONRender) WriteContentType ¶
func (r *JSONRender) WriteContentType(w http.ResponseWriter)
WriteContentType writes custom ContentType.
type ProtoRender ¶
ProtoRender contains the given interface object.
func (*ProtoRender) Render ¶
func (r *ProtoRender) Render(w http.ResponseWriter) error
Render (ProtoBuf) marshals the given interface object and writes data with custom ContentType.
func (*ProtoRender) RenderToBytes ¶
func (r *ProtoRender) RenderToBytes() ([]byte, error)
RenderToBytes render data to bytes.
func (*ProtoRender) WriteContentType ¶
func (r *ProtoRender) WriteContentType(w http.ResponseWriter)
WriteContentType (ProtoBuf) writes ProtoBuf ContentType.
Click to show internal directories.
Click to hide internal directories.