pb

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_xnode_proto protoreflect.FileDescriptor
View Source
var XNodeGrpc_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pb.XNodeGrpc",
	HandlerType: (*XNodeGrpcServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AddUser",
			Handler:    _XNodeGrpc_AddUser_Handler,
		},
		{
			MethodName: "Ping",
			Handler:    _XNodeGrpc_Ping_Handler,
		},
		{
			MethodName: "GetSub",
			Handler:    _XNodeGrpc_GetSub_Handler,
		},
		{
			MethodName: "GetUserInfo",
			Handler:    _XNodeGrpc_GetUserInfo_Handler,
		},
		{
			MethodName: "UpgradeUserPackage",
			Handler:    _XNodeGrpc_UpgradeUserPackage_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "xnode.proto",
}

XNodeGrpc_ServiceDesc is the grpc.ServiceDesc for XNodeGrpc service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterXNodeGrpcServer

func RegisterXNodeGrpcServer(s grpc.ServiceRegistrar, srv XNodeGrpcServer)

Types

type AddPackageCmd added in v0.3.1

type AddPackageCmd struct {
	Uuid    string   `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	Package *Package `protobuf:"bytes,2,opt,name=package,proto3" json:"package,omitempty"`
	// contains filtered or unexported fields
}

func (*AddPackageCmd) Descriptor deprecated added in v0.3.1

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

Deprecated: Use AddPackageCmd.ProtoReflect.Descriptor instead.

func (*AddPackageCmd) GetPackage added in v0.3.1

func (x *AddPackageCmd) GetPackage() *Package

func (*AddPackageCmd) GetUuid added in v0.3.1

func (x *AddPackageCmd) GetUuid() string

func (*AddPackageCmd) ProtoMessage added in v0.3.1

func (*AddPackageCmd) ProtoMessage()

func (*AddPackageCmd) ProtoReflect added in v0.3.1

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

func (*AddPackageCmd) Reset added in v0.3.1

func (x *AddPackageCmd) Reset()

func (*AddPackageCmd) String added in v0.3.1

func (x *AddPackageCmd) String() string

type AddUserCmd

type AddUserCmd struct {
	Tid       uint64   `protobuf:"varint,1,opt,name=Tid,proto3" json:"Tid,omitempty"`
	TUsername string   `protobuf:"bytes,2,opt,name=TUsername,proto3" json:"TUsername,omitempty"`
	Uuid      string   `protobuf:"bytes,3,opt,name=uuid,proto3" json:"uuid,omitempty"`
	Package   *Package `protobuf:"bytes,4,opt,name=package,proto3" json:"package,omitempty"`
	// contains filtered or unexported fields
}

func (*AddUserCmd) Descriptor deprecated

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

Deprecated: Use AddUserCmd.ProtoReflect.Descriptor instead.

func (*AddUserCmd) GetPackage added in v0.3.1

func (x *AddUserCmd) GetPackage() *Package

func (*AddUserCmd) GetTUsername

func (x *AddUserCmd) GetTUsername() string

func (*AddUserCmd) GetTid

func (x *AddUserCmd) GetTid() uint64

func (*AddUserCmd) GetUuid

func (x *AddUserCmd) GetUuid() string

func (*AddUserCmd) ProtoMessage

func (*AddUserCmd) ProtoMessage()

func (*AddUserCmd) ProtoReflect

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

func (*AddUserCmd) Reset

func (x *AddUserCmd) Reset()

func (*AddUserCmd) String

func (x *AddUserCmd) String() string

type Empty

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

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type Package added in v0.3.1

type Package struct {
	TrafficAllowed float32 `protobuf:"fixed32,1,opt,name=TrafficAllowed,proto3" json:"TrafficAllowed,omitempty"`
	ExpireAt       string  `protobuf:"bytes,2,opt,name=ExpireAt,proto3" json:"ExpireAt,omitempty"`
	PackageDays    int64   `protobuf:"varint,3,opt,name=PackageDays,proto3" json:"PackageDays,omitempty"`
	Mode           string  `protobuf:"bytes,4,opt,name=Mode,proto3" json:"Mode,omitempty"`
	// contains filtered or unexported fields
}

func (*Package) Descriptor deprecated added in v0.3.1

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

Deprecated: Use Package.ProtoReflect.Descriptor instead.

func (*Package) GetExpireAt added in v0.3.1

func (x *Package) GetExpireAt() string

func (*Package) GetMode added in v0.3.1

func (x *Package) GetMode() string

func (*Package) GetPackageDays added in v0.3.1

func (x *Package) GetPackageDays() int64

func (*Package) GetTrafficAllowed added in v0.3.1

func (x *Package) GetTrafficAllowed() float32

func (*Package) ProtoMessage added in v0.3.1

func (*Package) ProtoMessage()

func (*Package) ProtoReflect added in v0.3.1

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

func (*Package) Reset added in v0.3.1

func (x *Package) Reset()

func (*Package) String added in v0.3.1

func (x *Package) String() string

type Response

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

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetMsg

func (x *Response) GetMsg() string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type SubContent added in v0.2.1

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

func (*SubContent) Descriptor deprecated added in v0.2.1

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

Deprecated: Use SubContent.ProtoReflect.Descriptor instead.

func (*SubContent) GetContent added in v0.2.1

func (x *SubContent) GetContent() string

func (*SubContent) ProtoMessage added in v0.2.1

func (*SubContent) ProtoMessage()

func (*SubContent) ProtoReflect added in v0.2.1

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

func (*SubContent) Reset added in v0.2.1

func (x *SubContent) Reset()

func (*SubContent) String added in v0.2.1

func (x *SubContent) String() string

type UnimplementedXNodeGrpcServer

type UnimplementedXNodeGrpcServer struct {
}

UnimplementedXNodeGrpcServer must be embedded to have forward compatible implementations.

func (UnimplementedXNodeGrpcServer) AddUser

func (UnimplementedXNodeGrpcServer) GetSub added in v0.2.1

func (UnimplementedXNodeGrpcServer) GetUserInfo added in v0.2.1

func (UnimplementedXNodeGrpcServer) Ping

func (UnimplementedXNodeGrpcServer) UpgradeUserPackage added in v0.3.1

type UnsafeXNodeGrpcServer

type UnsafeXNodeGrpcServer interface {
	// contains filtered or unexported methods
}

UnsafeXNodeGrpcServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to XNodeGrpcServer will result in compilation errors.

type UserInfo added in v0.2.1

type UserInfo struct {
	Uuid         string  `protobuf:"bytes,1,opt,name=Uuid,proto3" json:"Uuid,omitempty"`
	Name         string  `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
	LastOnline   string  `protobuf:"bytes,3,opt,name=LastOnline,proto3" json:"LastOnline,omitempty"`
	UsageLimit   float32 `protobuf:"fixed32,4,opt,name=UsageLimit,proto3" json:"UsageLimit,omitempty"`
	CurrentUsage float32 `protobuf:"fixed32,5,opt,name=CurrentUsage,proto3" json:"CurrentUsage,omitempty"`
	// contains filtered or unexported fields
}

