Documentation ¶
Index ¶
- Variables
- func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)
- type AuthServiceClient
- type AuthServiceServer
- type FindByIdsRequest
- type FindByIdsResponse
- func (*FindByIdsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *FindByIdsResponse) GetTotal() int32
- func (x *FindByIdsResponse) GetUsers() []*UserData
- func (*FindByIdsResponse) ProtoMessage()
- func (x *FindByIdsResponse) ProtoReflect() protoreflect.Message
- func (x *FindByIdsResponse) Reset()
- func (x *FindByIdsResponse) String() string
- type UnimplementedAuthServiceServer
- type UnsafeAuthServiceServer
- type UserData
- func (*UserData) Descriptor() ([]byte, []int)deprecated
- func (x *UserData) GetEmail() string
- func (x *UserData) GetExpAt() int32
- func (x *UserData) GetFirstName() string
- func (x *UserData) GetId() string
- func (x *UserData) GetIsActive() bool
- func (x *UserData) GetLastName() string
- func (x *UserData) GetPhone() string
- func (*UserData) ProtoMessage()
- func (x *UserData) ProtoReflect() protoreflect.Message
- func (x *UserData) Reset()
- func (x *UserData) String() string
- type ValidateTokenRequest
- func (*ValidateTokenRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ValidateTokenRequest) GetToken() string
- func (*ValidateTokenRequest) ProtoMessage()
- func (x *ValidateTokenRequest) ProtoReflect() protoreflect.Message
- func (x *ValidateTokenRequest) Reset()
- func (x *ValidateTokenRequest) String() string
Constants ¶
This section is empty.
Variables ¶
var AuthService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "auth.proxy.AuthService", HandlerType: (*AuthServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ValidateToken", Handler: _AuthService_ValidateToken_Handler, }, { MethodName: "FindByIds", Handler: _AuthService_FindByIds_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/auth.proto", }
AuthService_ServiceDesc is the grpc.ServiceDesc for AuthService 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
Functions ¶
func RegisterAuthServiceServer ¶
func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)
Types ¶
type AuthServiceClient ¶
type AuthServiceClient interface { ValidateToken(ctx context.Context, in *ValidateTokenRequest, opts ...grpc.CallOption) (*UserData, error) FindByIds(ctx context.Context, in *FindByIdsRequest, opts ...grpc.CallOption) (*FindByIdsResponse, error) }
AuthServiceClient is the client API for AuthService 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 NewAuthServiceClient ¶
func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient
type AuthServiceServer ¶
type AuthServiceServer interface { ValidateToken(context.Context, *ValidateTokenRequest) (*UserData, error) FindByIds(context.Context, *FindByIdsRequest) (*FindByIdsResponse, error) // contains filtered or unexported methods }
AuthServiceServer is the server API for AuthService service. All implementations must embed UnimplementedAuthServiceServer for forward compatibility
type FindByIdsRequest ¶
type FindByIdsRequest struct { Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"` // contains filtered or unexported fields }
func (*FindByIdsRequest) Descriptor
deprecated
func (*FindByIdsRequest) Descriptor() ([]byte, []int)
Deprecated: Use FindByIdsRequest.ProtoReflect.Descriptor instead.
func (*FindByIdsRequest) GetIds ¶
func (x *FindByIdsRequest) GetIds() []string
func (*FindByIdsRequest) ProtoMessage ¶
func (*FindByIdsRequest) ProtoMessage()
func (*FindByIdsRequest) ProtoReflect ¶
func (x *FindByIdsRequest) ProtoReflect() protoreflect.Message
func (*FindByIdsRequest) Reset ¶
func (x *FindByIdsRequest) Reset()
func (*FindByIdsRequest) String ¶
func (x *FindByIdsRequest) String() string
type FindByIdsResponse ¶
type FindByIdsResponse struct { Users []*UserData `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` // contains filtered or unexported fields }
func (*FindByIdsResponse) Descriptor
deprecated
func (*FindByIdsResponse) Descriptor() ([]byte, []int)
Deprecated: Use FindByIdsResponse.ProtoReflect.Descriptor instead.
func (*FindByIdsResponse) GetTotal ¶
func (x *FindByIdsResponse) GetTotal() int32
func (*FindByIdsResponse) GetUsers ¶
func (x *FindByIdsResponse) GetUsers() []*UserData
func (*FindByIdsResponse) ProtoMessage ¶
func (*FindByIdsResponse) ProtoMessage()
func (*FindByIdsResponse) ProtoReflect ¶
func (x *FindByIdsResponse) ProtoReflect() protoreflect.Message
func (*FindByIdsResponse) Reset ¶
func (x *FindByIdsResponse) Reset()
func (*FindByIdsResponse) String ¶
func (x *FindByIdsResponse) String() string
type UnimplementedAuthServiceServer ¶
type UnimplementedAuthServiceServer struct { }
UnimplementedAuthServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedAuthServiceServer) FindByIds ¶
func (UnimplementedAuthServiceServer) FindByIds(context.Context, *FindByIdsRequest) (*FindByIdsResponse, error)
func (UnimplementedAuthServiceServer) ValidateToken ¶
func (UnimplementedAuthServiceServer) ValidateToken(context.Context, *ValidateTokenRequest) (*UserData, error)
type UnsafeAuthServiceServer ¶
type UnsafeAuthServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAuthServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthServiceServer will result in compilation errors.
type UserData ¶
type UserData struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Phone string `protobuf:"bytes,2,opt,name=phone,proto3" json:"phone,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` FirstName string `protobuf:"bytes,4,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"` LastName string `protobuf:"bytes,5,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"` IsActive bool `protobuf:"varint,6,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` ExpAt int32 `protobuf:"varint,7,opt,name=exp_at,json=expAt,proto3" json:"exp_at,omitempty"` // contains filtered or unexported fields }
func (*UserData) Descriptor
deprecated
func (*UserData) GetFirstName ¶
func (*UserData) GetIsActive ¶
func (*UserData) GetLastName ¶
func (*UserData) ProtoMessage ¶
func (*UserData) ProtoMessage()
func (*UserData) ProtoReflect ¶
func (x *UserData) ProtoReflect() protoreflect.Message
type ValidateTokenRequest ¶
type ValidateTokenRequest struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*ValidateTokenRequest) Descriptor
deprecated
func (*ValidateTokenRequest) Descriptor() ([]byte, []int)
Deprecated: Use ValidateTokenRequest.ProtoReflect.Descriptor instead.
func (*ValidateTokenRequest) GetToken ¶
func (x *ValidateTokenRequest) GetToken() string
func (*ValidateTokenRequest) ProtoMessage ¶
func (*ValidateTokenRequest) ProtoMessage()
func (*ValidateTokenRequest) ProtoReflect ¶
func (x *ValidateTokenRequest) ProtoReflect() protoreflect.Message
func (*ValidateTokenRequest) Reset ¶
func (x *ValidateTokenRequest) Reset()
func (*ValidateTokenRequest) String ¶
func (x *ValidateTokenRequest) String() string