endpoint

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppName = "endpoint"
)

Variables

View Source
var File_apps_endpoint_pb_endpoint_proto protoreflect.FileDescriptor
View Source
var Service_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "keyauth.endpoint.Service",
	HandlerType: (*ServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "RegistryEndpoint",
			Handler:    _Service_RegistryEndpoint_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "apps/endpoint/pb/endpoint.proto",
}

Service_ServiceDesc is the grpc.ServiceDesc for Service service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterServiceServer

func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)

Types

type Endpoint

type Endpoint struct {

	// @gotags: json:"service"  bson:"service"
	Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service" bson:"service"`
	// @gotags: json:"methods"  bson:"methods"
	Methods string `protobuf:"bytes,2,opt,name=methods,proto3" json:"methods" bson:"methods"`
	// @gotags: json:"path"  bson:"path"
	Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path" bson:"path"`
	// @gotags: json:"resource"  bson:"resource"
	Resource string `protobuf:"bytes,4,opt,name=resource,proto3" json:"resource" bson:"resource"`
	// @gotags: json:"meta"  bson:"meta"
	Meta map[string]string `` /* 151-byte string literal not displayed */
	// @gotags: json:"action"  bson:"action"
	Action string `protobuf:"bytes,6,opt,name=action,proto3" json:"action" bson:"action"`
	// contains filtered or unexported fields
}

func NewEndpoint

func NewEndpoint() *Endpoint

func (*Endpoint) Descriptor deprecated

func (*Endpoint) Descriptor() ([]byte, []int)

Deprecated: Use Endpoint.ProtoReflect.Descriptor instead.

func (*Endpoint) GetAction

func (x *Endpoint) GetAction() string

func (*Endpoint) GetMeta

func (x *Endpoint) GetMeta() map[string]string

func (*Endpoint) GetMethods

func (x *Endpoint) GetMethods() string

func (*Endpoint) GetPath

func (x *Endpoint) GetPath() string

func (*Endpoint) GetResource

func (x *Endpoint) GetResource() string

func (*Endpoint) GetService

func (x *Endpoint) GetService() string

func (*Endpoint) ProtoMessage

func (*Endpoint) ProtoMessage()

func (*Endpoint) ProtoReflect

func (x *Endpoint) ProtoReflect() protoreflect.Message

func (*Endpoint) Reset

func (x *Endpoint) Reset()

func (*Endpoint) String

func (x *Endpoint) String() string

type EndpointSet

type EndpointSet struct {

	// @gotags: json:"service"  bson:"service"
	Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service" bson:"service"`
	// @gotags: json:"endpoints"  bson:"endpoints"
	Endpoints []*Endpoint `protobuf:"bytes,1,rep,name=endpoints,proto3" json:"endpoints" bson:"endpoints"`
	// contains filtered or unexported fields
}

func NewEndpointSet

func NewEndpointSet(service string) *EndpointSet

修改构造函数

func (*EndpointSet) Add added in v1.0.9

func (e *EndpointSet) Add(end *Endpoint)

func (*EndpointSet) Descriptor deprecated

func (*EndpointSet) Descriptor() ([]byte, []int)

Deprecated: Use EndpointSet.ProtoReflect.Descriptor instead.

func (*EndpointSet) GetEndpoints

func (x *EndpointSet) GetEndpoints() []*Endpoint

func (*EndpointSet) GetService

func (x *EndpointSet) GetService() string

func (*EndpointSet) ProtoMessage

func (*EndpointSet) ProtoMessage()

func (*EndpointSet) ProtoReflect

func (x *EndpointSet) ProtoReflect() protoreflect.Message

func (*EndpointSet) Reset

func (x *EndpointSet) Reset()

func (*EndpointSet) String

func (x *EndpointSet) String() string

func (*EndpointSet) ToDocs

func (e *EndpointSet) ToDocs() (Docs []interface{})

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 NewResponseEndpoint

func NewResponseEndpoint(msg string) *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 Service

type Service interface {
	ServiceServer
	QueryEndpoint()
}

type ServiceClient

type ServiceClient interface {
	RegistryEndpoint(ctx context.Context, in *EndpointSet, opts ...grpc.CallOption) (*RegistryResponse, error)
}

ServiceClient is the client API for Service 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 NewServiceClient

func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient

type ServiceServer

type ServiceServer interface {
	RegistryEndpoint(context.Context, *EndpointSet) (*RegistryResponse, error)
	// contains filtered or unexported methods
}

ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility

type UnimplementedServiceServer

type UnimplementedServiceServer struct {
}

UnimplementedServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedServiceServer) RegistryEndpoint

type UnsafeServiceServer

type UnsafeServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServiceServer will result in compilation errors.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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