exampb

package
v0.0.0-...-d853fe5 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EchoProperty_TableName string = "EchoProperty"

	EchoProperty_Text  model.FieldName = "Text"
	EchoProperty_Test  model.FieldName = "Test"
	EchoProperty_Test2 model.FieldName = "Test2"
	EchoProperty_Test3 model.FieldName = "Test3"
	EchoProperty_Test4 model.FieldName = "Test4"
	EchoProperty_Test5 model.FieldName = "Test5"
	EchoProperty_Test6 model.FieldName = "Test6"
	EchoProperty_TEST7 model.FieldName = "TEST7"
	EchoProperty_Test8 model.FieldName = "Test8"
	EchoProperty_Test9 model.FieldName = "Test9"
)

Variables

View Source
var (
	Enum_name = map[int32]string{
		0: "XXX",
		1: "XXX2",
	}
	Enum_value = map[string]int32{
		"XXX":  0,
		"XXX2": 1,
	}
)

Enum value maps for Enum.

View Source
var ClientEntityDesc = entity.EntityDesc{
	TypeName:    "exampb.ClientEntity",
	HandlerType: (*ClientEntity)(nil),
	Methods: map[string]entity.MethodDesc{

		"SayHello": {
			MethodName:   "SayHello",
			Handler:      _ClientEntity_SayHello_Remote_Handler,
			LocalHandler: _ClientEntity_SayHello_Local_Handler,
		},
	},

	Metadata: "exam.proto",
}
View Source
var EchoEtyEntityDesc = entity.EntityDesc{
	TypeName:    "exampb.EchoEtyEntity",
	HandlerType: (*EchoEtyEntity)(nil),
	Methods: map[string]entity.MethodDesc{

		"SayHello": {
			MethodName:   "SayHello",
			Handler:      _EchoEtyEntity_SayHello_Remote_Handler,
			LocalHandler: _EchoEtyEntity_SayHello_Local_Handler,
		},
	},

	Metadata: "exam.proto",
}
View Source
var EchoServiceDesc = entity.EntityDesc{
	TypeName:    "exampb.EchoService",
	HandlerType: (*EchoService)(nil),
	Methods: map[string]entity.MethodDesc{

		"SayHello": {
			MethodName:   "SayHello",
			Handler:      _EchoService_SayHello_Remote_Handler,
			LocalHandler: _EchoService_SayHello_Local_Handler,
		},
	},

	Metadata: "exam.proto",
}
View Source
var EchoSvc2ServiceDesc = entity.EntityDesc{
	TypeName:    "exampb.EchoSvc2Service",
	HandlerType: (*EchoSvc2Service)(nil),
	Methods: map[string]entity.MethodDesc{

		"SayHello": {
			MethodName:   "SayHello",
			Handler:      _EchoSvc2Service_SayHello_Remote_Handler,
			LocalHandler: _EchoSvc2Service_SayHello_Local_Handler,
		},
	},

	Metadata: "exam.proto",
}
View Source
var NoRespEntityDesc = entity.EntityDesc{
	TypeName:    "exampb.NoRespEntity",
	HandlerType: (*NoRespEntity)(nil),
	Methods: map[string]entity.MethodDesc{

		"SayHello": {
			MethodName:   "SayHello",
			Handler:      _NoRespEntity_SayHello_Remote_Handler,
			LocalHandler: _NoRespEntity_SayHello_Local_Handler,
		},
	},

	Metadata: "exam.proto",
}

Functions

func RegisterClientEntity

func RegisterClientEntity(etyMgr *entity.EntityManager, impl ClientEntity)

func RegisterEchoEtyEntity

func RegisterEchoEtyEntity(etyMgr *entity.EntityManager, impl EchoEtyEntity)

func RegisterEchoService

func RegisterEchoService(etyMgr *entity.EntityManager, impl EchoService)

func RegisterEchoSvc2Service

func RegisterEchoSvc2Service(etyMgr *entity.EntityManager, impl EchoSvc2Service)

func RegisterNoRespEntity

func RegisterNoRespEntity(etyMgr *entity.EntityManager, impl NoRespEntity)

Types

type Client

type Client struct {
	EntityID entity.EntityID
}

func NewClient

func NewClient(c entity.Context) (*Client, error)

func NewClientClient

func NewClientClient(eid entity.EntityID) *Client

func NewClientWithID

func NewClientWithID(c entity.Context, id entity.EntityID) (*Client, error)

func (*Client) SayHello

func (t *Client) SayHello(c entity.Context, req *SayHelloRequest) (*SayHelloResponse, error)

type ClientEntity

type ClientEntity interface {
	entity.IEntity

	// SayHello
	SayHello(c entity.Context, req *SayHelloRequest) (*SayHelloResponse, error)
}

ClientEntity 客户端

type Echo

type Echo struct {
}

func NewEchoClient

func NewEchoClient() *Echo

func (*Echo) SayHello

func (t *Echo) SayHello(c entity.Context, req *SayHelloRequest) (*SayHelloResponse, error)

