nm

package
v0.0.58 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2024 License: GPL-3.0 Imports: 29 Imported by: 0

Documentation

Index

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

func GetMapOfHttpStatusCodesByRpcErrorCodes() map[int]int

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 NewServer

func NewServer(s cm.ISettings) (srv *Server, err error)

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 (srv *Server) GetListenDsn() (dsn string)

func (*Server) GetMustStopAB added in v0.0.40

func (srv *Server) GetMustStopAB() *atomic.Bool

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 (srv *Server) GetStopChannel() *chan bool

func (*Server) GetSubRoutinesWG added in v0.0.40

func (srv *Server) GetSubRoutinesWG() *sync.WaitGroup

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) Start

func (srv *Server) Start() (err error)

func (*Server) Stop

func (srv *Server) Stop() (err error)

func (*Server) Test

func (srv *Server) Test(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)

func (*Server) UseConstructor

func (srv *Server) UseConstructor(stn cm.ISettings) (cm.IServer, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL