Documentation ¶
Overview ¶
Package KaguyaKernel: The opensource instant messaging framework.
Copyright 2021 Star Inc.(https://starinc.xyz) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
View Source
const ( ErrorJSONDecodingRequest = "JSON_decoding_request_error" ErrorInvalidRequestType = "Request_type_is_invalid" )
View Source
const ( ErrorJSONEncodingResponseData = "JSON_encoding_response_data_error" ErrorJSONEncodingResponse = "JSON_encoding_response_error" ErrorGenerateSignature = "Generate_signature_error" ErrorSessionClosed = "Session_closed_error" )
View Source
const ErrorForbidden = "Forbidden"
Variables ¶
This section is empty.
Functions ¶
func Run ¶
func Run(service ServiceInterface, guard AuthorizeInterface, requestSalt string) *melody.Melody
Types ¶
type AuthorizeInterface ¶
type ErrorReport ¶
type RethinkConfig ¶
type RethinkConfig struct { ConnectConfig Rethink.ConnectOpts DatabaseName string }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) CheckRequestType ¶
func (*Service) GetGuard ¶
func (service *Service) GetGuard() AuthorizeInterface
func (*Service) GetSession ¶
func (*Service) SetGuard ¶
func (service *Service) SetGuard(authorization AuthorizeInterface)
func (*Service) SetSession ¶
type ServiceInterface ¶
type ServiceInterface interface { Fetch(context.Context) CheckPermission() bool GetGuard() AuthorizeInterface SetGuard(authorization AuthorizeInterface) GetSession() *Session SetSession(session *Session) CheckRequestType(method reflect.Value) bool }
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func NewSession ¶
func (*Session) RaiseError ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.