Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterRPCServer(s grpc.ServiceRegistrar, srv RPCServer)
- type Endpiont
- func (*Endpiont) Descriptor() ([]byte, []int)deprecated
- func (x *Endpiont) GetAction() string
- func (x *Endpiont) GetLabels() map[string]string
- func (x *Endpiont) GetMethod() string
- func (x *Endpiont) GetPath() string
- func (x *Endpiont) GetResource() string
- func (*Endpiont) ProtoMessage()
- func (x *Endpiont) ProtoReflect() protoreflect.Message
- func (x *Endpiont) Reset()
- func (x *Endpiont) String() string
- type EndpiontSet
- func (*EndpiontSet) Descriptor() ([]byte, []int)deprecated
- func (x *EndpiontSet) GetEndpoints() []*Endpiont
- func (x *EndpiontSet) GetService() string
- func (*EndpiontSet) ProtoMessage()
- func (x *EndpiontSet) ProtoReflect() protoreflect.Message
- func (x *EndpiontSet) Reset()
- func (x *EndpiontSet) String() string
- func (s *EndpiontSet) ToDocs() (docs []interface{})
- type RPCClient
- type RPCServer
- type RegistryResponse
- type Service
- type UnimplementedRPCServer
- type UnsafeRPCServer
Constants ¶
const (
AppName = "authendpoint"
)
const (
RPC_RegistryEndpoint_FullMethodName = "/keyauth.authendpoint.RPC/RegistryEndpoint"
)
Variables ¶
var File_apps_authendpoint_pb_authendpoint_proto protoreflect.FileDescriptor
var RPC_ServiceDesc = grpc.ServiceDesc{ ServiceName: "keyauth.authendpoint.RPC", HandlerType: (*RPCServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "RegistryEndpoint", Handler: _RPC_RegistryEndpoint_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "apps/authendpoint/pb/authendpoint.proto", }
RPC_ServiceDesc is the grpc.ServiceDesc for RPC service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterRPCServer ¶
func RegisterRPCServer(s grpc.ServiceRegistrar, srv RPCServer)
Types ¶
type Endpiont ¶
type Endpiont struct { // 资源名称, 路由装饰定义 // @gotags: json:"resource" bson:"resource" Resource string `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource" bson:"resource"` // 资源操作方法 // @gotags: json:"action" bson:"action" Action string `protobuf:"bytes,3,opt,name=action,proto3" json:"action" bson:"action"` // 该接口的标签, 该功能的标签 // @gotags: json:"labels" bson:"labels" Labels map[string]string `` /* 157-byte string literal not displayed */ // HTTP 路由定义 // @gotags: json:"path" bson:"path" Path string `protobuf:"bytes,5,opt,name=path,proto3" json:"path" bson:"path"` // HTTP 路由定义 // @gotags: json:"method" bson:"method" Method string `protobuf:"bytes,6,opt,name=method,proto3" json:"method" bson:"method"` // contains filtered or unexported fields }
服务功能
func (*Endpiont) Descriptor
deprecated
func (*Endpiont) GetResource ¶
func (*Endpiont) ProtoMessage ¶
func (*Endpiont) ProtoMessage()
func (*Endpiont) ProtoReflect ¶
func (x *Endpiont) ProtoReflect() protoreflect.Message
type EndpiontSet ¶
type EndpiontSet struct { // 服务名称 // @gotags: json:"service" bson:"service" Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service" bson:"service"` // 服务功能 // @gotags: json:"endpoints" bson:"endpoints" Endpoints []*Endpiont `protobuf:"bytes,2,rep,name=endpoints,proto3" json:"endpoints" bson:"endpoints"` // contains filtered or unexported fields }
服务功能列表
func (*EndpiontSet) Descriptor
deprecated
func (*EndpiontSet) Descriptor() ([]byte, []int)
Deprecated: Use EndpiontSet.ProtoReflect.Descriptor instead.
func (*EndpiontSet) GetEndpoints ¶
func (x *EndpiontSet) GetEndpoints() []*Endpiont
func (*EndpiontSet) GetService ¶
func (x *EndpiontSet) GetService() string
func (*EndpiontSet) ProtoMessage ¶
func (*EndpiontSet) ProtoMessage()
func (*EndpiontSet) ProtoReflect ¶
func (x *EndpiontSet) ProtoReflect() protoreflect.Message
func (*EndpiontSet) Reset ¶
func (x *EndpiontSet) Reset()
func (*EndpiontSet) String ¶
func (x *EndpiontSet) String() string
func (*EndpiontSet) ToDocs ¶
func (s *EndpiontSet) ToDocs() (docs []interface{})
type RPCClient ¶
type RPCClient interface { // 服务功能注册 RegistryEndpoint(ctx context.Context, in *EndpiontSet, opts ...grpc.CallOption) (*RegistryResponse, error) }
RPCClient is the client API for RPC service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewRPCClient ¶
func NewRPCClient(cc grpc.ClientConnInterface) RPCClient
type RPCServer ¶
type RPCServer interface { // 服务功能注册 RegistryEndpoint(context.Context, *EndpiontSet) (*RegistryResponse, error) // contains filtered or unexported methods }
RPCServer is the server API for RPC service. All implementations must embed UnimplementedRPCServer for forward compatibility
type RegistryResponse ¶
type RegistryResponse struct { // 注册返回 // @gotags: json:"message" bson:"message" Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message" bson:"message"` // contains filtered or unexported fields }
func NewRegistryResponse ¶
func NewRegistryResponse() *RegistryResponse
func (*RegistryResponse) Descriptor
deprecated
func (*RegistryResponse) Descriptor() ([]byte, []int)
Deprecated: Use RegistryResponse.ProtoReflect.Descriptor instead.
func (*RegistryResponse) GetMessage ¶
func (x *RegistryResponse) GetMessage() string
func (*RegistryResponse) ProtoMessage ¶
func (*RegistryResponse) ProtoMessage()
func (*RegistryResponse) ProtoReflect ¶
func (x *RegistryResponse) ProtoReflect() protoreflect.Message
func (*RegistryResponse) Reset ¶
func (x *RegistryResponse) Reset()
func (*RegistryResponse) String ¶
func (x *RegistryResponse) String() string
type UnimplementedRPCServer ¶
type UnimplementedRPCServer struct { }
UnimplementedRPCServer must be embedded to have forward compatible implementations.
func (UnimplementedRPCServer) RegistryEndpoint ¶
func (UnimplementedRPCServer) RegistryEndpoint(context.Context, *EndpiontSet) (*RegistryResponse, error)
type UnsafeRPCServer ¶
type UnsafeRPCServer interface {
// contains filtered or unexported methods
}
UnsafeRPCServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RPCServer will result in compilation errors.