Documentation ¶
Index ¶
- Variables
- func RegisterTrojanClientServiceServer(s *grpc.Server, srv TrojanClientServiceServer)
- func RegisterTrojanServerServiceServer(s *grpc.Server, srv TrojanServerServiceServer)
- func RunClientAPI(ctx context.Context, config *conf.GlobalConfig, auth stat.Authenticator) error
- func RunServerAPI(ctx context.Context, config *conf.GlobalConfig, auth stat.Authenticator) error
- type ClientAPI
- type GetTrafficRequest
- func (*GetTrafficRequest) Descriptor() ([]byte, []int)
- func (m *GetTrafficRequest) GetUser() *User
- func (*GetTrafficRequest) ProtoMessage()
- func (m *GetTrafficRequest) Reset()
- func (m *GetTrafficRequest) String() string
- func (m *GetTrafficRequest) XXX_DiscardUnknown()
- func (m *GetTrafficRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetTrafficRequest) XXX_Merge(src proto.Message)
- func (m *GetTrafficRequest) XXX_Size() int
- func (m *GetTrafficRequest) XXX_Unmarshal(b []byte) error
- type GetTrafficResponse
- func (*GetTrafficResponse) Descriptor() ([]byte, []int)
- func (m *GetTrafficResponse) GetInfo() string
- func (m *GetTrafficResponse) GetSpeedCurrent() *Speed
- func (m *GetTrafficResponse) GetSpeedLimit() *Speed
- func (m *GetTrafficResponse) GetSuccess() bool
- func (m *GetTrafficResponse) GetTrafficTotal() *Traffic
- func (*GetTrafficResponse) ProtoMessage()
- func (m *GetTrafficResponse) Reset()
- func (m *GetTrafficResponse) String() string
- func (m *GetTrafficResponse) XXX_DiscardUnknown()
- func (m *GetTrafficResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetTrafficResponse) XXX_Merge(src proto.Message)
- func (m *GetTrafficResponse) XXX_Size() int
- func (m *GetTrafficResponse) XXX_Unmarshal(b []byte) error
- type ListUserRequest
- func (*ListUserRequest) Descriptor() ([]byte, []int)
- func (*ListUserRequest) ProtoMessage()
- func (m *ListUserRequest) Reset()
- func (m *ListUserRequest) String() string
- func (m *ListUserRequest) XXX_DiscardUnknown()
- func (m *ListUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListUserRequest) XXX_Merge(src proto.Message)
- func (m *ListUserRequest) XXX_Size() int
- func (m *ListUserRequest) XXX_Unmarshal(b []byte) error
- type ListUserResponse
- func (*ListUserResponse) Descriptor() ([]byte, []int)
- func (m *ListUserResponse) GetOnline() bool
- func (m *ListUserResponse) GetSpeedCurrent() *Speed
- func (m *ListUserResponse) GetSpeedLimit() *Speed
- func (m *ListUserResponse) GetTrafficTotal() *Traffic
- func (m *ListUserResponse) GetUser() *User
- func (*ListUserResponse) ProtoMessage()
- func (m *ListUserResponse) Reset()
- func (m *ListUserResponse) String() string
- func (m *ListUserResponse) XXX_DiscardUnknown()
- func (m *ListUserResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListUserResponse) XXX_Merge(src proto.Message)
- func (m *ListUserResponse) XXX_Size() int
- func (m *ListUserResponse) XXX_Unmarshal(b []byte) error
- type ServerAPI
- type SetUserRequest
- func (*SetUserRequest) Descriptor() ([]byte, []int)
- func (m *SetUserRequest) GetOperation() SetUserRequest_Operation
- func (m *SetUserRequest) GetSpeedLimit() *Speed
- func (m *SetUserRequest) GetUser() *User
- func (*SetUserRequest) ProtoMessage()
- func (m *SetUserRequest) Reset()
- func (m *SetUserRequest) String() string
- func (m *SetUserRequest) XXX_DiscardUnknown()
- func (m *SetUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SetUserRequest) XXX_Merge(src proto.Message)
- func (m *SetUserRequest) XXX_Size() int
- func (m *SetUserRequest) XXX_Unmarshal(b []byte) error
- type SetUserRequest_Operation
- type SetUserResponse
- func (*SetUserResponse) Descriptor() ([]byte, []int)
- func (m *SetUserResponse) GetInfo() string
- func (m *SetUserResponse) GetSuccess() bool
- func (*SetUserResponse) ProtoMessage()
- func (m *SetUserResponse) Reset()
- func (m *SetUserResponse) String() string
- func (m *SetUserResponse) XXX_DiscardUnknown()
- func (m *SetUserResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SetUserResponse) XXX_Merge(src proto.Message)
- func (m *SetUserResponse) XXX_Size() int
- func (m *SetUserResponse) XXX_Unmarshal(b []byte) error
- type Speed
- func (*Speed) Descriptor() ([]byte, []int)
- func (m *Speed) GetDownloadSpeed() uint64
- func (m *Speed) GetUploadSpeed() uint64
- func (*Speed) ProtoMessage()
- func (m *Speed) Reset()
- func (m *Speed) String() string
- func (m *Speed) XXX_DiscardUnknown()
- func (m *Speed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Speed) XXX_Merge(src proto.Message)
- func (m *Speed) XXX_Size() int
- func (m *Speed) XXX_Unmarshal(b []byte) error
- type Traffic
- func (*Traffic) Descriptor() ([]byte, []int)
- func (m *Traffic) GetDownloadTraffic() uint64
- func (m *Traffic) GetUploadTraffic() uint64
- func (*Traffic) ProtoMessage()
- func (m *Traffic) Reset()
- func (m *Traffic) String() string
- func (m *Traffic) XXX_DiscardUnknown()
- func (m *Traffic) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Traffic) XXX_Merge(src proto.Message)
- func (m *Traffic) XXX_Size() int
- func (m *Traffic) XXX_Unmarshal(b []byte) error
- type TrojanClientServiceClient
- type TrojanClientServiceServer
- type TrojanServerServiceClient
- type TrojanServerServiceServer
- type TrojanServerService_GetTrafficClient
- type TrojanServerService_GetTrafficServer
- type TrojanServerService_ListUsersClient
- type TrojanServerService_ListUsersServer
- type TrojanServerService_SetUsersClient
- type TrojanServerService_SetUsersServer
- type UnimplementedTrojanClientServiceServer
- type UnimplementedTrojanServerServiceServer
- func (*UnimplementedTrojanServerServiceServer) GetTraffic(srv TrojanServerService_GetTrafficServer) error
- func (*UnimplementedTrojanServerServiceServer) ListUsers(req *ListUserRequest, srv TrojanServerService_ListUsersServer) error
- func (*UnimplementedTrojanServerServiceServer) SetUsers(srv TrojanServerService_SetUsersServer) error
- type User
- func (*User) Descriptor() ([]byte, []int)
- func (m *User) GetHash() string
- func (m *User) GetPassword() string
- func (*User) ProtoMessage()
- func (m *User) Reset()
- func (m *User) String() string
- func (m *User) XXX_DiscardUnknown()
- func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *User) XXX_Merge(src proto.Message)
- func (m *User) XXX_Size() int
- func (m *User) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
var SetUserRequest_Operation_name = map[int32]string{
0: "Add",
1: "Delete",
2: "Modify",
}
var SetUserRequest_Operation_value = map[string]int32{
"Add": 0,
"Delete": 1,
"Modify": 2,
}
Functions ¶
func RegisterTrojanClientServiceServer ¶ added in v0.4.3
func RegisterTrojanClientServiceServer(s *grpc.Server, srv TrojanClientServiceServer)
func RegisterTrojanServerServiceServer ¶ added in v0.4.3
func RegisterTrojanServerServiceServer(s *grpc.Server, srv TrojanServerServiceServer)
func RunClientAPI ¶ added in v0.4.3
func RunClientAPI(ctx context.Context, config *conf.GlobalConfig, auth stat.Authenticator) error
func RunServerAPI ¶ added in v0.4.3
func RunServerAPI(ctx context.Context, config *conf.GlobalConfig, auth stat.Authenticator) error
Types ¶
type ClientAPI ¶ added in v0.4.3
type ClientAPI struct { TrojanClientServiceServer // contains filtered or unexported fields }
func (*ClientAPI) GetTraffic ¶ added in v0.4.3
func (s *ClientAPI) GetTraffic(ctx context.Context, req *GetTrafficRequest) (*GetTrafficResponse, error)
type GetTrafficRequest ¶ added in v0.4.3
type GetTrafficRequest struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetTrafficRequest) Descriptor ¶ added in v0.4.3
func (*GetTrafficRequest) Descriptor() ([]byte, []int)
func (*GetTrafficRequest) GetUser ¶ added in v0.4.3
func (m *GetTrafficRequest) GetUser() *User
func (*GetTrafficRequest) ProtoMessage ¶ added in v0.4.3
func (*GetTrafficRequest) ProtoMessage()
func (*GetTrafficRequest) Reset ¶ added in v0.4.3
func (m *GetTrafficRequest) Reset()
func (*GetTrafficRequest) String ¶ added in v0.4.3
func (m *GetTrafficRequest) String() string
func (*GetTrafficRequest) XXX_DiscardUnknown ¶ added in v0.4.3
func (m *GetTrafficRequest) XXX_DiscardUnknown()
func (*GetTrafficRequest) XXX_Marshal ¶ added in v0.4.3
func (m *GetTrafficRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetTrafficRequest) XXX_Merge ¶ added in v0.4.3
func (m *GetTrafficRequest) XXX_Merge(src proto.Message)
func (*GetTrafficRequest) XXX_Size ¶ added in v0.4.3
func (m *GetTrafficRequest) XXX_Size() int
func (*GetTrafficRequest) XXX_Unmarshal ¶ added in v0.4.3
func (m *GetTrafficRequest) XXX_Unmarshal(b []byte) error
type GetTrafficResponse ¶ added in v0.4.3
type GetTrafficResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,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"` Info string `protobuf:"bytes,5,opt,name=info,proto3" json:"info,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetTrafficResponse) Descriptor ¶ added in v0.4.3
func (*GetTrafficResponse) Descriptor() ([]byte, []int)
func (*GetTrafficResponse) GetInfo ¶ added in v0.4.3
func (m *GetTrafficResponse) GetInfo() string
func (*GetTrafficResponse) GetSpeedCurrent ¶ added in v0.4.3
func (m *GetTrafficResponse) GetSpeedCurrent() *Speed
func (*GetTrafficResponse) GetSpeedLimit ¶ added in v0.4.3
func (m *GetTrafficResponse) GetSpeedLimit() *Speed
func (*GetTrafficResponse) GetSuccess ¶ added in v0.4.3
func (m *GetTrafficResponse) GetSuccess() bool
func (*GetTrafficResponse) GetTrafficTotal ¶ added in v0.4.3
func (m *GetTrafficResponse) GetTrafficTotal() *Traffic
func (*GetTrafficResponse) ProtoMessage ¶ added in v0.4.3
func (*GetTrafficResponse) ProtoMessage()
func (*GetTrafficResponse) Reset ¶ added in v0.4.3
func (m *GetTrafficResponse) Reset()
func (*GetTrafficResponse) String ¶ added in v0.4.3
func (m *GetTrafficResponse) String() string
func (*GetTrafficResponse) XXX_DiscardUnknown ¶ added in v0.4.3
func (m *GetTrafficResponse) XXX_DiscardUnknown()
func (*GetTrafficResponse) XXX_Marshal ¶ added in v0.4.3
func (m *GetTrafficResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetTrafficResponse) XXX_Merge ¶ added in v0.4.3
func (m *GetTrafficResponse) XXX_Merge(src proto.Message)
func (*GetTrafficResponse) XXX_Size ¶ added in v0.4.3
func (m *GetTrafficResponse) XXX_Size() int
func (*GetTrafficResponse) XXX_Unmarshal ¶ added in v0.4.3
func (m *GetTrafficResponse) XXX_Unmarshal(b []byte) error
type ListUserRequest ¶ added in v0.4.3
type ListUserRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ListUserRequest) Descriptor ¶ added in v0.4.3
func (*ListUserRequest) Descriptor() ([]byte, []int)
func (*ListUserRequest) ProtoMessage ¶ added in v0.4.3
func (*ListUserRequest) ProtoMessage()
func (*ListUserRequest) Reset ¶ added in v0.4.3
func (m *ListUserRequest) Reset()
func (*ListUserRequest) String ¶ added in v0.4.3
func (m *ListUserRequest) String() string
func (*ListUserRequest) XXX_DiscardUnknown ¶ added in v0.4.3
func (m *ListUserRequest) XXX_DiscardUnknown()
func (*ListUserRequest) XXX_Marshal ¶ added in v0.4.3
func (m *ListUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListUserRequest) XXX_Merge ¶ added in v0.4.3
func (m *ListUserRequest) XXX_Merge(src proto.Message)
func (*ListUserRequest) XXX_Size ¶ added in v0.4.3
func (m *ListUserRequest) XXX_Size() int
func (*ListUserRequest) XXX_Unmarshal ¶ added in v0.4.3
func (m *ListUserRequest) XXX_Unmarshal(b []byte) error
type ListUserResponse ¶ added in v0.4.3
type ListUserResponse struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` Online bool `protobuf:"varint,2,opt,name=online,proto3" json:"online,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"` SpeedLimit *Speed `protobuf:"bytes,5,opt,name=speed_limit,json=speedLimit,proto3" json:"speed_limit,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ListUserResponse) Descriptor ¶ added in v0.4.3
func (*ListUserResponse) Descriptor() ([]byte, []int)
func (*ListUserResponse) GetOnline ¶ added in v0.4.3
func (m *ListUserResponse) GetOnline() bool
func (*ListUserResponse) GetSpeedCurrent ¶ added in v0.4.3
func (m *ListUserResponse) GetSpeedCurrent() *Speed
func (*ListUserResponse) GetSpeedLimit ¶ added in v0.4.3
func (m *ListUserResponse) GetSpeedLimit() *Speed
func (*ListUserResponse) GetTrafficTotal ¶ added in v0.4.3
func (m *ListUserResponse) GetTrafficTotal() *Traffic
func (*ListUserResponse) GetUser ¶ added in v0.4.3
func (m *ListUserResponse) GetUser() *User
func (*ListUserResponse) ProtoMessage ¶ added in v0.4.3
func (*ListUserResponse) ProtoMessage()
func (*ListUserResponse) Reset ¶ added in v0.4.3
func (m *ListUserResponse) Reset()
func (*ListUserResponse) String ¶ added in v0.4.3
func (m *ListUserResponse) String() string
func (*ListUserResponse) XXX_DiscardUnknown ¶ added in v0.4.3
func (m *ListUserResponse) XXX_DiscardUnknown()
func (*ListUserResponse) XXX_Marshal ¶ added in v0.4.3
func (m *ListUserResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListUserResponse) XXX_Merge ¶ added in v0.4.3
func (m *ListUserResponse) XXX_Merge(src proto.Message)
func (*ListUserResponse) XXX_Size ¶ added in v0.4.3
func (m *ListUserResponse) XXX_Size() int
func (*ListUserResponse) XXX_Unmarshal ¶ added in v0.4.3
func (m *ListUserResponse) XXX_Unmarshal(b []byte) error
type ServerAPI ¶ added in v0.4.3
type ServerAPI struct { TrojanServerServiceServer // contains filtered or unexported fields }
func (*ServerAPI) GetTraffic ¶ added in v0.4.3
func (s *ServerAPI) GetTraffic(stream TrojanServerService_GetTrafficServer) error
func (*ServerAPI) ListUsers ¶ added in v0.4.3
func (s *ServerAPI) ListUsers(req *ListUserRequest, stream TrojanServerService_ListUsersServer) error
func (*ServerAPI) SetUsers ¶ added in v0.4.3
func (s *ServerAPI) SetUsers(stream TrojanServerService_SetUsersServer) error
type SetUserRequest ¶ added in v0.4.3
type SetUserRequest struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` SpeedLimit *Speed `protobuf:"bytes,2,opt,name=speed_limit,json=speedLimit,proto3" json:"speed_limit,omitempty"` Operation SetUserRequest_Operation `protobuf:"varint,3,opt,name=operation,proto3,enum=trojan.api.SetUserRequest_Operation" json:"operation,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SetUserRequest) Descriptor ¶ added in v0.4.3
func (*SetUserRequest) Descriptor() ([]byte, []int)
func (*SetUserRequest) GetOperation ¶ added in v0.4.3
func (m *SetUserRequest) GetOperation() SetUserRequest_Operation
func (*SetUserRequest) GetSpeedLimit ¶ added in v0.4.3
func (m *SetUserRequest) GetSpeedLimit() *Speed
func (*SetUserRequest) GetUser ¶ added in v0.4.3
func (m *SetUserRequest) GetUser() *User
func (*SetUserRequest) ProtoMessage ¶ added in v0.4.3
func (*SetUserRequest) ProtoMessage()
func (*SetUserRequest) Reset ¶ added in v0.4.3
func (m *SetUserRequest) Reset()
func (*SetUserRequest) String ¶ added in v0.4.3
func (m *SetUserRequest) String() string
func (*SetUserRequest) XXX_DiscardUnknown ¶ added in v0.4.3
func (m *SetUserRequest) XXX_DiscardUnknown()
func (*SetUserRequest) XXX_Marshal ¶ added in v0.4.3
func (m *SetUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SetUserRequest) XXX_Merge ¶ added in v0.4.3
func (m *SetUserRequest) XXX_Merge(src proto.Message)
func (*SetUserRequest) XXX_Size ¶ added in v0.4.3
func (m *SetUserRequest) XXX_Size() int
func (*SetUserRequest) XXX_Unmarshal ¶ added in v0.4.3
func (m *SetUserRequest) XXX_Unmarshal(b []byte) error
type SetUserRequest_Operation ¶ added in v0.4.3
type SetUserRequest_Operation int32
const ( SetUserRequest_Add SetUserRequest_Operation = 0 SetUserRequest_Delete SetUserRequest_Operation = 1 SetUserRequest_Modify SetUserRequest_Operation = 2 )
func (SetUserRequest_Operation) EnumDescriptor ¶ added in v0.4.3
func (SetUserRequest_Operation) EnumDescriptor() ([]byte, []int)
func (SetUserRequest_Operation) String ¶ added in v0.4.3
func (x SetUserRequest_Operation) String() string
type SetUserResponse ¶ added in v0.4.3
type SetUserResponse 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SetUserResponse) Descriptor ¶ added in v0.4.3
func (*SetUserResponse) Descriptor() ([]byte, []int)
func (*SetUserResponse) GetInfo ¶ added in v0.4.3
func (m *SetUserResponse) GetInfo() string
func (*SetUserResponse) GetSuccess ¶ added in v0.4.3
func (m *SetUserResponse) GetSuccess() bool
func (*SetUserResponse) ProtoMessage ¶ added in v0.4.3
func (*SetUserResponse) ProtoMessage()
func (*SetUserResponse) Reset ¶ added in v0.4.3
func (m *SetUserResponse) Reset()
func (*SetUserResponse) String ¶ added in v0.4.3
func (m *SetUserResponse) String() string
func (*SetUserResponse) XXX_DiscardUnknown ¶ added in v0.4.3
func (m *SetUserResponse) XXX_DiscardUnknown()
func (*SetUserResponse) XXX_Marshal ¶ added in v0.4.3
func (m *SetUserResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SetUserResponse) XXX_Merge ¶ added in v0.4.3
func (m *SetUserResponse) XXX_Merge(src proto.Message)
func (*SetUserResponse) XXX_Size ¶ added in v0.4.3
func (m *SetUserResponse) XXX_Size() int
func (*SetUserResponse) XXX_Unmarshal ¶ added in v0.4.3
func (m *SetUserResponse) XXX_Unmarshal(b []byte) error
type Speed ¶ added in v0.4.3
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Speed) Descriptor ¶ added in v0.4.3
func (*Speed) GetDownloadSpeed ¶ added in v0.4.3
func (*Speed) GetUploadSpeed ¶ added in v0.4.3
func (*Speed) ProtoMessage ¶ added in v0.4.3
func (*Speed) ProtoMessage()
func (*Speed) XXX_DiscardUnknown ¶ added in v0.4.3
func (m *Speed) XXX_DiscardUnknown()
func (*Speed) XXX_Marshal ¶ added in v0.4.3
func (*Speed) XXX_Unmarshal ¶ added in v0.4.3
type Traffic ¶ added in v0.4.3
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Traffic) Descriptor ¶ added in v0.4.3
func (*Traffic) GetDownloadTraffic ¶ added in v0.4.3
func (*Traffic) GetUploadTraffic ¶ added in v0.4.3
func (*Traffic) ProtoMessage ¶ added in v0.4.3
func (*Traffic) ProtoMessage()
func (*Traffic) XXX_DiscardUnknown ¶ added in v0.4.3
func (m *Traffic) XXX_DiscardUnknown()
func (*Traffic) XXX_Marshal ¶ added in v0.4.3
func (*Traffic) XXX_Unmarshal ¶ added in v0.4.3
type TrojanClientServiceClient ¶ added in v0.4.3
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://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewTrojanClientServiceClient ¶ added in v0.4.3
func NewTrojanClientServiceClient(cc grpc.ClientConnInterface) TrojanClientServiceClient
type TrojanClientServiceServer ¶ added in v0.4.3
type TrojanClientServiceServer interface {
GetTraffic(context.Context, *GetTrafficRequest) (*GetTrafficResponse, error)
}
TrojanClientServiceServer is the server API for TrojanClientService service.
type TrojanServerServiceClient ¶ added in v0.4.3
type TrojanServerServiceClient interface { ListUsers(ctx context.Context, in *ListUserRequest, opts ...grpc.CallOption) (TrojanServerService_ListUsersClient, error) GetTraffic(ctx context.Context, opts ...grpc.CallOption) (TrojanServerService_GetTrafficClient, error) 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://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewTrojanServerServiceClient ¶ added in v0.4.3
func NewTrojanServerServiceClient(cc grpc.ClientConnInterface) TrojanServerServiceClient
type TrojanServerServiceServer ¶ added in v0.4.3
type TrojanServerServiceServer interface { ListUsers(*ListUserRequest, TrojanServerService_ListUsersServer) error GetTraffic(TrojanServerService_GetTrafficServer) error SetUsers(TrojanServerService_SetUsersServer) error }
TrojanServerServiceServer is the server API for TrojanServerService service.
type TrojanServerService_GetTrafficClient ¶ added in v0.4.3
type TrojanServerService_GetTrafficClient interface { Send(*GetTrafficRequest) error Recv() (*GetTrafficResponse, error) grpc.ClientStream }
type TrojanServerService_GetTrafficServer ¶ added in v0.4.3
type TrojanServerService_GetTrafficServer interface { Send(*GetTrafficResponse) error Recv() (*GetTrafficRequest, error) grpc.ServerStream }
type TrojanServerService_ListUsersClient ¶ added in v0.4.3
type TrojanServerService_ListUsersClient interface { Recv() (*ListUserResponse, error) grpc.ClientStream }
type TrojanServerService_ListUsersServer ¶ added in v0.4.3
type TrojanServerService_ListUsersServer interface { Send(*ListUserResponse) error grpc.ServerStream }
type TrojanServerService_SetUsersClient ¶ added in v0.4.3
type TrojanServerService_SetUsersClient interface { Send(*SetUserRequest) error Recv() (*SetUserResponse, error) grpc.ClientStream }
type TrojanServerService_SetUsersServer ¶ added in v0.4.3
type TrojanServerService_SetUsersServer interface { Send(*SetUserResponse) error Recv() (*SetUserRequest, error) grpc.ServerStream }
type UnimplementedTrojanClientServiceServer ¶ added in v0.4.3
type UnimplementedTrojanClientServiceServer struct { }
UnimplementedTrojanClientServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedTrojanClientServiceServer) GetTraffic ¶ added in v0.4.3
func (*UnimplementedTrojanClientServiceServer) GetTraffic(ctx context.Context, req *GetTrafficRequest) (*GetTrafficResponse, error)
type UnimplementedTrojanServerServiceServer ¶ added in v0.4.3
type UnimplementedTrojanServerServiceServer struct { }
UnimplementedTrojanServerServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedTrojanServerServiceServer) GetTraffic ¶ added in v0.4.3
func (*UnimplementedTrojanServerServiceServer) GetTraffic(srv TrojanServerService_GetTrafficServer) error
func (*UnimplementedTrojanServerServiceServer) ListUsers ¶ added in v0.4.3
func (*UnimplementedTrojanServerServiceServer) ListUsers(req *ListUserRequest, srv TrojanServerService_ListUsersServer) error
func (*UnimplementedTrojanServerServiceServer) SetUsers ¶ added in v0.4.3
func (*UnimplementedTrojanServerServiceServer) SetUsers(srv TrojanServerService_SetUsersServer) error
type User ¶ added in v0.4.3
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*User) Descriptor ¶ added in v0.4.3
func (*User) GetPassword ¶ added in v0.4.3
func (*User) ProtoMessage ¶ added in v0.4.3
func (*User) ProtoMessage()
func (*User) XXX_DiscardUnknown ¶ added in v0.4.3
func (m *User) XXX_DiscardUnknown()