Documentation ¶
Index ¶
- Variables
- func CheckOptionGrammar(ast *parser.Thrift) error
- func KeyNotMatchError(optionName string) error
- func NotAllowError(optionName string) error
- func NotExistError(optionName string) error
- func NotIncludedError(optionName string) error
- func ParseFailedError(optionName string, reason error) error
- type AnnotationMeta
- type EnumOption
- type EnumValueOption
- type FieldOption
- type MethodOption
- type OptionData
- func GetEnumOption(s *thrift_reflection.EnumDescriptor, os *EnumOption) (val *OptionData, err error)
- func GetEnumValueOption(s *thrift_reflection.EnumValueDescriptor, os *EnumValueOption) (val *OptionData, err error)
- func GetFieldOption(s *thrift_reflection.FieldDescriptor, os *FieldOption) (val *OptionData, err error)
- func GetMethodOption(s *thrift_reflection.MethodDescriptor, os *MethodOption) (val *OptionData, err error)
- func GetServiceOption(s *thrift_reflection.ServiceDescriptor, os *ServiceOption) (val *OptionData, err error)
- func GetStructOption(s *thrift_reflection.StructDescriptor, os *StructOption) (val *OptionData, err error)
- func ParseEnumOption(e *thrift_reflection.EnumDescriptor, optionName string) (option *OptionData, err error)
- func ParseEnumValueOption(ev *thrift_reflection.EnumValueDescriptor, optionName string) (option *OptionData, err error)
- func ParseFieldOption(field *thrift_reflection.FieldDescriptor, optionName string) (option *OptionData, err error)
- func ParseMethodOption(f *thrift_reflection.MethodDescriptor, optionName string) (option *OptionData, err error)
- func ParseServiceOption(s *thrift_reflection.ServiceDescriptor, optionName string) (option *OptionData, err error)
- func ParseStructOption(structLike *thrift_reflection.StructDescriptor, annotationName string) (option *OptionData, err error)
- type OptionError
- type OptionGetter
- type ServiceOption
- type StructOption
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 KeyNotMatchError ¶
func NotAllowError ¶
func NotExistError ¶
func NotIncludedError ¶
func ParseFailedError ¶
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
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
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
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
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 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
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
Click to show internal directories.
Click to hide internal directories.