source

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArgumentOption

type ArgumentOption struct {
	Idx    int
	Name   bool
	By     bool
	Inline bool
}

ArgumentOption represents message argument location of grpc.federation.message option.

type CallExprOption added in v0.6.0

type CallExprOption struct {
	Method  bool
	Request *RequestOption
	Timeout bool
	Retry   *RetryOption
}

CallExprOption represents def.call location of grpc.federation.message option.

type Enum

type Enum struct {
	Name   string
	Option *EnumOption
	Value  *EnumValue
}

Enum represents enum location.

type EnumOption

type EnumOption struct {
	Alias bool
}

EnumOption represents grpc.federation.enum option location.

type EnumValue

type EnumValue struct {
	Value  string
	Option *EnumValueOption
}

EnumValue represents enum value location.

type EnumValueOption

type EnumValueOption struct {
	Alias   bool
	Default bool
}

EnumValueOption represents grpc.federation.enum_value option location.

type Field

type Field struct {
	Name   string
	Option *FieldOption
}

Field represents message field location.

type FieldOneof added in v0.3.0

type FieldOneof struct {
	If                  bool
	Default             bool
	VariableDefinitions *VariableDefinitionOption
	By                  bool
}

FieldOneof represents grpc.federation.field.oneof location.

type FieldOption

type FieldOption struct {
	By    bool
	Alias bool
	Oneof *FieldOneof
}

FieldOption represents grpc.federation.field option location.

type File

type File struct {
	// contains filtered or unexported fields
}

func NewFile

func NewFile(path string, content []byte) (*File, error)

func (*File) AST

func (f *File) AST() *ast.FileNode

func (*File) Content

func (f *File) Content() []byte

func (*File) FindLocationByPos

func (f *File) FindLocationByPos(pos Position) *Location

FindLocationByPos returns the corresponding location information from the position in the source code.

func (*File) Imports

func (f *File) Imports() []string

func (*File) NodeInfoByLocation

func (f *File) NodeInfoByLocation(loc *Location) *ast.NodeInfo

NodeInfoByLocation returns information about the node at the position specified by location in the AST of the Protocol Buffers.

func (*File) Path

func (f *File) Path() string

func (*File) SemanticTokenTypeMap

func (f *File) SemanticTokenTypeMap() map[ast.Token]protocol.SemanticTokenTypes

type IteratorOption added in v0.6.0

type IteratorOption struct {
	Name   bool
	Source bool
}

IteratorOption represents def.map.iterator location of grpc.federation.message option.

type Location

type Location struct {
	FileName  string
	GoPackage bool
	Service   *Service
	Message   *Message
	Enum      *Enum
}

Location represents semantic location information for grpc federation option.

func CallExprMethodLocation added in v0.6.0

func CallExprMethodLocation(fileName, msgName string, defIdx int) *Location

CallExprMethodLocation creates location for def.call.method in grpc.federation.message.

func CallExprRequestByLocation added in v0.6.0

func CallExprRequestByLocation(fileName, msgName string, defIdx, reqIdx int) *Location

CallExprRequestByLocation creates location for def.call.request.by in grpc.federation.message.

func EnumAliasLocation

func EnumAliasLocation(fileName, msgName, enumName string) *Location

EnumAliasLocation creates location for alias in grpc.federation.enum option.

func EnumLocation

func EnumLocation(fileName, msgName, enumName string) *Location

EnumLocation creates location for enum.

func EnumOptionLocation

func EnumOptionLocation(fileName, msgName, enumName string) *Location

EnumOptionLocation creates location for grpc.federation.enum option.

func EnumValueAliasLocation

func EnumValueAliasLocation(fileName, msgName, enumName, enumValueName string) *Location

EnumValueAliasLocation creates location for alias in grpc.federation.enum_value option.

func EnumValueLocation

func EnumValueLocation(fileName, msgName, enumName, enumValueName string) *Location

EnumValueLocation creates location for enum value.

func EnumValueOptionLocation

func EnumValueOptionLocation(fileName, msgName, enumName, enumValueName string) *Location

EnumValueOptionLocation creates location for grpc.federation.enum_value option.

func FileLocation

func FileLocation(fileName string) *Location

