vevent

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package vevent 虚拟事件

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HookCtxCaller

func HookCtxCaller(ctx *zero.Ctx, hook zero.APICaller)

HookCtxCaller change ctx's caller to hook

Types

type APICallerHook

type APICallerHook struct {
	// contains filtered or unexported fields
}

APICallerHook is a caller middleware

func NewAPICallerHook

func NewAPICallerHook(ctx *zero.Ctx, callback func(rsp zero.APIResponse, err error)) (v *APICallerHook)

NewAPICallerHook hook ctx's caller

func (*APICallerHook) CallApi

func (v *APICallerHook) CallApi(request zero.APIRequest) (rsp zero.APIResponse, err error)

CallApi call original caller and pass rsp to callback nolint: stylecheck, revive

type Ctx

type Ctx struct {
	Event *zero.Event
	State zero.State
	// contains filtered or unexported fields
}

Ctx represents the Context which hold the event. 代表上下文 nolint: unused

Jump to

Keyboard shortcuts

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