func (*UserInfo) Descriptor deprecated added in v0.2.1

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

Deprecated: Use UserInfo.ProtoReflect.Descriptor instead.

func (*UserInfo) GetCurrentUsage added in v0.2.1

func (x *UserInfo) GetCurrentUsage() float32

func (*UserInfo) GetLastOnline added in v0.2.1

func (x *UserInfo) GetLastOnline() string

func (*UserInfo) GetName added in v0.2.1

func (x *UserInfo) GetName() string

func (*UserInfo) GetUsageLimit added in v0.2.1

func (x *UserInfo) GetUsageLimit() float32

func (*UserInfo) GetUuid added in v0.2.1

func (x *UserInfo) GetUuid() string

func (*UserInfo) ProtoMessage added in v0.2.1

func (*UserInfo) ProtoMessage()

func (*UserInfo) ProtoReflect added in v0.2.1

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

func (*UserInfo) Reset added in v0.2.1

func (x *UserInfo) Reset()

func (*UserInfo) String added in v0.2.1

func (x *UserInfo) String() string

type UserInfoReq added in v0.2.1

type UserInfoReq struct {
	Tid       uint64 `protobuf:"varint,1,opt,name=tid,proto3" json:"tid,omitempty"`
	TUsername string `protobuf:"bytes,2,opt,name=tUsername,proto3" json:"tUsername,omitempty"`
	Uuid      string `protobuf:"bytes,3,opt,name=uuid,proto3" json:"uuid,omitempty"`
	// contains filtered or unexported fields
}

func (*UserInfoReq) Descriptor deprecated added in v0.2.1

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

Deprecated: Use UserInfoReq.ProtoReflect.Descriptor instead.

func (*UserInfoReq) GetTUsername added in v0.2.1

func (x *UserInfoReq) GetTUsername() string

func (*UserInfoReq) GetTid added in v0.2.1

func (x *UserInfoReq) GetTid() uint64

func (*UserInfoReq) GetUuid added in v0.2.1

func (x *UserInfoReq) GetUuid() string

func (*UserInfoReq) ProtoMessage added in v0.2.1

func (*UserInfoReq) ProtoMessage()

func (*UserInfoReq) ProtoReflect added in v0.2.1

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

func (*UserInfoReq) Reset added in v0.2.1

func (x *UserInfoReq) Reset()

func (*UserInfoReq) String added in v0.2.1

func (x *UserInfoReq) String() string

type XNodeGrpcClient

type XNodeGrpcClient interface {
	AddUser(ctx context.Context, in *AddUserCmd, opts ...grpc.CallOption) (*Response, error)
	Ping(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
	GetSub(ctx context.Context, in *UserInfoReq, opts ...grpc.CallOption) (*SubContent, error)
	GetUserInfo(ctx context.Context, in *UserInfoReq, opts ...grpc.CallOption) (*UserInfo, error)
	UpgradeUserPackage(ctx context.Context, in *AddPackageCmd, opts ...grpc.CallOption) (*Response, error)
}

XNodeGrpcClient is the client API for XNodeGrpc service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewXNodeGrpcClient

func NewXNodeGrpcClient(cc grpc.ClientConnInterface) XNodeGrpcClient

type XNodeGrpcServer

type XNodeGrpcServer interface {
	AddUser(context.Context, *AddUserCmd) (*Response, error)
	Ping(context.Context, *Empty) (*Empty, error)
	GetSub(context.Context, *UserInfoReq) (*SubContent, error)
	GetUserInfo(context.Context, *UserInfoReq) (*UserInfo, error)
	UpgradeUserPackage(context.Context, *AddPackageCmd) (*Response, error)
	// contains filtered or unexported methods
}

XNodeGrpcServer is the server API for XNodeGrpc service. All implementations must embed UnimplementedXNodeGrpcServer for forward compatibility

Jump to

Keyboard shortcuts

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