Documentation ¶
Index ¶
- Variables
- type Entry
- func (e *Entry) AddLabel(labels ...*Label) EntryDecorator
- func (*Entry) Descriptor() ([]byte, []int)deprecated
- func (e *Entry) DisableAuth() EntryDecorator
- func (e *Entry) DisablePermission() EntryDecorator
- func (e *Entry) EnableAuth() EntryDecorator
- func (e *Entry) EnablePermission() EntryDecorator
- func (x *Entry) GetAuditLog() bool
- func (x *Entry) GetAuthEnable() bool
- func (x *Entry) GetFunctionName() string
- func (x *Entry) GetGrpcPath() string
- func (x *Entry) GetLabels() map[string]string
- func (e *Entry) GetLableValue(key string) string
- func (x *Entry) GetMethod() string
- func (x *Entry) GetPath() string
- func (x *Entry) GetPermissionEnable() bool
- func (x *Entry) GetResource() string
- func (*Entry) ProtoMessage()
- func (x *Entry) ProtoReflect() protoreflect.Message
- func (x *Entry) Reset()
- func (x *Entry) String() string
- type EntryDecorator
- type EntrySet
- type Label
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// optional mcube.http.Entry rest_api = 20210228;
E_RestApi = &file_pb_http_entry_proto_extTypes[0]
)
Extension fields to descriptorpb.MethodOptions.
View Source
var File_pb_http_entry_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Entry ¶ added in v0.7.4
type Entry struct { // GRPC服务的路径 GrpcPath string `protobuf:"bytes,1,opt,name=grpc_path,json=grpcPath,proto3" json:"grpc_path" bson:"grpc_path"` // 函数名称 FunctionName string `protobuf:"bytes,2,opt,name=function_name,json=functionName,proto3" json:"function_name" bson:"function_name"` // HTTP path 用于自动生成http api Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path" bson:"path"` // HTTP method 用于自动生成http api Method string `protobuf:"bytes,4,opt,name=method,proto3" json:"method" bson:"method"` // 资源名称 Resource string `protobuf:"bytes,5,opt,name=resource,proto3" json:"resource" bson:"resource"` // 是否校验用户身份 (acccess_token) AuthEnable bool `protobuf:"varint,6,opt,name=auth_enable,json=authEnable,proto3" json:"auth_enable" bson:"auth_enable"` // 是否校验用户权限 PermissionEnable bool `protobuf:"varint,7,opt,name=permission_enable,json=permissionEnable,proto3" json:"permission_enable" bson:"permission_enable"` // 是否开启操作审计, 开启后这次操作将被记录 AuditLog bool `protobuf:"varint,9,opt,name=audit_log,json=auditLog,proto3" json:"audit_log" bson:"audit_log"` // 标签 Labels map[string]string `` /* 157-byte string literal not displayed */ // contains filtered or unexported fields }
Entry 路由条目
func (*Entry) AddLabel ¶ added in v0.7.4
func (e *Entry) AddLabel(labels ...*Label) EntryDecorator
AddLabel 添加Label
func (*Entry) Descriptor
deprecated
added in
v0.7.4
func (*Entry) DisableAuth ¶ added in v0.7.4
func (e *Entry) DisableAuth() EntryDecorator
DisableAuth 不启用身份验证
func (*Entry) DisablePermission ¶ added in v0.7.4
func (e *Entry) DisablePermission() EntryDecorator
DisablePermission 禁用授权验证
func (*Entry) EnableAuth ¶ added in v0.7.4
func (e *Entry) EnableAuth() EntryDecorator
EnableAuth 启动身份验证
func (*Entry) EnablePermission ¶ added in v0.7.4
func (e *Entry) EnablePermission() EntryDecorator
EnablePermission 启用授权验证
func (*Entry) GetAuditLog ¶ added in v0.8.6
func (*Entry) GetAuthEnable ¶ added in v0.7.4
func (*Entry) GetFunctionName ¶ added in v0.7.4
func (*Entry) GetGrpcPath ¶ added in v0.7.4
func (*Entry) GetLableValue ¶ added in v0.7.4
GetLableValue 获取Lable的值
func (*Entry) GetPermissionEnable ¶ added in v0.7.4
func (*Entry) GetResource ¶ added in v0.7.4
func (*Entry) ProtoMessage ¶ added in v0.7.4
func (*Entry) ProtoMessage()
func (*Entry) ProtoReflect ¶ added in v0.7.4
func (x *Entry) ProtoReflect() protoreflect.Message
type EntryDecorator ¶ added in v0.7.4
type EntryDecorator interface { // SetLabel 设置子路由标签, 作用于Entry上 AddLabel(...*Label) EntryDecorator EnableAuth() EntryDecorator DisableAuth() EntryDecorator EnablePermission() EntryDecorator DisablePermission() EntryDecorator }
EntryDecorator 装饰
type EntrySet ¶ added in v0.7.4
type EntrySet struct {
Items []*Entry `json:"items"`
}
EntrySet 路由条目集
func (*EntrySet) AuthEnableEntry ¶ added in v0.7.6
AuthEnableEntry todo
func (*EntrySet) PermissionEnableEntry ¶ added in v0.7.6
PermissionEnableEntry todo
Click to show internal directories.
Click to hide internal directories.