FileLocation creates location for file.

func GoPackageLocation

func GoPackageLocation(fileName string) *Location

GoPackageLocation creates location for go_package option.

func MapExprByLocation added in v0.6.0

func MapExprByLocation(fileName, msgName string, defIdx int) *Location

MapExprByLocation creates location for def.map.by in grpc.federation.message.

func MapExprMessageLocation added in v0.7.1

func MapExprMessageLocation(fileName, msgName string, defIdx int) *Location

MapExprMessageLocation creates location for def.map.message in grpc.federation.message.

func MapExprMessageNameLocation added in v0.7.1

func MapExprMessageNameLocation(fileName, msgName string, defIdx int) *Location

MapExprMessageNameLocation creates location for def.map.message.name in grpc.federation.message.

func MapIteratorNameLocation added in v0.6.0

func MapIteratorNameLocation(fileName, msgName string, defIdx int) *Location

MapIteratorNameLocation creates location for def.map.iterator.name in grpc.federation.message.

func MapIteratorSourceLocation added in v0.6.0

func MapIteratorSourceLocation(fileName, msgName string, defIdx int) *Location

MapIteratorSourceLocation creates location for def.map.iterator.src in grpc.federation.message.

func MapMessageExprArgumentByLocation added in v0.6.0

func MapMessageExprArgumentByLocation(fileName, msgName string, defIdx, argIdx int) *Location

MapMessageExprArgumentByLocation creates location for def.map.message.args[*].by in grpc.federation.message.

func MapMessageExprArgumentInlineLocation added in v0.6.0

func MapMessageExprArgumentInlineLocation(fileName, msgName string, defIdx, argIdx int) *Location

MapMessageExprArgumentInlineLocation creates location for def.map.message.args[*].inline in grpc.federation.message.

func MessageAliasLocation

func MessageAliasLocation(fileName, msgName string) *Location

MessageAliasLocation creates location for alias in grpc.federaiton.message option.

func MessageExprArgumentByLocation added in v0.6.0

func MessageExprArgumentByLocation(fileName, msgName string, idx, argIdx int) *Location

MessageExprArgumentByLocation creates location for messages[*].args[*].by in grpc.federation.message.

func MessageExprArgumentInlineLocation added in v0.6.0

func MessageExprArgumentInlineLocation(fileName, msgName string, idx, argIdx int) *Location

MessageExprArgumentInlineLocation creates location for def[*].message.args[*].inline in grpc.federation.message.

func MessageExprArgumentLocation added in v0.7.0

func MessageExprArgumentLocation(fileName, msgName string, idx, argIdx int) *Location

MessageExprArgumentLocation creates location for def[*].message.args[*] in grpc.federation.message.

func MessageExprArgumentNameLocation added in v0.7.0

func MessageExprArgumentNameLocation(fileName, msgName string, idx, argIdx int) *Location

MessageExprArgumentNameLocation creates location for def[*].message.args[*].name in grpc.federation.message.

func MessageExprLocation added in v0.6.0

func MessageExprLocation(fileName, msgName string, defIdx int) *Location

MessageExprLocation creates location for def[*].message in grpc.federation.message.

func MessageExprNameLocation added in v0.6.0

func MessageExprNameLocation(fileName, msgName string, idx int) *Location

MessageExprNameLocation creates location for def[*].message.name in grpc.federation.message.

func MessageFieldByLocation

func MessageFieldByLocation(fileName, msgName, fieldName string) *Location

MessageFieldByLocation creates location for by in grpc.federation.field option.

func MessageFieldLocation

func MessageFieldLocation(fileName, msgName, fieldName string) *Location

MessageFieldLocation creates location for message field.

func MessageFieldOneofByLocation added in v0.3.0

func MessageFieldOneofByLocation(fileName, msgName, fieldName string) *Location

MessageFieldOneofByLocation creates location for by in grpc.federation.field.oneof option.

func MessageFieldOneofDefMessageArgumentLocation added in v0.7.0

func MessageFieldOneofDefMessageArgumentLocation(fileName, msgName, fieldName string, idx, argIdx int) *Location

MessageFieldOneofDefMessageArgumentLocation creates location for def[*].message.args[*] in grpc.federation.field.oneof.

