pb

package
v0.0.0-...-175a4df Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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)

View Source
var File_proto_auth_proto protoreflect.FileDescriptor
View Source
var File_proto_vehicle_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use AuthReply.ProtoReflect.Descriptor instead.

func (*AuthReply) GetAuthorized

func (x *AuthReply) GetAuthorized() bool

func (*AuthReply) GetExpiresAt

func (x *AuthReply) GetExpiresAt() *timestamppb.Timestamp

func (*AuthReply) GetSubject

func (x *AuthReply) GetSubject() string

func (*AuthReply) ProtoMessage

func (*AuthReply) ProtoMessage()

func (*AuthReply) ProtoReflect

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

func (*AuthReply) Reset

func (x *AuthReply) Reset()

func (*AuthReply) String

func (x *AuthReply) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use NewReply.ProtoReflect.Descriptor instead.

func (*NewReply) GetVehicleId

func (x *NewReply) GetVehicleId() int64

func (*NewReply) ProtoMessage

func (*NewReply) ProtoMessage()

func (*NewReply) ProtoReflect

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

func (*NewReply) Reset

func (x *NewReply) Reset()

func (*NewReply) String

func (x *NewReply) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use SoCReply.ProtoReflect.Descriptor instead.

func (*SoCReply) GetSoc

func (x *SoCReply) GetSoc() float64

func (*SoCReply) ProtoMessage

func (*SoCReply) ProtoMessage()

func (*SoCReply) ProtoReflect

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

func (*SoCReply) Reset

func (x *SoCReply) Reset()

func (*SoCReply) String

func (x *SoCReply) String() string

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

type UnimplementedVehicleServer

type UnimplementedVehicleServer struct {
}

UnimplementedVehicleServer must be embedded to have forward compatible implementations.

func (UnimplementedVehicleServer) New

func (UnimplementedVehicleServer) SoC

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

Jump to

Keyboard shortcuts

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