Documentation ¶
Index ¶
- Constants
- type Server
- func (srv *Server) AddForum(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) AddMessage(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) AddNotification(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) AddResource(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) AddSection(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) AddSubscription(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) AddThread(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) ApproveAndRegisterUser(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) BanUser(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) BlockIPAddress(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) ChangeEmail(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) ChangeForumName(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) ChangeForumSection(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) ChangeMessageText(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) ChangeMessageThread(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) ChangePassword(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) ChangeSectionName(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) ChangeSectionParent(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) ChangeThreadForum(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) ChangeThreadName(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) CountSelfSubscriptions(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) CountUnreadNotifications(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) DeleteForum(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) DeleteMessage(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) DeleteNotification(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) DeleteResource(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) DeleteSection(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) DeleteSelfSubscription(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) DeleteSubscription(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) DeleteThread(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) GetForum(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) GetLatestMessageOfThread(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) GetListOfAllResourcesOnPage(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) GetListOfAllUsers(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) GetListOfAllUsersOnPage(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) GetListOfLoggedUsers(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) GetListOfLoggedUsersOnPage(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) GetListOfRegistrationsReadyForApproval(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) GetListenDsnExt() (dsn string)
- func (srv *Server) GetListenDsnInt() (dsn string)
- func (srv *Server) GetMessage(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) GetMustStopAB() *atomic.Bool
- func (srv *Server) GetNotification(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) GetNotifications(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) GetNotificationsOnPage(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) GetResource(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) GetResourceValue(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) GetSection(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) GetSelfRoles(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) GetSelfSubscriptions(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) GetSelfSubscriptionsOnPage(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) GetStopChannel() *chan bool
- func (srv *Server) GetSubRoutinesWG() *sync.WaitGroup
- func (srv *Server) GetThread(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) GetThreadNamesByIds(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) GetUnreadNotifications(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) GetUserName(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) GetUserRoles(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) GetUserSession(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) GetUserSubscriptions(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) GetUserSubscriptionsOnPage(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) IsIPAddressBlocked(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) IsSelfSubscribed(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) IsUserLoggedIn(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) IsUserSubscribed(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) ListForumAndThreads(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) ListForumAndThreadsOnPage(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) ListSectionsAndForums(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) ListThreadAndMessages(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) ListThreadAndMessagesOnPage(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) LogUserIn(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) LogUserOut(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) LogUserOutA(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) MarkNotificationAsRead(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) MoveForumDown(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) MoveForumUp(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) MoveSectionDown(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) MoveSectionUp(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) MoveThreadDown(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) MoveThreadUp(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) Ping(_ *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
- func (srv *Server) RegisterUser(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) RejectRegistrationRequest(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) ReportStart()
- func (srv *Server) SetUserRoleAuthor(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) SetUserRoleReader(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) SetUserRoleWriter(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- 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) UnbanUser(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
- func (srv *Server) UseConstructor(stn base.ISettings) (base.IServer, error)
- func (srv *Server) ViewUserParameters(ar *api2.Request, _ *http.Request, hrw http.ResponseWriter)
Constants ¶
View Source
const ( RpcErrorCode_FirewallIsDisabled = 1 RpcErrorCode_IPAddressIsNotSet = 2 RpcErrorCode_BlockTimeIsNotSet = 3 )
Codes.
View Source
const ( RpcErrorMsg_FirewallIsDisabled = "Firewall is disabled" RpcErrorMsg_IPAddressIsNotSet = "IP address is not set" RpcErrorMsg_BlockTimeIsNotSet = "Block time is not set" )
Messages.
View Source
const ( // ACM. ApiFunctionName_RegisterUser = "registerUser" ApiFunctionName_GetListOfRegistrationsReadyForApproval = "getListOfRegistrationsReadyForApproval" ApiFunctionName_RejectRegistrationRequest = "rejectRegistrationRequest" ApiFunctionName_ApproveAndRegisterUser = "approveAndRegisterUser" ApiFunctionName_LogUserIn = "logUserIn" ApiFunctionName_LogUserOut = "logUserOut" ApiFunctionName_LogUserOutA = "logUserOutA" ApiFunctionName_GetListOfLoggedUsers = "getListOfLoggedUsers" ApiFunctionName_GetListOfLoggedUsersOnPage = "getListOfLoggedUsersOnPage" ApiFunctionName_GetListOfAllUsers = "getListOfAllUsers" ApiFunctionName_GetListOfAllUsersOnPage = "getListOfAllUsersOnPage" ApiFunctionName_IsUserLoggedIn = "isUserLoggedIn" ApiFunctionName_ChangePassword = "changePassword" ApiFunctionName_ChangeEmail = "changeEmail" ApiFunctionName_GetUserSession = "getUserSession" ApiFunctionName_GetUserName = "getUserName" ApiFunctionName_GetUserRoles = "getUserRoles" ApiFunctionName_ViewUserParameters = "viewUserParameters" ApiFunctionName_SetUserRoleAuthor = "setUserRoleAuthor" ApiFunctionName_SetUserRoleWriter = "setUserRoleWriter" ApiFunctionName_SetUserRoleReader = "setUserRoleReader" ApiFunctionName_GetSelfRoles = "getSelfRoles" ApiFunctionName_BanUser = "banUser" ApiFunctionName_UnbanUser = "unbanUser" // MM. ApiFunctionName_AddSection = "addSection" ApiFunctionName_ChangeSectionName = "changeSectionName" ApiFunctionName_ChangeSectionParent = "changeSectionParent" ApiFunctionName_GetSection = "getSection" ApiFunctionName_MoveSectionUp = "moveSectionUp" ApiFunctionName_MoveSectionDown = "moveSectionDown" ApiFunctionName_DeleteSection = "deleteSection" ApiFunctionName_AddForum = "addForum" ApiFunctionName_ChangeForumName = "changeForumName" ApiFunctionName_ChangeForumSection = "changeForumSection" ApiFunctionName_GetForum = "getForum" ApiFunctionName_MoveForumUp = "moveForumUp" ApiFunctionName_MoveForumDown = "moveForumDown" ApiFunctionName_DeleteForum = "deleteForum" ApiFunctionName_AddThread = "addThread" ApiFunctionName_ChangeThreadName = "changeThreadName" ApiFunctionName_ChangeThreadForum = "changeThreadForum" ApiFunctionName_GetThread = "getThread" ApiFunctionName_GetThreadNamesByIds = "getThreadNamesByIds" ApiFunctionName_MoveThreadUp = "moveThreadUp" ApiFunctionName_MoveThreadDown = "moveThreadDown" ApiFunctionName_DeleteThread = "deleteThread" ApiFunctionName_AddMessage = "addMessage" ApiFunctionName_ChangeMessageText = "changeMessageText" ApiFunctionName_ChangeMessageThread = "changeMessageThread" ApiFunctionName_GetMessage = "getMessage" ApiFunctionName_GetLatestMessageOfThread = "getLatestMessageOfThread" ApiFunctionName_DeleteMessage = "deleteMessage" ApiFunctionName_ListThreadAndMessages = "listThreadAndMessages" ApiFunctionName_ListThreadAndMessagesOnPage = "listThreadAndMessagesOnPage" ApiFunctionName_ListForumAndThreads = "listForumAndThreads" ApiFunctionName_ListForumAndThreadsOnPage = "listForumAndThreadsOnPage" ApiFunctionName_ListSectionsAndForums = "listSectionsAndForums" // NM. ApiFunctionName_AddNotification = "addNotification" ApiFunctionName_GetNotification = "getNotification" ApiFunctionName_GetNotifications = "getNotifications" ApiFunctionName_GetNotificationsOnPage = "getNotificationsOnPage" ApiFunctionName_GetUnreadNotifications = "getUnreadNotifications" ApiFunctionName_CountUnreadNotifications = "countUnreadNotifications" ApiFunctionName_MarkNotificationAsRead = "markNotificationAsRead" ApiFunctionName_DeleteNotification = "deleteNotification" ApiFunctionName_AddResource = "addResource" ApiFunctionName_GetResource = "getResource" ApiFunctionName_GetResourceValue = "getResourceValue" ApiFunctionName_GetListOfAllResourcesOnPage = "getListOfAllResourcesOnPage" ApiFunctionName_DeleteResource = "deleteResource" // SM. ApiFunctionName_AddSubscription = "addSubscription" ApiFunctionName_IsSelfSubscribed = "isSelfSubscribed" ApiFunctionName_IsUserSubscribed = "isUserSubscribed" ApiFunctionName_CountSelfSubscriptions = "countSelfSubscriptions" ApiFunctionName_GetSelfSubscriptions = "getSelfSubscriptions" ApiFunctionName_GetSelfSubscriptionsOnPage = "getSelfSubscriptionsOnPage" ApiFunctionName_GetUserSubscriptions = "getUserSubscriptions" ApiFunctionName_GetUserSubscriptionsOnPage = "getUserSubscriptionsOnPage" ApiFunctionName_DeleteSelfSubscription = "deleteSelfSubscription" ApiFunctionName_DeleteSubscription = "deleteSubscription" )
View Source
const ( ErrFUnknownRpcErrorCode = "unknown RPC error code: %v" ErrTypeCast = "type cast error" )
View Source
const ErrUrlIsTooShort = "URL is too short"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) AddMessage ¶
func (*Server) AddNotification ¶
func (*Server) AddResource ¶
func (*Server) AddSection ¶
func (*Server) AddSubscription ¶
func (*Server) ApproveAndRegisterUser ¶
func (*Server) BlockIPAddress ¶
func (srv *Server) BlockIPAddress(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) ChangeEmail ¶
func (*Server) ChangeForumName ¶
func (*Server) ChangeForumSection ¶
func (*Server) ChangeMessageText ¶
func (*Server) ChangeMessageThread ¶
func (*Server) ChangePassword ¶
func (*Server) ChangeSectionName ¶
func (*Server) ChangeSectionParent ¶
func (*Server) ChangeThreadForum ¶
func (*Server) ChangeThreadName ¶
func (*Server) CountSelfSubscriptions ¶
func (*Server) CountUnreadNotifications ¶
func (*Server) DeleteForum ¶
func (*Server) DeleteMessage ¶
func (*Server) DeleteNotification ¶
func (*Server) DeleteResource ¶
func (*Server) DeleteSection ¶
func (*Server) DeleteSelfSubscription ¶
func (*Server) DeleteSubscription ¶
func (*Server) DeleteThread ¶
func (*Server) GetLatestMessageOfThread ¶
func (*Server) GetListOfAllResourcesOnPage ¶
func (*Server) GetListOfAllUsers ¶
func (*Server) GetListOfAllUsersOnPage ¶
func (*Server) GetListOfLoggedUsers ¶
func (*Server) GetListOfLoggedUsersOnPage ¶
func (*Server) GetListOfRegistrationsReadyForApproval ¶
func (*Server) GetListenDsnExt ¶
func (*Server) GetListenDsnInt ¶
func (*Server) GetMessage ¶
func (*Server) GetMustStopAB ¶
func (*Server) GetNotification ¶
func (*Server) GetNotifications ¶
func (*Server) GetNotificationsOnPage ¶
func (*Server) GetResource ¶
func (*Server) GetResourceValue ¶
func (*Server) GetSection ¶
func (*Server) GetSelfRoles ¶
GetSelfRoles is a normal version of 'GetSelfRoles' RPC request for public usage. For internal purposes, use its internal variant – 'getSelfRoles'.
func (*Server) GetSelfSubscriptions ¶
func (*Server) GetSelfSubscriptionsOnPage ¶
func (*Server) GetStopChannel ¶
func (*Server) GetSubRoutinesWG ¶
func (*Server) GetThreadNamesByIds ¶
func (*Server) GetUnreadNotifications ¶
func (*Server) GetUserName ¶
func (*Server) GetUserRoles ¶
func (*Server) GetUserSession ¶
func (*Server) GetUserSubscriptions ¶
func (*Server) GetUserSubscriptionsOnPage ¶
func (*Server) IsIPAddressBlocked ¶
func (srv *Server) IsIPAddressBlocked(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) IsSelfSubscribed ¶
func (*Server) IsUserLoggedIn ¶
func (*Server) IsUserSubscribed ¶
func (*Server) ListForumAndThreads ¶
func (*Server) ListForumAndThreadsOnPage ¶
func (*Server) ListSectionsAndForums ¶
func (*Server) ListThreadAndMessages ¶
func (*Server) ListThreadAndMessagesOnPage ¶
func (*Server) LogUserOut ¶
func (*Server) LogUserOutA ¶
func (*Server) MarkNotificationAsRead ¶
func (*Server) MoveForumDown ¶
func (*Server) MoveForumUp ¶
func (*Server) MoveSectionDown ¶
func (*Server) MoveSectionUp ¶
func (*Server) MoveThreadDown ¶
func (*Server) MoveThreadUp ¶
func (*Server) Ping ¶
func (srv *Server) Ping(_ *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) RegisterUser ¶
func (*Server) RejectRegistrationRequest ¶
func (*Server) ReportStart ¶
func (srv *Server) ReportStart()
func (*Server) SetUserRoleAuthor ¶
func (*Server) SetUserRoleReader ¶
func (*Server) SetUserRoleWriter ¶
func (*Server) ShowDiagnosticData ¶
func (srv *Server) ShowDiagnosticData(params *json.RawMessage, _ *jrm1.ResponseMetaData) (result any, re *jrm1.RpcError)
func (*Server) UseConstructor ¶
func (*Server) ViewUserParameters ¶
Click to show internal directories.
Click to hide internal directories.