func MessageFieldOneofDefMessageLocation added in v0.7.0

func MessageFieldOneofDefMessageLocation(fileName, msgName, fieldName string, idx int) *Location

MessageFieldOneofDefMessageLocation creates location for def[*].message in grpc.federation.field.oneof.

func MessageFieldOneofDefaultLocation added in v0.3.0

func MessageFieldOneofDefaultLocation(fileName, msgName, fieldName string) *Location

MessageFieldOneofDefaultLocation creates location for default in grpc.federation.field.oneof option.

func MessageFieldOneofIfLocation added in v0.7.0

func MessageFieldOneofIfLocation(fileName, msgName, fieldName string) *Location

MessageFieldOneofIfLocation creates location for if in grpc.federation.field.oneof option.

func MessageFieldOneofLocation added in v0.3.0

func MessageFieldOneofLocation(fileName, msgName, fieldName string) *Location

MessageFieldOneofLocation creates location for oneof in grpc.federation.field option.

func MessageFieldOptionLocation

func MessageFieldOptionLocation(fileName, msgName, fieldName string) *Location

MessageFieldOptionLocation creates location for grpc.federation.field option.

func MessageLocation

func MessageLocation(fileName, msgName string) *Location

MessageLocation creates location for message name.

func MessageOptionLocation

func MessageOptionLocation(fileName, msgName string) *Location

MessageOptionLocation creates location for grpc.federaiton.message option.

func MethodLocation

func MethodLocation(fileName, msgName string, idx int) *Location

MethodLocation creates location for def[*].call.method in grpc.federation.message.

func MethodRetryConstantIntervalLocation

func MethodRetryConstantIntervalLocation(fileName, msgName string, idx int) *Location

MethodRetryConstantIntervalLocation creates location for def[*].call.retry.constant.interval in grpc.federation.message.

func MethodRetryExponentialInitialIntervalLocation

func MethodRetryExponentialInitialIntervalLocation(fileName, msgName string, idx int) *Location

MethodRetryExponentialInitialIntervalLocation creates location for def[*].call.retry.exponential.initial_interval in grpc.federation.message.

func MethodRetryExponentialMaxIntervalLocation

func MethodRetryExponentialMaxIntervalLocation(fileName, msgName string, idx int) *Location

MethodRetryExponentialMaxIntervalLocation creates location for def[*].call.retry.exponential.max_interval in grpc.federation.message.

func MethodTimeoutLocation

func MethodTimeoutLocation(fileName, msgName string, idx int) *Location

MethodTimeoutLocation creates location for def[*].call.timeout in grpc.federation.message.

func OneofOptionLocation

func OneofOptionLocation(fileName, msgName, oneofName string) *Location

OneofOptionLocation creates location for grpc.federaiton.oneof option.

func RequestByLocation

func RequestByLocation(fileName, msgName string, defIdx, reqIdx int) *Location

RequestByLocation creates location for def[*].call.request[*].by in grpc.federation.message.

func RequestFieldLocation

func RequestFieldLocation(fileName, msgName string, defIdx, reqIdx int) *Location

RequestFieldLocation creates location for def[*].call.request[*].field in grpc.federation.message.

func ServiceDependencyLocation

func ServiceDependencyLocation(fileName, svcName string, idx int) *Location

ServiceDependencyLocation creates location for service dependencies.

func ServiceDependencyNameLocation

func ServiceDependencyNameLocation(fileName, svcName string, idx int) *Location

ServiceDependencyNameLocation creates location for name of service dependencies.

func ServiceDependencyServiceLocation

func ServiceDependencyServiceLocation(fileName, svcName string, idx int) *Location

ServiceDependencyServiceLocation creates location for service of service dependencies.

func ServiceLocation

func ServiceLocation(fileName, svcName string) *Location

ServiceLocation creates location for service name.

func ServiceMethodLocation

func ServiceMethodLocation(fileName, svcName, methodName string) *Location

ServiceMethodLocation creates location for method of service.

func ServiceMethodOptionLocation

func ServiceMethodOptionLocation(fileName, svcName, methodName string) *Location

ServiceMethodOptionLocation creates location for grpc.federation.method option.

func ServiceMethodRequestLocation