type EchoEty

type EchoEty struct {
	EntityID entity.EntityID
}

func NewEchoEty

func NewEchoEty(c entity.Context) (*EchoEty, error)

func NewEchoEtyClient

func NewEchoEtyClient(eid entity.EntityID) *EchoEty

func NewEchoEtyWithID

func NewEchoEtyWithID(c entity.Context, id entity.EntityID) (*EchoEty, error)

func (*EchoEty) SayHello

func (t *EchoEty) SayHello(c entity.Context, req *SayHelloRequest) (*SayHelloResponse, error)

type EchoEtyEntity

type EchoEtyEntity interface {
	entity.IEntity

	// SayHello
	SayHello(c entity.Context, req *SayHelloRequest) (*SayHelloResponse, error)
}

EchoEtyEntity

type EchoProperty

type EchoProperty struct {
	Text  string           `protobuf:"bytes,1,opt,name=Text,proto3" json:"Text,omitempty" bson:"_id"`
	Test  *SayHelloRequest `protobuf:"bytes,2,opt,name=test,proto3" json:"test,omitempty" bson:"test"`
	Test2 []*empty.Empty   `protobuf:"bytes,3,rep,name=test2,proto3" json:"test2,omitempty" bson:"test2"` //先不支持import类型
	Test3 map[int32]string ``                                                                             /* 165-byte string literal not displayed */
	Test4 []byte           `protobuf:"bytes,5,opt,name=test4,proto3" json:"test4,omitempty" bson:"test4"`
	Test5 int64            `protobuf:"fixed64,6,opt,name=test5,proto3" json:"test5,omitempty" bson:"test5"`
	Test6 int32            `protobuf:"fixed32,7,opt,name=test6,proto3" json:"test6,omitempty" bson:"test6"`
	TEST7 Enum             `protobuf:"varint,8,opt,name=TEST7,proto3,enum=exampb.Enum" json:"TEST7,omitempty" bson:"TEST7"`
	Test8 int32            `protobuf:"zigzag32,9,opt,name=test8,proto3" json:"test8,omitempty" bson:"test8"`
	Test9 []int32          `protobuf:"zigzag32,10,rep,packed,name=test9,proto3" json:"test9,omitempty" bson:"test9"`
	// contains filtered or unexported fields
}

func (*EchoProperty) Descriptor deprecated

func (*EchoProperty) Descriptor() ([]byte, []int)

Deprecated: Use EchoProperty.ProtoReflect.Descriptor instead.

func (*EchoProperty) GetTEST7

func (x *EchoProperty) GetTEST7() Enum

func (*EchoProperty) GetTest

func (x *EchoProperty) GetTest() *SayHelloRequest

func (*EchoProperty) GetTest2

func (x *EchoProperty) GetTest2() []*empty.Empty

func (*EchoProperty) GetTest3

func (x *EchoProperty) GetTest3() map[int32]string

func (*EchoProperty) GetTest4

func (x *EchoProperty) GetTest4() []byte

func (*EchoProperty) GetTest5

func (x *EchoProperty) GetTest5() int64

func (*EchoProperty) GetTest6

func (x *EchoProperty) GetTest6() int32

func (*EchoProperty) GetTest8

func (x *EchoProperty) GetTest8() int32

func (*EchoProperty) GetTest9

func (x *EchoProperty) GetTest9() []int32

func (*EchoProperty) GetText

func (x *EchoProperty) GetText() string

func (*EchoProperty) ProtoMessage

func (*EchoProperty) ProtoMessage()

func (*EchoProperty) ProtoReflect

func (x *EchoProperty) ProtoReflect() protoreflect.Message

func (*EchoProperty) Reset

func (x *EchoProperty) Reset()

func (*EchoProperty) String

func (x *EchoProperty) String() string

func (*EchoProperty) TableName

func (m *EchoProperty) TableName() string

type EchoPropertyModel

type EchoPropertyModel struct {
	EchoProperty
	// contains filtered or unexported fields
}

func (*EchoPropertyModel) Destroy

func (m *EchoPropertyModel) Destroy(c context.Context)

func (*EchoPropertyModel) ModelAddWatcher

func (m *EchoPropertyModel) ModelAddWatcher(c context.Context, s model.Watcher)

func (*EchoPropertyModel) ModelAutoSave

func (m *EchoPropertyModel) ModelAutoSave(c context.Context) error

func (*EchoPropertyModel) ModelInit

func (m *EchoPropertyModel) ModelInit(c context.Context, db db.IDatabase) error

func (*EchoPropertyModel) ModelLoad

func (m *EchoPropertyModel) ModelLoad(c context.Context) error

func (*EchoPropertyModel) ModelSave

func (m *EchoPropertyModel) ModelSave(c context.Context) error

func (*EchoPropertyModel) ModelStopWatcher

func (m *EchoPropertyModel) ModelStopWatcher(c context.Context)

func (*EchoPropertyModel) SetTEST7

func (m *EchoPropertyModel) SetTEST7(v Enum)

