thrift_option

package
v0.3.18 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrKeyNotMatch    = errors.New("key not matched")
	ErrNotExistOption = errors.New("option does not exist")
	ErrParseFailed    = errors.New("failed to parse option")
	ErrNotAllowOption = errors.New("not allowed to parse option")
	ErrNotIncluded    = errors.New("no such prefix found in the given include IDLs")
)

Functions

func CheckOptionGrammar

func CheckOptionGrammar(ast *parser.Thrift) error

func KeyNotMatchError

func KeyNotMatchError(optionName string) error

func NotAllowError

func NotAllowError(optionName string) error

func NotExistError

func NotExistError(optionName string) error

func NotIncludedError

func NotIncludedError(optionName string) error

func ParseFailedError

func ParseFailedError(optionName string, reason error) error

Types

type AnnotationMeta

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

type EnumOption

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

func NewEnumOption

func NewEnumOption(filepath, name string) *EnumOption

func (EnumOption) GetFilepath

func (o EnumOption) GetFilepath() string

func (EnumOption) GetName

func (o EnumOption) GetName() string

func (EnumOption) GetType

func (o EnumOption) GetType() string

type EnumValueOption

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

func NewEnumValueOption

func NewEnumValueOption(filepath, name string) *EnumValueOption

func (EnumValueOption) GetFilepath

func (o EnumValueOption) GetFilepath() string

func (EnumValueOption) GetName

func (o EnumValueOption) GetName() string

func (EnumValueOption) GetType

func (o EnumValueOption) GetType() string

type FieldOption

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

func NewFieldOption

func NewFieldOption(filepath, name string) *FieldOption

func (FieldOption) GetFilepath

func (o FieldOption) GetFilepath() string

func (FieldOption) GetName

func (o FieldOption) GetName() string

func (FieldOption) GetType

func (o FieldOption) GetType() string

type MethodOption

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

func NewMethodOption

func NewMethodOption(filepath, name string) *MethodOption

func (MethodOption) GetFilepath

func (o MethodOption) GetFilepath() string

func (MethodOption) GetName

func (o MethodOption) GetName() string

func (MethodOption) GetType

func (o MethodOption) GetType() string

type OptionData

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

func GetEnumOption

func GetEnumOption(s *thrift_reflection.EnumDescriptor, os *EnumOption) (val *OptionData, err error)

func GetEnumValueOption

func GetEnumValueOption(s *thrift_reflection.EnumValueDescriptor, os *EnumValueOption) (val *OptionData, err error)

func GetFieldOption

func GetFieldOption(s *thrift_reflection.FieldDescriptor, os *FieldOption) (val *OptionData, err error)

func GetMethodOption

func GetMethodOption(s *thrift_reflection.MethodDescriptor, os *MethodOption) (val *OptionData, err error)

func GetServiceOption

func GetServiceOption(s *thrift_reflection.ServiceDescriptor, os *ServiceOption) (val *OptionData, err error)

func GetStructOption

func GetStructOption(s *thrift_reflection.StructDescriptor, os *StructOption) (val *OptionData, err error)

func ParseEnumOption

func ParseEnumOption(e *thrift_reflection.EnumDescriptor, optionName string) (option *OptionData, err error)

func ParseEnumValueOption

func ParseEnumValueOption(ev *thrift_reflection.EnumValueDescriptor, optionName string) (option *OptionData, err error)

func ParseFieldOption

func ParseFieldOption(field *thrift_reflection.FieldDescriptor, optionName string) (option *OptionData, err error)

func ParseMethodOption

func ParseMethodOption(f *thrift_reflection.MethodDescriptor, optionName string) (option *OptionData, err error)

func ParseServiceOption

func ParseServiceOption(s *thrift_reflection.ServiceDescriptor, optionName string) (option *OptionData, err error)

func ParseStructOption

func ParseStructOption(structLike *thrift_reflection.StructDescriptor, annotationName string) (option *OptionData, err error)

func (*OptionData) GetFieldValue

func (o *OptionData) GetFieldValue(name string) (interface{}, error)

func (*OptionData) GetInstance

func (o *OptionData) GetInstance() interface{}

func (*OptionData) GetName

func (o *OptionData) GetName() interface{}

func (*OptionData) GetValue

func (o *OptionData) GetValue() interface{}

func (*OptionData) IsFieldSet

func (o *OptionData) IsFieldSet(name string) (bool, error)

type OptionError

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

func (*OptionError) Error

func (e *OptionError) Error() string

func (*OptionError) Unwrap

func (e *OptionError) Unwrap() error

type OptionGetter

type OptionGetter interface {
	GetName() string
	GetFilepath() string
	GetType() string
}

type ServiceOption

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

func NewServiceOption

func NewServiceOption(filepath, name string) *ServiceOption

func (ServiceOption) GetFilepath

func (o ServiceOption) GetFilepath() string

func (ServiceOption) GetName

func (o ServiceOption) GetName() string

func (ServiceOption) GetType

func (o ServiceOption) GetType() string

type StructOption

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

func NewStructOption

func NewStructOption(filepath, name string) *StructOption

func (StructOption) GetFilepath

func (o StructOption) GetFilepath() string

func (StructOption) GetName

func (o StructOption) GetName() string

func (StructOption) GetType

func (o StructOption) GetType() string

Directories

Path Synopsis
runtime_test

Jump to

Keyboard shortcuts

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