sourceinfo

package
v1.42.1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractAPIOptions

func ExtractAPIOptions(meth *descriptorpb.MethodDescriptorProto) (*options.HttpRule, error)

Extract the google.api.http option more details here vendor/google.golang.org/genproto/googleapis/api/annotations/http.pb.go

func ExtractOpenApiFieldOptions

func ExtractOpenApiFieldOptions(field *descriptorpb.FieldDescriptorProto) (*openapi_v3.Schema, error)

func ExtractOpenApiMessageOptions

func ExtractOpenApiMessageOptions(message *descriptorpb.DescriptorProto) (*openapi_v3.Schema, error)

Types

type ApiOptionInfo

type ApiOptionInfo struct {
	Info       *descriptorpb.SourceCodeInfo_Location
	ApiOptions *options.HttpRule
}

type EnumInfo

type EnumInfo struct {
	Name       string
	Info       *descriptorpb.SourceCodeInfo_Location
	ValuesInfo []ValueInfo
	AllowAlias bool
	Message    descriptorpb.EnumDescriptorProto
	Package    string
}

type FieldInfo

type FieldInfo struct {
	Name              string
	Info              *descriptorpb.SourceCodeInfo_Location
	Field             *descriptorpb.FieldDescriptorProto
	Message           *descriptorpb.DescriptorProto
	Package           string
	OpenApiProperties *openapi_v3.Schema
}

type MessageInfo

type MessageInfo struct {
	Name           string
	Info           *descriptorpb.SourceCodeInfo_Location
	FieldInfos     []FieldInfo
	Message        descriptorpb.DescriptorProto
	Package        string
	OpenApiSchema  *openapi_v3.Schema
	NestedMessages []MessageInfo
	ParentOfNested *MessageInfo
}

type MethodInfo

type MethodInfo struct {
	Name     string
	Info     *descriptorpb.SourceCodeInfo_Location
	Method   *descriptorpb.MethodDescriptorProto
	Service  *descriptorpb.ServiceDescriptorProto // link the parent service
	HttpRule *ApiOptionInfo
}

type ServiceInfo

type ServiceInfo struct {
	Name    string
	Info    *descriptorpb.SourceCodeInfo_Location
	Service *descriptorpb.ServiceDescriptorProto
	Methods []MethodInfo
	Package string
}

type SourceInfo

type SourceInfo struct {
	Messages            []MessageInfo
	InlineMessages      []MessageInfo
	Enums               []EnumInfo
	InlineEnums         []EnumInfo
	Services            []ServiceInfo
	FileDescriptorProto *descriptorpb.FileDescriptorProto
	Package             string
	Path                string //  path without the file
}

func GetSourceInfo

func GetSourceInfo(descr *descriptorpb.FileDescriptorProto) SourceInfo

type ValueInfo

type ValueInfo struct {
	Name  string
	Value int32
	Info  *descriptorpb.SourceCodeInfo_Location
}

Jump to

Keyboard shortcuts

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