Documentation
¶
Index ¶
- Constants
- type HyperConn
- func (v *HyperConn) AuthMiddleware(c *fiber.Ctx) error
- func (v *HyperConn) CheckPermGranted(atk string, key string, val []byte) error
- func (v *HyperConn) DoAuthenticate(atk, rtk string) (acc *proto.UserInfo, accessTk string, refreshTk string, err error)
- func (v *HyperConn) EnsureAuthenticated(c *fiber.Ctx) error
- func (v *HyperConn) EnsureGrantedPerm(c *fiber.Ctx, key string, val any) error
- func (v *HyperConn) GetDealerGrpcConn() *grpc.ClientConn
- func (v *HyperConn) GetServiceGrpcConn(t string) (*grpc.ClientConn, error)
- func (v *HyperConn) KeepRegisterService() error
- func (v *HyperConn) RegisterService() error
- type NetworkPackage
Constants ¶
View Source
const ( ServiceTypeAuthProvider = "auth" ServiceTypeFileProvider = "files" ServiceTypeInteractiveProvider = "interactive" ServiceTypeMessagingProvider = "messaging" )
View Source
const CookieAtk = "__hydrogen_atk"
View Source
const CookieRtk = "__hydrogen_rtk"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HyperConn ¶
type HyperConn struct { Addr string Info *proto.ServiceInfo // contains filtered or unexported fields }
func NewHyperConn ¶
func NewHyperConn(addr string, info *proto.ServiceInfo) (*HyperConn, error)
func (*HyperConn) AuthMiddleware ¶
func (*HyperConn) CheckPermGranted ¶
func (*HyperConn) DoAuthenticate ¶
func (*HyperConn) EnsureAuthenticated ¶
func (*HyperConn) EnsureGrantedPerm ¶
func (*HyperConn) GetDealerGrpcConn ¶
func (v *HyperConn) GetDealerGrpcConn() *grpc.ClientConn
func (*HyperConn) GetServiceGrpcConn ¶
func (v *HyperConn) GetServiceGrpcConn(t string) (*grpc.ClientConn, error)
func (*HyperConn) KeepRegisterService ¶
func (*HyperConn) RegisterService ¶
type NetworkPackage ¶
type NetworkPackage struct { Action string `json:"w"` Endpoint string `json:"e,omitempty"` Message string `json:"m,omitempty"` Payload any `json:"p"` }
func (NetworkPackage) Marshal ¶
func (v NetworkPackage) Marshal() []byte
func (NetworkPackage) RawPayload ¶
func (v NetworkPackage) RawPayload() []byte
Click to show internal directories.
Click to hide internal directories.