model

package
v0.2.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

Functions

func RegisterAllComponents

func RegisterAllComponents(s *gogs.App, srv Component)

Types

type BaseWorld

type BaseWorld struct {

	// don't care the filed name, we never use it
	// but you should be careful about the filed number
	BindUser    *BindUser    `protobuf:"bytes,1,opt,name=BindUser,proto3" json:"BindUser,omitempty"`
	BindSuccess *BindSuccess `protobuf:"bytes,2,opt,name=BindSuccess,proto3" json:"BindSuccess,omitempty"`
	// contains filtered or unexported fields
}

componetns, all the messages are used for communication between the client and the server

func (*BaseWorld) Descriptor deprecated

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

Deprecated: Use BaseWorld.ProtoReflect.Descriptor instead.

func (*BaseWorld) GetBindSuccess

func (x *BaseWorld) GetBindSuccess() *BindSuccess

func (*BaseWorld) GetBindUser

func (x *BaseWorld) GetBindUser() *BindUser

func (*BaseWorld) ProtoMessage

func (*BaseWorld) ProtoMessage()

func (*BaseWorld) ProtoReflect

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

func (*BaseWorld) Reset

func (x *BaseWorld) Reset()

func (*BaseWorld) String

func (x *BaseWorld) String() string

type BindSuccess

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

it is only used for messages sent from the server to the client the server will not receive the message and will not generate the corresponding method @gogs:ServerMessage

func (*BindSuccess) Descriptor deprecated

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

Deprecated: Use BindSuccess.ProtoReflect.Descriptor instead.

func (*BindSuccess) ProtoMessage

func (*BindSuccess) ProtoMessage()

func (*BindSuccess) ProtoReflect

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

func (*BindSuccess) Reset

func (x *BindSuccess) Reset()

func (*BindSuccess) String

func (x *BindSuccess) String() string

type BindUser

type BindUser struct {
	Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
	// contains filtered or unexported fields
}

common message the message is used for the client and the server to communicate the corresponding method will be generated according to this message

func (*BindUser) Descriptor deprecated

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

Deprecated: Use BindUser.ProtoReflect.Descriptor instead.

func (*BindUser) GetUid

func (x *BindUser) GetUid() string

func (*BindUser) ProtoMessage

func (*BindUser) ProtoMessage()

func (*BindUser) ProtoReflect

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

func (*BindUser) Reset

func (x *BindUser) Reset()

func (*BindUser) String

func (x *BindUser) String() string

type Component

type Component interface {
	BindUser(ctx context.Context, s *session.Session, in *BindUser)
}

type Components

type Components struct {

	// don't care the filed name, we never use it
	// but you should be careful about the filed number
	BaseWorld *BaseWorld `protobuf:"bytes,1,opt,name=BaseWorld,proto3" json:"BaseWorld,omitempty"`
	// contains filtered or unexported fields
}

the Main Components only have one, include some child componetns all the message in this struct is the componetns @gogs:Components

func (*Components) Descriptor deprecated

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

Deprecated: Use Components.ProtoReflect.Descriptor instead.

func (*Components) GetBaseWorld

func (x *Components) GetBaseWorld() *BaseWorld

func (*Components) ProtoMessage

func (*Components) ProtoMessage()

func (*Components) ProtoReflect

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

func (*Components) Reset

func (x *Components) Reset()

func (*Components) String

func (x *Components) String() string

Jump to

Keyboard shortcuts

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