option_gen

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MyServiceM1Result_Success_DEFAULT string
View Source
var MyServiceM2Result_Success_DEFAULT string

Functions

func GetFileDescriptorForTest

func GetFileDescriptorForTest() *thrift_reflection.FileDescriptor

Types

type IDCard

type IDCard struct {
	Number string `thrift:"number,1,required" json:"number"`
	Age    int8   `thrift:"age,2,required" json:"age"`
}
var Person_ID_DEFAULT *IDCard

func NewIDCard

func NewIDCard() *IDCard

func (*IDCard) GetAge

func (p *IDCard) GetAge() (v int8)

func (*IDCard) GetDescriptor

func (p *IDCard) GetDescriptor() *thrift_reflection.StructDescriptor

func (*IDCard) GetNumber

func (p *IDCard) GetNumber() (v string)

func (*IDCard) Read

func (p *IDCard) Read(iprot thrift.TProtocol) (err error)

func (*IDCard) ReadField1

func (p *IDCard) ReadField1(iprot thrift.TProtocol) error

func (*IDCard) ReadField2

func (p *IDCard) ReadField2(iprot thrift.TProtocol) error

func (*IDCard) String

func (p *IDCard) String() string

func (*IDCard) Write

func (p *IDCard) Write(oprot thrift.TProtocol) (err error)

type MyEnum

type MyEnum int64
const (
	MyEnum_A MyEnum = 0
	MyEnum_B MyEnum = 1
)

func MyEnumFromString

func MyEnumFromString(s string) (MyEnum, error)

func MyEnumPtr

func MyEnumPtr(v MyEnum) *MyEnum

func (MyEnum) GetDescriptor

func (p MyEnum) GetDescriptor() *thrift_reflection.EnumDescriptor

func (*MyEnum) Scan

func (p *MyEnum) Scan(value interface{}) (err error)

func (MyEnum) String

func (p MyEnum) String() string

func (*MyEnum) Value

func (p *MyEnum) Value() (driver.Value, error)

type MyService

type MyService interface {
	M1(ctx context.Context) (r string, err error)

	M2(ctx context.Context) (r string, err error)
}

type MyServiceClient

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

func NewMyServiceClient

func NewMyServiceClient(c thrift.TClient) *MyServiceClient

func NewMyServiceClientProtocol

func NewMyServiceClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *MyServiceClient

func (*MyServiceClient) Client_

func (p *MyServiceClient) Client_() thrift.TClient

func (*MyServiceClient) M1

func (p *MyServiceClient) M1(ctx context.Context) (r string, err error)

func (*MyServiceClient) M2

func (p *MyServiceClient) M2(ctx context.Context) (r string, err error)

type MyServiceM1Args

type MyServiceM1Args struct {
}

func NewMyServiceM1Args

func NewMyServiceM1Args() *MyServiceM1Args

func (*MyServiceM1Args) Read

func (p *MyServiceM1Args) Read(iprot thrift.TProtocol) (err error)

func (*MyServiceM1Args) String

func (p *MyServiceM1Args) String() string

func (*MyServiceM1Args) Write

func (p *MyServiceM1Args) Write(oprot thrift.TProtocol) (err error)

type MyServiceM1Result

type MyServiceM1Result struct {
	Success *string `thrift:"success,0,optional" json:"success,omitempty"`
}

func NewMyServiceM1Result

func NewMyServiceM1Result() *MyServiceM1Result

func (*MyServiceM1Result) GetSuccess

func (p *MyServiceM1Result) GetSuccess() (v string)

func (*MyServiceM1Result) IsSetSuccess

func (p *MyServiceM1Result) IsSetSuccess() bool

func (*MyServiceM1Result) Read

func (p *MyServiceM1Result) Read(iprot thrift.TProtocol) (err error)

func (*MyServiceM1Result) ReadField0

func (p *MyServiceM1Result) ReadField0(iprot thrift.TProtocol) error

func (*MyServiceM1Result) String

func (p *MyServiceM1Result) String() string

func (*MyServiceM1Result) Write

func (p *MyServiceM1Result) Write(oprot thrift.TProtocol) (err error)

type MyServiceM2Args

type MyServiceM2Args struct {
}

func NewMyServiceM2Args

func NewMyServiceM2Args() *MyServiceM2Args

func (*MyServiceM2Args) Read

func (p *MyServiceM2Args) Read(iprot thrift.TProtocol) (err error)

func (*MyServiceM2Args) String

func (p *MyServiceM2Args) String() string

func (*MyServiceM2Args) Write

func (p *MyServiceM2Args) Write(oprot thrift.TProtocol) (err error)

type MyServiceM2Result

