Documentation ¶
Index ¶
- Variables
- func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)
- func RegisterVehicleServer(s grpc.ServiceRegistrar, srv VehicleServer)
- type AuthClient
- type AuthReply
- func (*AuthReply) Descriptor() ([]byte, []int)deprecated
- func (x *AuthReply) GetAuthorized() bool
- func (x *AuthReply) GetExpiresAt() *timestamppb.Timestamp
- func (x *AuthReply) GetSubject() string
- func (*AuthReply) ProtoMessage()
- func (x *AuthReply) ProtoReflect() protoreflect.Message
- func (x *AuthReply) Reset()
- func (x *AuthReply) String() string
- type AuthRequest
- type AuthServer
- type NewReply
- type NewRequest
- func (*NewRequest) Descriptor() ([]byte, []int)deprecated
- func (x *NewRequest) GetConfig() map[string]string
- func (x *NewRequest) GetToken() string
- func (x *NewRequest) GetType() string
- func (*NewRequest) ProtoMessage()
- func (x *NewRequest) ProtoReflect() protoreflect.Message
- func (x *NewRequest) Reset()
- func (x *NewRequest) String() string
- type SoCReply
- type SoCRequest
- type UnimplementedAuthServer
- type UnimplementedVehicleServer
- type UnsafeAuthServer
- type UnsafeVehicleServer
- type VehicleClient
- type VehicleServer
Constants ¶
This section is empty.
Variables ¶
var Auth_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Auth", HandlerType: (*AuthServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "IsAuthorized", Handler: _Auth_IsAuthorized_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/auth.proto", }
Auth_ServiceDesc is the grpc.ServiceDesc for Auth service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_proto_auth_proto protoreflect.FileDescriptor
var File_proto_vehicle_proto protoreflect.FileDescriptor
var Vehicle_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Vehicle", HandlerType: (*VehicleServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "New", Handler: _Vehicle_New_Handler, }, { MethodName: "SoC", Handler: _Vehicle_SoC_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/vehicle.proto", }
Vehicle_ServiceDesc is the grpc.ServiceDesc for Vehicle service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterAuthServer ¶
func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)
func RegisterVehicleServer ¶
func RegisterVehicleServer(s grpc.ServiceRegistrar, srv VehicleServer)
Types ¶
type AuthClient ¶
type AuthClient interface {
IsAuthorized(ctx context.Context, in *AuthRequest, opts ...grpc.CallOption) (*AuthReply, error)
}
AuthClient is the client API for Auth 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 NewAuthClient ¶
func NewAuthClient(cc grpc.ClientConnInterface) AuthClient
type AuthReply ¶
type AuthReply struct { Authorized bool `protobuf:"varint,1,opt,name=authorized,proto3" json:"authorized,omitempty"` Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` // contains filtered or unexported fields }
func (*AuthReply) Descriptor
deprecated
func (*AuthReply) GetAuthorized ¶
func (*AuthReply) GetExpiresAt ¶
func (x *AuthReply) GetExpiresAt() *timestamppb.Timestamp
func (*AuthReply) GetSubject ¶
func (*AuthReply) ProtoMessage ¶
func (*AuthReply) ProtoMessage()
func (*AuthReply) ProtoReflect ¶
func (x *AuthReply) ProtoReflect() protoreflect.Message
type AuthRequest ¶
type AuthRequest struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*AuthRequest) Descriptor
deprecated
func (*AuthRequest) Descriptor() ([]byte, []int)
Deprecated: Use AuthRequest.ProtoReflect.Descriptor instead.
func (*AuthRequest) GetToken ¶
func (x *AuthRequest) GetToken() string
func (*AuthRequest) ProtoMessage ¶
func (*AuthRequest) ProtoMessage()
func (*AuthRequest) ProtoReflect ¶
func (x *AuthRequest) ProtoReflect() protoreflect.Message
func (*AuthRequest) Reset ¶
func (x *AuthRequest) Reset()
func (*AuthRequest) String ¶
func (x *AuthRequest) String() string
type AuthServer ¶
type AuthServer interface { IsAuthorized(context.Context, *AuthRequest) (*AuthReply, error) // contains filtered or unexported methods }
AuthServer is the server API for Auth service. All implementations must embed UnimplementedAuthServer for forward compatibility
type NewReply ¶
type NewReply struct { VehicleId int64 `protobuf:"varint,1,opt,name=vehicle_id,json=vehicleId,proto3" json:"vehicle_id,omitempty"` // contains filtered or unexported fields }
func (*NewReply) Descriptor
deprecated
func (*NewReply) GetVehicleId ¶
func (*NewReply) ProtoMessage ¶
func (*NewReply) ProtoMessage()
func (*NewReply) ProtoReflect ¶
func (x *NewReply) ProtoReflect() protoreflect.Message
type NewRequest ¶
type NewRequest struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` Config map[string]string `` /* 153-byte string literal not displayed */ // contains filtered or unexported fields }
func (*NewRequest) Descriptor
deprecated
func (*NewRequest) Descriptor() ([]byte, []int)
Deprecated: Use NewRequest.ProtoReflect.Descriptor instead.
func (*NewRequest) GetConfig ¶
func (x *NewRequest) GetConfig() map[string]string
func (*NewRequest) GetToken ¶
func (x *NewRequest) GetToken() string
func (*NewRequest) GetType ¶
func (x *NewRequest) GetType() string
func (*NewRequest) ProtoMessage ¶
func (*NewRequest) ProtoMessage()
func (*NewRequest) ProtoReflect ¶
func (x *NewRequest) ProtoReflect() protoreflect.Message
func (*NewRequest) Reset ¶
func (x *NewRequest) Reset()
func (*NewRequest) String ¶
func (x *NewRequest) String() string
type SoCReply ¶
type SoCReply struct { Soc float64 `protobuf:"fixed64,1,opt,name=soc,proto3" json:"soc,omitempty"` // contains filtered or unexported fields }
func (*SoCReply) Descriptor
deprecated
func (*SoCReply) ProtoMessage ¶
func (*SoCReply) ProtoMessage()
func (*SoCReply) ProtoReflect ¶
func (x *SoCReply) ProtoReflect() protoreflect.Message
type SoCRequest ¶
type SoCRequest struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` VehicleId int64 `protobuf:"varint,2,opt,name=vehicle_id,json=vehicleId,proto3" json:"vehicle_id,omitempty"` // contains filtered or unexported fields }
func (*SoCRequest) Descriptor
deprecated
func (*SoCRequest) Descriptor() ([]byte, []int)
Deprecated: Use SoCRequest.ProtoReflect.Descriptor instead.
func (*SoCRequest) GetToken ¶
func (x *SoCRequest) GetToken() string
func (*SoCRequest) GetVehicleId ¶
func (x *SoCRequest) GetVehicleId() int64
func (*SoCRequest) ProtoMessage ¶
func (*SoCRequest) ProtoMessage()
func (*SoCRequest) ProtoReflect ¶
func (x *SoCRequest) ProtoReflect() protoreflect.Message
func (*SoCRequest) Reset ¶
func (x *SoCRequest) Reset()
func (*SoCRequest) String ¶
func (x *SoCRequest) String() string
type UnimplementedAuthServer ¶
type UnimplementedAuthServer struct { }
UnimplementedAuthServer must be embedded to have forward compatible implementations.
func (UnimplementedAuthServer) IsAuthorized ¶
func (UnimplementedAuthServer) IsAuthorized(context.Context, *AuthRequest) (*AuthReply, error)
type UnimplementedVehicleServer ¶
type UnimplementedVehicleServer struct { }
UnimplementedVehicleServer must be embedded to have forward compatible implementations.
func (UnimplementedVehicleServer) New ¶
func (UnimplementedVehicleServer) New(context.Context, *NewRequest) (*NewReply, error)
func (UnimplementedVehicleServer) SoC ¶
func (UnimplementedVehicleServer) SoC(context.Context, *SoCRequest) (*SoCReply, error)
type UnsafeAuthServer ¶
type UnsafeAuthServer interface {
// contains filtered or unexported methods
}
UnsafeAuthServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthServer will result in compilation errors.
type UnsafeVehicleServer ¶
type UnsafeVehicleServer interface {
// contains filtered or unexported methods
}
UnsafeVehicleServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to VehicleServer will result in compilation errors.
type VehicleClient ¶
type VehicleClient interface { New(ctx context.Context, in *NewRequest, opts ...grpc.CallOption) (*NewReply, error) SoC(ctx context.Context, in *SoCRequest, opts ...grpc.CallOption) (*SoCReply, error) }
VehicleClient is the client API for Vehicle 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 NewVehicleClient ¶
func NewVehicleClient(cc grpc.ClientConnInterface) VehicleClient
type VehicleServer ¶
type VehicleServer interface { New(context.Context, *NewRequest) (*NewReply, error) SoC(context.Context, *SoCRequest) (*SoCReply, error) // contains filtered or unexported methods }
VehicleServer is the server API for Vehicle service. All implementations must embed UnimplementedVehicleServer for forward compatibility