Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterTrojanClientServiceServer(s grpc.ServiceRegistrar, srv TrojanClientServiceServer)
- func RegisterTrojanServerServiceServer(s grpc.ServiceRegistrar, srv TrojanServerServiceServer)
- func RunClientAPI(ctx context.Context, auth statistic.Authenticator) error
- func RunServerAPI(ctx context.Context, auth statistic.Authenticator) error
- type APIConfig
- type ClientAPI
- type Config
- type GetTrafficRequest
- type GetTrafficResponse
- func (*GetTrafficResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetTrafficResponse) GetInfo() string
- func (x *GetTrafficResponse) GetSpeedCurrent() *Speed
- func (x *GetTrafficResponse) GetSuccess() bool
- func (x *GetTrafficResponse) GetTrafficTotal() *Traffic
- func (*GetTrafficResponse) ProtoMessage()
- func (x *GetTrafficResponse) ProtoReflect() protoreflect.Message
- func (x *GetTrafficResponse) Reset()
- func (x *GetTrafficResponse) String() string
- type GetUsersRequest
- type GetUsersResponse
- func (*GetUsersResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetUsersResponse) GetInfo() string
- func (x *GetUsersResponse) GetStatus() *UserStatus
- func (x *GetUsersResponse) GetSuccess() bool
- func (*GetUsersResponse) ProtoMessage()
- func (x *GetUsersResponse) ProtoReflect() protoreflect.Message
- func (x *GetUsersResponse) Reset()
- func (x *GetUsersResponse) String() string
- type ListUsersRequest
- type ListUsersResponse
- func (*ListUsersResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListUsersResponse) GetStatus() *UserStatus
- func (*ListUsersResponse) ProtoMessage()
- func (x *ListUsersResponse) ProtoReflect() protoreflect.Message
- func (x *ListUsersResponse) Reset()
- func (x *ListUsersResponse) String() string
- type SSLConfig
- type ServerAPI
- type SetUsersRequest
- func (*SetUsersRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetUsersRequest) GetOperation() SetUsersRequest_Operation
- func (x *SetUsersRequest) GetStatus() *UserStatus
- func (*SetUsersRequest) ProtoMessage()
- func (x *SetUsersRequest) ProtoReflect() protoreflect.Message
- func (x *SetUsersRequest) Reset()
- func (x *SetUsersRequest) String() string
- type SetUsersRequest_Operation
- func (SetUsersRequest_Operation) Descriptor() protoreflect.EnumDescriptor
- func (x SetUsersRequest_Operation) Enum() *SetUsersRequest_Operation
- func (SetUsersRequest_Operation) EnumDescriptor() ([]byte, []int)deprecated
- func (x SetUsersRequest_Operation) Number() protoreflect.EnumNumber
- func (x SetUsersRequest_Operation) String() string
- func (SetUsersRequest_Operation) Type() protoreflect.EnumType
- type SetUsersResponse
- func (*SetUsersResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SetUsersResponse) GetInfo() string
- func (x *SetUsersResponse) GetSuccess() bool
- func (*SetUsersResponse) ProtoMessage()
- func (x *SetUsersResponse) ProtoReflect() protoreflect.Message
- func (x *SetUsersResponse) Reset()
- func (x *SetUsersResponse) String() string
- type Speed
- type Traffic
- type TrojanClientServiceClient
- type TrojanClientServiceServer
- type TrojanServerServiceClient
- type TrojanServerServiceServer
- type TrojanServerService_GetUsersClient
- type TrojanServerService_GetUsersServer
- type TrojanServerService_ListUsersClient
- type TrojanServerService_ListUsersServer
- type TrojanServerService_SetUsersClient
- type TrojanServerService_SetUsersServer
- type UnimplementedTrojanClientServiceServer
- type UnimplementedTrojanServerServiceServer
- func (UnimplementedTrojanServerServiceServer) GetUsers(TrojanServerService_GetUsersServer) error
- func (UnimplementedTrojanServerServiceServer) ListUsers(*ListUsersRequest, TrojanServerService_ListUsersServer) error
- func (UnimplementedTrojanServerServiceServer) SetUsers(TrojanServerService_SetUsersServer) error
- type UnsafeTrojanClientServiceServer
- type UnsafeTrojanServerServiceServer
- type User
- type UserStatus
- func (*UserStatus) Descriptor() ([]byte, []int)deprecated
- func (x *UserStatus) GetIpCurrent() int32
- func (x *UserStatus) GetIpLimit() int32
- func (x *UserStatus) GetSpeedCurrent() *Speed
- func (x *UserStatus) GetSpeedLimit() *Speed
- func (x *UserStatus) GetTrafficTotal() *Traffic
- func (x *UserStatus) GetUser() *User
- func (*UserStatus) ProtoMessage()
- func (x *UserStatus) ProtoReflect() protoreflect.Message
- func (x *UserStatus) Reset()
- func (x *UserStatus) String() string
Constants ¶
const Name = "API_SERVICE"
Variables ¶
var ( SetUsersRequest_Operation_name = map[int32]string{ 0: "Add", 1: "Delete", 2: "Modify", } SetUsersRequest_Operation_value = map[string]int32{ "Add": 0, "Delete": 1, "Modify": 2, } )
Enum value maps for SetUsersRequest_Operation.
var File_api_proto protoreflect.FileDescriptor
var TrojanClientService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "trojan.api.TrojanClientService", HandlerType: (*TrojanClientServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetTraffic", Handler: _TrojanClientService_GetTraffic_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api.proto", }
TrojanClientService_ServiceDesc is the grpc.ServiceDesc for TrojanClientService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var TrojanServerService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "trojan.api.TrojanServerService", HandlerType: (*TrojanServerServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "ListUsers", Handler: _TrojanServerService_ListUsers_Handler, ServerStreams: true, }, { StreamName: "GetUsers", Handler: _TrojanServerService_GetUsers_Handler, ServerStreams: true, ClientStreams: true, }, { StreamName: "SetUsers", Handler: _TrojanServerService_SetUsers_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "api.proto", }
TrojanServerService_ServiceDesc is the grpc.ServiceDesc for TrojanServerService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTrojanClientServiceServer ¶
func RegisterTrojanClientServiceServer(s grpc.ServiceRegistrar, srv TrojanClientServiceServer)
func RegisterTrojanServerServiceServer ¶
func RegisterTrojanServerServiceServer(s grpc.ServiceRegistrar, srv TrojanServerServiceServer)
func RunClientAPI ¶
func RunClientAPI(ctx context.Context, auth statistic.Authenticator) error
func RunServerAPI ¶
func RunServerAPI(ctx context.Context, auth statistic.Authenticator) error
Types ¶
type ClientAPI ¶
type ClientAPI struct { TrojanClientServiceServer // contains filtered or unexported fields }
func (*ClientAPI) GetTraffic ¶
func (s *ClientAPI) GetTraffic(ctx context.Context, req *GetTrafficRequest) (*GetTrafficResponse, error)
type GetTrafficRequest ¶
type GetTrafficRequest struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*GetTrafficRequest) Descriptor
deprecated
func (*GetTrafficRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetTrafficRequest.ProtoReflect.Descriptor instead.
func (*GetTrafficRequest) GetUser ¶
func (x *GetTrafficRequest) GetUser() *User
func (*GetTrafficRequest) ProtoMessage ¶
func (*GetTrafficRequest) ProtoMessage()
func (*GetTrafficRequest) ProtoReflect ¶
func (x *GetTrafficRequest) ProtoReflect() protoreflect.Message
func (*GetTrafficRequest) Reset ¶
func (x *GetTrafficRequest) Reset()
func (*GetTrafficRequest) String ¶
func (x *GetTrafficRequest) String() string
type GetTrafficResponse ¶
type GetTrafficResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Info string `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` TrafficTotal *Traffic `protobuf:"bytes,3,opt,name=traffic_total,json=trafficTotal,proto3" json:"traffic_total,omitempty"` SpeedCurrent *Speed `protobuf:"bytes,4,opt,name=speed_current,json=speedCurrent,proto3" json:"speed_current,omitempty"` // contains filtered or unexported fields }
func (*GetTrafficResponse) Descriptor
deprecated
func (*GetTrafficResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetTrafficResponse.ProtoReflect.Descriptor instead.
func (*GetTrafficResponse) GetInfo ¶
func (x *GetTrafficResponse) GetInfo() string
func (*GetTrafficResponse) GetSpeedCurrent ¶
func (x *GetTrafficResponse) GetSpeedCurrent() *Speed
func (*GetTrafficResponse) GetSuccess ¶
func (x *GetTrafficResponse) GetSuccess() bool
func (*GetTrafficResponse) GetTrafficTotal ¶
func (x *GetTrafficResponse) GetTrafficTotal() *Traffic
func (*GetTrafficResponse) ProtoMessage ¶
func (*GetTrafficResponse) ProtoMessage()
func (*GetTrafficResponse) ProtoReflect ¶
func (x *GetTrafficResponse) ProtoReflect() protoreflect.Message
func (*GetTrafficResponse) Reset ¶
func (x *GetTrafficResponse) Reset()
func (*GetTrafficResponse) String ¶
func (x *GetTrafficResponse) String() string
type GetUsersRequest ¶
type GetUsersRequest struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*GetUsersRequest) Descriptor
deprecated
func (*GetUsersRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUsersRequest.ProtoReflect.Descriptor instead.
func (*GetUsersRequest) GetUser ¶
func (x *GetUsersRequest) GetUser() *User
func (*GetUsersRequest) ProtoMessage ¶
func (*GetUsersRequest) ProtoMessage()
func (*GetUsersRequest) ProtoReflect ¶
func (x *GetUsersRequest) ProtoReflect() protoreflect.Message
func (*GetUsersRequest) Reset ¶
func (x *GetUsersRequest) Reset()
func (*GetUsersRequest) String ¶
func (x *GetUsersRequest) String() string
type GetUsersResponse ¶
type GetUsersResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Info string `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` Status *UserStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
func (*GetUsersResponse) Descriptor
deprecated
func (*GetUsersResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetUsersResponse.ProtoReflect.Descriptor instead.
func (*GetUsersResponse) GetInfo ¶
func (x *GetUsersResponse) GetInfo() string
func (*GetUsersResponse) GetStatus ¶
func (x *GetUsersResponse) GetStatus() *UserStatus
func (*GetUsersResponse) GetSuccess ¶
func (x *GetUsersResponse) GetSuccess() bool
func (*GetUsersResponse) ProtoMessage ¶
func (*GetUsersResponse) ProtoMessage()
func (*GetUsersResponse) ProtoReflect ¶
func (x *GetUsersResponse) ProtoReflect() protoreflect.Message
func (*GetUsersResponse) Reset ¶
func (x *GetUsersResponse) Reset()
func (*GetUsersResponse) String ¶
func (x *GetUsersResponse) String() string
type ListUsersRequest ¶
type ListUsersRequest struct {
// contains filtered or unexported fields
}
func (*ListUsersRequest) Descriptor
deprecated
func (*ListUsersRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListUsersRequest.ProtoReflect.Descriptor instead.
func (*ListUsersRequest) ProtoMessage ¶
func (*ListUsersRequest) ProtoMessage()
func (*ListUsersRequest) ProtoReflect ¶
func (x *ListUsersRequest) ProtoReflect() protoreflect.Message
func (*ListUsersRequest) Reset ¶
func (x *ListUsersRequest) Reset()
func (*ListUsersRequest) String ¶
func (x *ListUsersRequest) String() string
type ListUsersResponse ¶
type ListUsersResponse struct { Status *UserStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
func (*ListUsersResponse) Descriptor
deprecated
func (*ListUsersResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListUsersResponse.ProtoReflect.Descriptor instead.
func (*ListUsersResponse) GetStatus ¶
func (x *ListUsersResponse) GetStatus() *UserStatus
func (*ListUsersResponse) ProtoMessage ¶
func (*ListUsersResponse) ProtoMessage()
func (*ListUsersResponse) ProtoReflect ¶
func (x *ListUsersResponse) ProtoReflect() protoreflect.Message
func (*ListUsersResponse) Reset ¶
func (x *ListUsersResponse) Reset()
func (*ListUsersResponse) String ¶
func (x *ListUsersResponse) String() string
type ServerAPI ¶
type ServerAPI struct { TrojanServerServiceServer // contains filtered or unexported fields }
func (*ServerAPI) GetUsers ¶
func (s *ServerAPI) GetUsers(stream TrojanServerService_GetUsersServer) error
func (*ServerAPI) ListUsers ¶
func (s *ServerAPI) ListUsers(req *ListUsersRequest, stream TrojanServerService_ListUsersServer) error
func (*ServerAPI) SetUsers ¶
func (s *ServerAPI) SetUsers(stream TrojanServerService_SetUsersServer) error
type SetUsersRequest ¶
type SetUsersRequest struct { Status *UserStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` Operation SetUsersRequest_Operation `protobuf:"varint,2,opt,name=operation,proto3,enum=trojan.api.SetUsersRequest_Operation" json:"operation,omitempty"` // contains filtered or unexported fields }
func (*SetUsersRequest) Descriptor
deprecated
func (*SetUsersRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetUsersRequest.ProtoReflect.Descriptor instead.
func (*SetUsersRequest) GetOperation ¶
func (x *SetUsersRequest) GetOperation() SetUsersRequest_Operation
func (*SetUsersRequest) GetStatus ¶
func (x *SetUsersRequest) GetStatus() *UserStatus
func (*SetUsersRequest) ProtoMessage ¶
func (*SetUsersRequest) ProtoMessage()
func (*SetUsersRequest) ProtoReflect ¶
func (x *SetUsersRequest) ProtoReflect() protoreflect.Message
func (*SetUsersRequest) Reset ¶
func (x *SetUsersRequest) Reset()
func (*SetUsersRequest) String ¶
func (x *SetUsersRequest) String() string
type SetUsersRequest_Operation ¶
type SetUsersRequest_Operation int32
const ( SetUsersRequest_Add SetUsersRequest_Operation = 0 SetUsersRequest_Delete SetUsersRequest_Operation = 1 SetUsersRequest_Modify SetUsersRequest_Operation = 2 )
func (SetUsersRequest_Operation) Descriptor ¶
func (SetUsersRequest_Operation) Descriptor() protoreflect.EnumDescriptor
func (SetUsersRequest_Operation) Enum ¶
func (x SetUsersRequest_Operation) Enum() *SetUsersRequest_Operation
func (SetUsersRequest_Operation) EnumDescriptor
deprecated
func (SetUsersRequest_Operation) EnumDescriptor() ([]byte, []int)
Deprecated: Use SetUsersRequest_Operation.Descriptor instead.
func (SetUsersRequest_Operation) Number ¶
func (x SetUsersRequest_Operation) Number() protoreflect.EnumNumber
func (SetUsersRequest_Operation) String ¶
func (x SetUsersRequest_Operation) String() string
func (SetUsersRequest_Operation) Type ¶
func (SetUsersRequest_Operation) Type() protoreflect.EnumType
type SetUsersResponse ¶
type SetUsersResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Info string `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` // contains filtered or unexported fields }
func (*SetUsersResponse) Descriptor
deprecated
func (*SetUsersResponse) Descriptor() ([]byte, []int)
Deprecated: Use SetUsersResponse.ProtoReflect.Descriptor instead.
func (*SetUsersResponse) GetInfo ¶
func (x *SetUsersResponse) GetInfo() string
func (*SetUsersResponse) GetSuccess ¶
func (x *SetUsersResponse) GetSuccess() bool
func (*SetUsersResponse) ProtoMessage ¶
func (*SetUsersResponse) ProtoMessage()
func (*SetUsersResponse) ProtoReflect ¶
func (x *SetUsersResponse) ProtoReflect() protoreflect.Message
func (*SetUsersResponse) Reset ¶
func (x *SetUsersResponse) Reset()
func (*SetUsersResponse) String ¶
func (x *SetUsersResponse) String() string
type Speed ¶
type Speed struct { UploadSpeed uint64 `protobuf:"varint,1,opt,name=upload_speed,json=uploadSpeed,proto3" json:"upload_speed,omitempty"` DownloadSpeed uint64 `protobuf:"varint,2,opt,name=download_speed,json=downloadSpeed,proto3" json:"download_speed,omitempty"` // contains filtered or unexported fields }
func (*Speed) Descriptor
deprecated
func (*Speed) GetDownloadSpeed ¶
func (*Speed) GetUploadSpeed ¶
func (*Speed) ProtoMessage ¶
func (*Speed) ProtoMessage()
func (*Speed) ProtoReflect ¶
func (x *Speed) ProtoReflect() protoreflect.Message
type Traffic ¶
type Traffic struct { UploadTraffic uint64 `protobuf:"varint,1,opt,name=upload_traffic,json=uploadTraffic,proto3" json:"upload_traffic,omitempty"` DownloadTraffic uint64 `protobuf:"varint,2,opt,name=download_traffic,json=downloadTraffic,proto3" json:"download_traffic,omitempty"` // contains filtered or unexported fields }
func (*Traffic) Descriptor
deprecated
func (*Traffic) GetDownloadTraffic ¶
func (*Traffic) GetUploadTraffic ¶
func (*Traffic) ProtoMessage ¶
func (*Traffic) ProtoMessage()
func (*Traffic) ProtoReflect ¶
func (x *Traffic) ProtoReflect() protoreflect.Message
type TrojanClientServiceClient ¶
type TrojanClientServiceClient interface {
GetTraffic(ctx context.Context, in *GetTrafficRequest, opts ...grpc.CallOption) (*GetTrafficResponse, error)
}
TrojanClientServiceClient is the client API for TrojanClientService 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 NewTrojanClientServiceClient ¶
func NewTrojanClientServiceClient(cc grpc.ClientConnInterface) TrojanClientServiceClient
type TrojanClientServiceServer ¶
type TrojanClientServiceServer interface { GetTraffic(context.Context, *GetTrafficRequest) (*GetTrafficResponse, error) // contains filtered or unexported methods }
TrojanClientServiceServer is the server API for TrojanClientService service. All implementations must embed UnimplementedTrojanClientServiceServer for forward compatibility
type TrojanServerServiceClient ¶
type TrojanServerServiceClient interface { // list all users ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (TrojanServerService_ListUsersClient, error) // obtain specified user's info GetUsers(ctx context.Context, opts ...grpc.CallOption) (TrojanServerService_GetUsersClient, error) // setup existing users' config SetUsers(ctx context.Context, opts ...grpc.CallOption) (TrojanServerService_SetUsersClient, error) }
TrojanServerServiceClient is the client API for TrojanServerService 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 NewTrojanServerServiceClient ¶
func NewTrojanServerServiceClient(cc grpc.ClientConnInterface) TrojanServerServiceClient
type TrojanServerServiceServer ¶
type TrojanServerServiceServer interface { // list all users ListUsers(*ListUsersRequest, TrojanServerService_ListUsersServer) error // obtain specified user's info GetUsers(TrojanServerService_GetUsersServer) error // setup existing users' config SetUsers(TrojanServerService_SetUsersServer) error // contains filtered or unexported methods }
TrojanServerServiceServer is the server API for TrojanServerService service. All implementations must embed UnimplementedTrojanServerServiceServer for forward compatibility
type TrojanServerService_GetUsersClient ¶
type TrojanServerService_GetUsersClient interface { Send(*GetUsersRequest) error Recv() (*GetUsersResponse, error) grpc.ClientStream }
type TrojanServerService_GetUsersServer ¶
type TrojanServerService_GetUsersServer interface { Send(*GetUsersResponse) error Recv() (*GetUsersRequest, error) grpc.ServerStream }
type TrojanServerService_ListUsersClient ¶
type TrojanServerService_ListUsersClient interface { Recv() (*ListUsersResponse, error) grpc.ClientStream }
type TrojanServerService_ListUsersServer ¶
type TrojanServerService_ListUsersServer interface { Send(*ListUsersResponse) error grpc.ServerStream }
type TrojanServerService_SetUsersClient ¶
type TrojanServerService_SetUsersClient interface { Send(*SetUsersRequest) error Recv() (*SetUsersResponse, error) grpc.ClientStream }
type TrojanServerService_SetUsersServer ¶
type TrojanServerService_SetUsersServer interface { Send(*SetUsersResponse) error Recv() (*SetUsersRequest, error) grpc.ServerStream }
type UnimplementedTrojanClientServiceServer ¶
type UnimplementedTrojanClientServiceServer struct { }
UnimplementedTrojanClientServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedTrojanClientServiceServer) GetTraffic ¶
func (UnimplementedTrojanClientServiceServer) GetTraffic(context.Context, *GetTrafficRequest) (*GetTrafficResponse, error)
type UnimplementedTrojanServerServiceServer ¶
type UnimplementedTrojanServerServiceServer struct { }
UnimplementedTrojanServerServiceServer must be embedded to have forward compatible implementations.
type UnsafeTrojanClientServiceServer ¶
type UnsafeTrojanClientServiceServer interface {
// contains filtered or unexported methods
}
UnsafeTrojanClientServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TrojanClientServiceServer will result in compilation errors.
type UnsafeTrojanServerServiceServer ¶
type UnsafeTrojanServerServiceServer interface {
// contains filtered or unexported methods
}
UnsafeTrojanServerServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TrojanServerServiceServer will result in compilation errors.
type User ¶
type User struct { Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetPassword ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserStatus ¶
type UserStatus struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` TrafficTotal *Traffic `protobuf:"bytes,2,opt,name=traffic_total,json=trafficTotal,proto3" json:"traffic_total,omitempty"` SpeedCurrent *Speed `protobuf:"bytes,3,opt,name=speed_current,json=speedCurrent,proto3" json:"speed_current,omitempty"` SpeedLimit *Speed `protobuf:"bytes,4,opt,name=speed_limit,json=speedLimit,proto3" json:"speed_limit,omitempty"` IpCurrent int32 `protobuf:"varint,5,opt,name=ip_current,json=ipCurrent,proto3" json:"ip_current,omitempty"` IpLimit int32 `protobuf:"varint,6,opt,name=ip_limit,json=ipLimit,proto3" json:"ip_limit,omitempty"` // contains filtered or unexported fields }
func (*UserStatus) Descriptor
deprecated
func (*UserStatus) Descriptor() ([]byte, []int)
Deprecated: Use UserStatus.ProtoReflect.Descriptor instead.
func (*UserStatus) GetIpCurrent ¶
func (x *UserStatus) GetIpCurrent() int32
func (*UserStatus) GetIpLimit ¶
func (x *UserStatus) GetIpLimit() int32
func (*UserStatus) GetSpeedCurrent ¶
func (x *UserStatus) GetSpeedCurrent() *Speed
func (*UserStatus) GetSpeedLimit ¶
func (x *UserStatus) GetSpeedLimit() *Speed
func (*UserStatus) GetTrafficTotal ¶
func (x *UserStatus) GetTrafficTotal() *Traffic
func (*UserStatus) GetUser ¶
func (x *UserStatus) GetUser() *User
func (*UserStatus) ProtoMessage ¶
func (*UserStatus) ProtoMessage()
func (*UserStatus) ProtoReflect ¶
func (x *UserStatus) ProtoReflect() protoreflect.Message
func (*UserStatus) Reset ¶
func (x *UserStatus) Reset()
func (*UserStatus) String ¶
func (x *UserStatus) String() string