Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewService ¶
func NewService(rep notifications.Repository, logger *zap.Logger) notifications.Service
Types ¶
type Message ¶
type Message struct { Type string `json:"type"` // response, notification Content interface{} `json:"content"` }
func (Message) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Message) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Message) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Message) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type Request ¶
type Request struct {
ID int `json:"id"`
}
func (Request) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Request) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Request) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Request) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type ResponseContent ¶
Code 20: ok, 40: bad request, 50: internal error
func (ResponseContent) MarshalEasyJSON ¶
func (v ResponseContent) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (ResponseContent) MarshalJSON ¶
func (v ResponseContent) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*ResponseContent) UnmarshalEasyJSON ¶
func (v *ResponseContent) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*ResponseContent) UnmarshalJSON ¶
func (v *ResponseContent) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface