Documentation ¶
Index ¶
- Variables
- func ToPlainJson(v interface{}) ([]byte, error)
- type ChannelsResponse
- type ClientResponse
- type Response
- func (res *Response) Send() error
- func (res *Response) SendData(data []byte) error
- func (res *Response) SetError(err error) *Response
- func (res *Response) SetErrorWithText(errText string) *Response
- func (res *Response) SetHttpCode(value int) *Response
- func (res *Response) SetResponseBody(data interface{}) *Response
- func (res *Response) Unmarshal(v interface{}) error
- type Server
Constants ¶
This section is empty.
Variables ¶
View Source
var StaticAssets embed.FS
Functions ¶
func ToPlainJson ¶
Types ¶
type ChannelsResponse ¶
type ChannelsResponse struct { Host string LastUpdate time.Time Channels []*metrics.ChannelStats Summery []*metrics.ChannelsSummery }
type ClientResponse ¶
type Response ¶
type Response struct { Error bool `json:"error"` ErrorString string `json:"error_string"` Data json.RawMessage `json:"data"` // contains filtered or unexported fields }
func NewResponse ¶
func NewResponse(c echo.Context) *Response
func (*Response) SetErrorWithText ¶
func (*Response) SetHttpCode ¶
func (*Response) SetResponseBody ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func CreateApiServer ¶
func (*Server) AddHealthFunc ¶
func (s *Server) AddHealthFunc(fn func() json.RawMessage)
Click to show internal directories.
Click to hide internal directories.