func (*EchoPropertyModel) SetTest

func (m *EchoPropertyModel) SetTest(v *SayHelloRequest)

func (*EchoPropertyModel) SetTest2

func (m *EchoPropertyModel) SetTest2(v []*empty.Empty)

func (*EchoPropertyModel) SetTest3

func (m *EchoPropertyModel) SetTest3(v map[int32]string)

func (*EchoPropertyModel) SetTest4

func (m *EchoPropertyModel) SetTest4(v []byte)

func (*EchoPropertyModel) SetTest5

func (m *EchoPropertyModel) SetTest5(v int64)

func (*EchoPropertyModel) SetTest6

func (m *EchoPropertyModel) SetTest6(v int32)

func (*EchoPropertyModel) SetTest8

func (m *EchoPropertyModel) SetTest8(v int32)

func (*EchoPropertyModel) SetTest9

func (m *EchoPropertyModel) SetTest9(v []int32)

func (*EchoPropertyModel) SetText

func (m *EchoPropertyModel) SetText(v string)

type EchoService

type EchoService interface {
	entity.IService

	// SayHello
	SayHello(c entity.Context, req *SayHelloRequest) (*SayHelloResponse, error)
}

EchoService

type EchoSvc2

type EchoSvc2 struct {
}

func NewEchoSvc2Client

func NewEchoSvc2Client() *EchoSvc2

func (*EchoSvc2) SayHello

func (t *EchoSvc2) SayHello(c entity.Context, req *SayHelloRequest) (*SayHelloResponse, error)

type EchoSvc2Service

type EchoSvc2Service interface {
	entity.IService

	// SayHello
	SayHello(c entity.Context, req *SayHelloRequest) (*SayHelloResponse, error)
}

EchoSvc2Service

type Enum

type Enum int32
const (
	Enum_XXX  Enum = 0
	Enum_XXX2 Enum = 1
)

func (Enum) Descriptor

func (Enum) Descriptor() protoreflect.EnumDescriptor

func (Enum) Enum

func (x Enum) Enum() *Enum

func (Enum) EnumDescriptor deprecated

func (Enum) EnumDescriptor() ([]byte, []int)

Deprecated: Use Enum.Descriptor instead.

func (Enum) Number

func (x Enum) Number() protoreflect.EnumNumber

func (Enum) String

func (x Enum) String() string

func (Enum) Type

func (Enum) Type() protoreflect.EnumType

type NoResp

type NoResp struct {
	EntityID entity.EntityID
}

func NewNoResp

func NewNoResp(c entity.Context) (*NoResp, error)

func NewNoRespClient

func NewNoRespClient(eid entity.EntityID) *NoResp

func NewNoRespWithID

func NewNoRespWithID(c entity.Context, id entity.EntityID) (*NoResp, error)

func (*NoResp) SayHello

func (t *NoResp) SayHello(c entity.Context, req *SayHelloRequest) error

type NoRespEntity

type NoRespEntity interface {
	entity.IEntity

	// SayHello
	SayHello(c entity.Context, req *SayHelloRequest) error
}

NoRespEntity 客户端

type SayHelloRequest

type SayHelloRequest struct {
	Text     string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty" bson:"text"`
	CLientID uint64 `protobuf:"varint,2,opt,name=CLientID,proto3" json:"CLientID,omitempty" bson:"CLientID"`
	// contains filtered or unexported fields
}

func (*SayHelloRequest) Descriptor deprecated

func (*SayHelloRequest) Descriptor() ([]byte, []int)

Deprecated: Use SayHelloRequest.ProtoReflect.Descriptor instead.

func (*SayHelloRequest) GetCLientID

func (x *SayHelloRequest) GetCLientID() uint64

func (*SayHelloRequest) GetText

func (x *SayHelloRequest) GetText() string

func (*SayHelloRequest) ProtoMessage

func (*SayHelloRequest) ProtoMessage()

func (*SayHelloRequest) ProtoReflect

func (x *SayHelloRequest) ProtoReflect() protoreflect.Message

func (*SayHelloRequest) Reset

func (x *SayHelloRequest) Reset()

func (*SayHelloRequest) String

func (x *SayHelloRequest) String() string

type SayHelloResponse

type SayHelloResponse struct {
	Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty" bson:"text"`
	// contains filtered or unexported fields
}

func (*SayHelloResponse) Descriptor deprecated

func (*SayHelloResponse) Descriptor() ([]byte, []int)

Deprecated: Use SayHelloResponse.ProtoReflect.Descriptor instead.

func (*SayHelloResponse) GetText

func (x *SayHelloResponse) GetText() string

func (*SayHelloResponse) ProtoMessage

func (*SayHelloResponse) ProtoMessage()

func (*SayHelloResponse) ProtoReflect

func (x *SayHelloResponse) ProtoReflect() protoreflect.Message

func (*SayHelloResponse) Reset

func (x *SayHelloResponse) Reset()

func (*SayHelloResponse) String

func (x *SayHelloResponse) String() string

Jump to

Keyboard shortcuts

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