Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type File ¶
type File struct { Package string Name string Services []*Service Interceptors *Interceptors }
File represents a protobuf file.
func GetFile ¶
func GetFile(pb *descriptor.FileDescriptorProto) (f *File, err error)
GetFile parses `pb` and builds a `File` object from it. If the file does not define any service nor any interceptor option, it does not return anything.
type Interceptors ¶
type Interceptors struct {
Indexes []string
}
Interceptors defines interceptors to use.
func GetInterceptors ¶
func GetInterceptors(pb proto.Message, desc *proto.ExtensionDesc) (*Interceptors, error)
GetInterceptors extracts the `Interceptors` extension (described by `desc`) from `pb`.
type Method ¶
type Method struct { Package string Service string Method string Stream bool Interceptors *Interceptors }
Method represents a method from a grpc service.
func GetMethod ¶
func GetMethod(pb *descriptor.MethodDescriptorProto, service, pkg string) (method *Method, err error)
GetMethod parses `pb` and builds from it a `Method` object.
type Service ¶
type Service struct { Package string Service string Methods []*Method Interceptors *Interceptors }
Service represents a grpc service definition from a protobuf file.
func GetService ¶
func GetService(pb *descriptor.ServiceDescriptorProto, pkg string) (s *Service, err error)
GetService parses `pb` and builds a `Service` object from it.
Click to show internal directories.
Click to hide internal directories.