webannotation

package
v0.0.0-...-d930fad Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package webannotation webannotation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(msg proto.Message, f AnnotationFunc)

Register 注册,部分为防止循环引用使用这种方式

Types

type Annotation

type Annotation struct {
	Perms map[string]Perm `json:"perms"`
}

Annotation 注解类型

type AnnotationFunc

type AnnotationFunc func(context.Context, *kit.Kit, auth.Authorizer, proto.Message) (*Annotation, error)

AnnotationFunc 函数类型

func GetAnnotationFunc

func GetAnnotationFunc(msg proto.Message) (AnnotationFunc, bool)

GetAnnotationFunc 获取 msg 已注册的函数

type AnnotationInterface

type AnnotationInterface interface {
	Annotation(context.Context, *kit.Kit, auth.Authorizer) (*Annotation, error)
}

AnnotationInterface 接口

type Perm

type Perm map[string]bool

Perm 类型

Jump to

Keyboard shortcuts

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