type MyServiceM2Result struct {
	Success *string `thrift:"success,0,optional" json:"success,omitempty"`
}

func NewMyServiceM2Result

func NewMyServiceM2Result() *MyServiceM2Result

func (*MyServiceM2Result) GetSuccess

func (p *MyServiceM2Result) GetSuccess() (v string)

func (*MyServiceM2Result) IsSetSuccess

func (p *MyServiceM2Result) IsSetSuccess() bool

func (*MyServiceM2Result) Read

func (p *MyServiceM2Result) Read(iprot thrift.TProtocol) (err error)

func (*MyServiceM2Result) ReadField0

func (p *MyServiceM2Result) ReadField0(iprot thrift.TProtocol) error

func (*MyServiceM2Result) String

func (p *MyServiceM2Result) String() string

func (*MyServiceM2Result) Write

func (p *MyServiceM2Result) Write(oprot thrift.TProtocol) (err error)

type MyServiceProcessor

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

func NewMyServiceProcessor

func NewMyServiceProcessor(handler MyService) *MyServiceProcessor

func (*MyServiceProcessor) AddToProcessorMap

func (p *MyServiceProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction)

func (*MyServiceProcessor) GetProcessorFunction

func (p *MyServiceProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool)

func (*MyServiceProcessor) Process

func (p *MyServiceProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException)

func (*MyServiceProcessor) ProcessorMap

func (p *MyServiceProcessor) ProcessorMap() map[string]thrift.TProcessorFunction

type Person

type Person struct {
	Name string  `thrift:"name,1,required" json:"name"`
	ID   *IDCard `thrift:"id,2,required" json:"id"`
}

func NewPerson

func NewPerson() *Person

func (*Person) GetDescriptor

func (p *Person) GetDescriptor() *thrift_reflection.StructDescriptor

func (*Person) GetID

func (p *Person) GetID() (v *IDCard)

func (*Person) GetName

func (p *Person) GetName() (v string)

func (*Person) IsSetID

func (p *Person) IsSetID() bool

func (*Person) Read

func (p *Person) Read(iprot thrift.TProtocol) (err error)

func (*Person) ReadField1

func (p *Person) ReadField1(iprot thrift.TProtocol) error

func (*Person) ReadField2

func (p *Person) ReadField2(iprot thrift.TProtocol) error

func (*Person) String

func (p *Person) String() string

func (*Person) Write

func (p *Person) Write(oprot thrift.TProtocol) (err error)

type PersonB

type PersonB struct {
}

func NewPersonB

func NewPersonB() *PersonB

func (*PersonB) GetDescriptor

func (p *PersonB) GetDescriptor() *thrift_reflection.StructDescriptor

func (*PersonB) Read

func (p *PersonB) Read(iprot thrift.TProtocol) (err error)

func (*PersonB) String

func (p *PersonB) String() string

func (*PersonB) Write

func (p *PersonB) Write(oprot thrift.TProtocol) (err error)

type PersonC

type PersonC struct {
}

func NewPersonC

func NewPersonC() *PersonC

func (*PersonC) GetDescriptor

func (p *PersonC) GetDescriptor() *thrift_reflection.StructDescriptor

func (*PersonC) Read

func (p *PersonC) Read(iprot thrift.TProtocol) (err error)

func (*PersonC) String

func (p *PersonC) String() string

func (*PersonC) Write

func (p *PersonC) Write(oprot thrift.TProtocol) (err error)

type TinyStruct

type TinyStruct struct {
	B1 bool `thrift:"b1,1,required" json:"b1"`
	B2 bool `thrift:"b2,2,required" json:"b2"`
}

func NewTinyStruct

func NewTinyStruct() *TinyStruct

func (*TinyStruct) GetB1

func (p *TinyStruct) GetB1() (v bool)

func (*TinyStruct) GetB2

func (p *TinyStruct) GetB2() (v bool)

func (*TinyStruct) GetDescriptor

func (p *TinyStruct) GetDescriptor() *thrift_reflection.StructDescriptor

func (*TinyStruct) Read

func (p *TinyStruct) Read(iprot thrift.TProtocol) (err error)

func (*TinyStruct) ReadField1

func (p *TinyStruct) ReadField1(iprot thrift.TProtocol) error

func (*TinyStruct) ReadField2

func (p *TinyStruct) ReadField2(iprot thrift.TProtocol) error

func (*TinyStruct) String

func (p *TinyStruct) String() string

func (*TinyStruct) Write

func (p *TinyStruct) Write(oprot thrift.TProtocol) (err error)

Directories

Path Synopsis
annotation

Jump to

Keyboard shortcuts

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