func ServiceMethodRequestLocation(fileName, svcName, methodName string) *Location

ServiceMethodRequestLocation creates location for method request type of service.

func ServiceMethodResponseLocation

func ServiceMethodResponseLocation(fileName, svcName, methodName string) *Location

ServiceMethodResponseLocation creates location for method response type of service.

func ServiceMethodTimeoutLocation

func ServiceMethodTimeoutLocation(fileName, svcName, methodName string) *Location

ServiceMethodTimeoutLocation creates location for timeout of grpc.federation.method option.

func ServiceOptionLocation

func ServiceOptionLocation(fileName, svcName string) *Location

ServiceOptionLocation creates location for grpc.federation.service option.

func ValidationDetailBadRequestLocation added in v0.7.0

func ValidationDetailBadRequestLocation(fileName, msgName string, vIdx, dIdx, bIdx, fvIdx int, fieldName string) *Location

ValidationDetailBadRequestLocation creates location for def[*].validation.error.details[*].bad_request[*] in grpc.federation.message.

func ValidationDetailLocalizedMessageLocation added in v0.7.0

func ValidationDetailLocalizedMessageLocation(fileName, msgName string, vIdx, dIdx, lIdx int, fieldName string) *Location

ValidationDetailLocalizedMessageLocation creates location for def[*].validation.error.details[*].localized_message[*] in grpc.federation.message.

func ValidationDetailLocation added in v0.7.0

func ValidationDetailLocation(fileName, msgName string, vIdx, dIdx int, ifExpr bool) *Location

ValidationDetailLocation creates location for def[*].validation.error.details[*] in grpc.federation.message.

func ValidationDetailPreconditionFailureLocation added in v0.7.0

func ValidationDetailPreconditionFailureLocation(fileName, msgName string, vIdx, dIdx, fIdx, fvIdx int, fieldName string) *Location

ValidationDetailPreconditionFailureLocation creates location for def[*].validation.error.details[*].precondition_failure[*] in grpc.federation.message.

func ValidationLocation added in v0.7.0

func ValidationLocation(fileName, msgName string, idx int, ifExpr bool) *Location

ValidationLocation creates location for def[*].validation in grpc.federation.message.

func VariableDefinitionByLocation added in v0.6.0

func VariableDefinitionByLocation(fileName, msgName string, defIdx int) *Location

VariableDefinitionByLocation creates location for def.by in grpc.federation.message.

func VariableDefinitionIfLocation added in v0.7.2

func VariableDefinitionIfLocation(fileName, msgName string, defIdx int) *Location

VariableDefinitionIfLocation creates location for def.if in grpc.federation.message.

func VariableDefinitionLocation added in v0.6.0

func VariableDefinitionLocation(fileName, msgName string, defIdx int) *Location

VariableDefinitionLocation creates location for def in grpc.federation.message.

func VariableDefinitionValidationDetailMessageArgumentLocation added in v0.7.0

func VariableDefinitionValidationDetailMessageArgumentLocation(fileName, msgName string, defIdx, detIdx, msgIdx, argIdx int) *Location

VariableDefinitionValidationDetailMessageArgumentLocation creates location for def.validation[*].error.details[*].message[*].args[*] in grpc.federation.message.

func VariableDefinitionValidationDetailMessageLocation added in v0.7.0

func VariableDefinitionValidationDetailMessageLocation(fileName, msgName string, defIdx, detIdx, msgIdx int) *Location

VariableDefinitionValidationDetailMessageLocation creates location for def.validation[*].error.details[*].message[*] in grpc.federation.message.

func VariableDefinitionValidationDetailMessageNameLocation added in v0.7.0

func VariableDefinitionValidationDetailMessageNameLocation(fileName, msgName string, defIdx, detIdx, msgIdx int) *Location

VariableDefinitionValidationDetailMessageNameLocation creates location for def.validation[*].error.details[*].message[*] in grpc.federation.message.

type MapExprOption added in v0.6.0

type MapExprOption struct {
	Iterator *IteratorOption
	By       bool
	Message  *MessageExprOption
}

MapExprOption represents def.map location of grpc.federation.message option.

type Message

