Documentation ¶
Index ¶
- Constants
- func GetMapOfHttpStatusCodesByRpcErrorCodes() map[int]int
- type Server
- func (srv *Server) AddNotification(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) AddNotificationS(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) CountUnreadNotifications(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) DeleteNotification(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) GetDKey(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) GetListenDsn() (dsn string)
- func (srv *Server) GetMustStopAB() *atomic.Bool
- func (srv *Server) GetNotification(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) GetNotifications(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) GetNotificationsOnPage(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) GetStopChannel() *chan bool
- func (srv *Server) GetSubRoutinesWG() *sync.WaitGroup
- func (srv *Server) GetUnreadNotifications(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) MarkNotificationAsRead(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) Ping(_ *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) ReportStart()
- func (srv *Server) SendNotificationIfPossibleS(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) ShowDiagnosticData(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) Start() (err error)
- func (srv *Server) Stop() (err error)
- func (srv *Server) Test(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) UseConstructor(stn cm.ISettings) (cm.IServer, error)
Constants ¶
View Source
const ( RpcErrorCode_UserIdIsNotSet = 1 RpcErrorCode_TextIsNotSet = 2 RpcErrorCode_NotificationIdIsNotSet = 3 RpcErrorCode_NotificationIsNotFound = 4 RpcErrorCode_NotificationIsAlreadyRead = 5 RpcErrorCode_TestError = 6 RpcErrorCode_PageIsNotSet = 7 )
Codes.
View Source
const ( RpcErrorMsg_UserIdIsNotSet = "user ID is not set" RpcErrorMsg_TextIsNotSet = "text is not set" RpcErrorMsg_NotificationIdIsNotSet = "notification ID is not set" RpcErrorMsg_NotificationIsNotFound = "notification is not found" RpcErrorMsg_NotificationIsAlreadyRead = "notification is already read" RpcErrorMsgF_TestError = "test error: %s" RpcErrorMsg_PageIsNotSet = "page is not set" )
Messages.
Variables ¶
This section is empty.
Functions ¶
func GetMapOfHttpStatusCodesByRpcErrorCodes ¶
Unique HTTP status codes used in the map: - 400 (Bad request); - 404 (Not found); - 409 (Conflict); - 500 (Internal server error).
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) AddNotification ¶
func (srv *Server) AddNotification(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) AddNotificationS ¶ added in v0.0.41
func (srv *Server) AddNotificationS(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) CountUnreadNotifications ¶
func (srv *Server) CountUnreadNotifications(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) DeleteNotification ¶
func (srv *Server) DeleteNotification(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) GetDKey ¶ added in v0.0.41
func (srv *Server) GetDKey(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) GetListenDsn ¶
func (*Server) GetMustStopAB ¶ added in v0.0.40
func (*Server) GetNotification ¶
func (srv *Server) GetNotification(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) GetNotifications ¶ added in v0.0.54
func (srv *Server) GetNotifications(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) GetNotificationsOnPage ¶ added in v0.0.50
func (srv *Server) GetNotificationsOnPage(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) GetStopChannel ¶
func (*Server) GetSubRoutinesWG ¶ added in v0.0.40
func (*Server) GetUnreadNotifications ¶
func (srv *Server) GetUnreadNotifications(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) MarkNotificationAsRead ¶
func (srv *Server) MarkNotificationAsRead(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) Ping ¶
func (srv *Server) Ping(_ *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) ReportStart ¶
func (srv *Server) ReportStart()
func (*Server) SendNotificationIfPossibleS ¶ added in v0.0.58
func (srv *Server) SendNotificationIfPossibleS(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) ShowDiagnosticData ¶
func (srv *Server) ShowDiagnosticData(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) Test ¶
func (srv *Server) Test(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.