type Message struct {
	Name   string
	Option *MessageOption
	Field  *Field
	Enum   *Enum
	Oneof  *Oneof
}

Message represents message location.

type MessageExprOption added in v0.6.0

type MessageExprOption struct {
	Name bool
	Args *ArgumentOption
}

MessageExprOption represents def.message location of grpc.federation.message option.

type MessageOption

type MessageOption struct {
	VariableDefinitions *VariableDefinitionOption
	Alias               bool
}

MessageOption represents grpc.federation.message option location.

type Method

type Method struct {
	Name     string
	Request  bool
	Response bool
	Option   *MethodOption
}

Method represents service's method location.

type MethodOption

type MethodOption struct {
	Timeout bool
}

MethodOption represents grpc.federation.method option location.

type Oneof

type Oneof struct {
	Name   string
	Option *OneofOption
}

type OneofOption

type OneofOption struct {
}

type Position

type Position struct {
	Line int
	Col  int
}

Position represents source position in proto file.

type RequestOption

type RequestOption struct {
	Idx   int
	Field bool
	By    bool
}

RequestOption represents resolver.request location of grpc.federation.message option.

type RetryConstantOption

type RetryConstantOption struct {
	Interval   bool
	MaxRetries bool
}

RetryConstantOption represents resolver.retry.constant location of grpc.federation.message option.

type RetryExponentialOption

type RetryExponentialOption struct {
	InitialInterval     bool
	RandomizationFactor bool
	Multiplier          bool
	MaxInterval         bool
	MaxRetries          bool
}

RetryExponentialOption represents resolver.retry.exponential location of grpc.federation.message option.

type RetryOption

type RetryOption struct {
	Constant    *RetryConstantOption
	Exponential *RetryExponentialOption
}

RetryOption represents resolver.retry location of grpc.federation.message option.

type Service

type Service struct {
	Name   string
	Method *Method
	Option *ServiceOption
}

Service represents service location.

type ServiceDependencyOption

type ServiceDependencyOption struct {
	Idx     int
	Name    bool
	Service bool
}

ServiceDependencyOption represents dependencies option of service option.

type ServiceOption

type ServiceOption struct {
	Dependencies *ServiceDependencyOption
}

ServiceOption represents grpc.federation.service option location.

type ValidationDetailBadRequestFieldViolationOption added in v0.7.0

type ValidationDetailBadRequestFieldViolationOption struct {
	Idx       int
	FieldName string
}

type ValidationDetailBadRequestOption added in v0.7.0

type ValidationDetailBadRequestOption struct {
	Idx            int
	FieldViolation ValidationDetailBadRequestFieldViolationOption
}

type ValidationDetailLocalizedMessageOption added in v0.7.0

type ValidationDetailLocalizedMessageOption struct {
	Idx       int
	FieldName string
}

type ValidationDetailMessageOption added in v0.7.0

type ValidationDetailMessageOption struct {
	Idx     int
	Message *MessageExprOption
}

type ValidationDetailOption added in v0.7.0

type ValidationDetailOption struct {
	Idx                 int
	If                  bool
	Message             *ValidationDetailMessageOption
	PreconditionFailure *ValidationDetailPreconditionFailureOption
	BadRequest          *ValidationDetailBadRequestOption
	LocalizedMessage    *ValidationDetailLocalizedMessageOption
}

type ValidationDetailPreconditionFailureOption added in v0.7.0

type ValidationDetailPreconditionFailureOption struct {
	Idx       int
	Violation ValidationDetailPreconditionFailureViolationOption
}

type ValidationDetailPreconditionFailureViolationOption added in v0.7.0

type ValidationDetailPreconditionFailureViolationOption struct {
	Idx       int
	FieldName string
}

type ValidationExprOption added in v0.7.0

type ValidationExprOption struct {
	Name   bool
	If     bool
	Detail *ValidationDetailOption
}

type VariableDefinitionOption added in v0.6.0

type VariableDefinitionOption struct {
	Idx        int
	Name       bool
	If         bool
	By         bool
	Map        *MapExprOption
	Call       *CallExprOption
	Message    *MessageExprOption
	Validation *ValidationExprOption
}

VariableDefinitionOption represents def location of grpc.federation.message option.

Jump to

Keyboard shortcuts

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