proto

package
v0.0.0-...-e796f14 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func RegisterAuthServiceServer

func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)

Types

type AuthService

type AuthService struct {
	// contains filtered or unexported fields
}

func (*AuthService) FindByIds

func (s *AuthService) FindByIds(ctx context.Context, request *FindByIdsRequest) (*FindByIdsResponse, error)

func (*AuthService) ValidateToken

func (s *AuthService) ValidateToken(ctx context.Context, request *ValidateTokenRequest) (*UserData, error)

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.golang.ir/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

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 GRPCServer

type GRPCServer struct {
	// contains filtered or unexported fields
}

func NewGRPCServer

func NewGRPCServer(
	appConfig *configs.AppConfig,
	authService *AuthService,
) *GRPCServer

func (*GRPCServer) Init

func (s *GRPCServer) Init() error

func (*GRPCServer) Stop

func (s *GRPCServer) Stop()

type UnimplementedAuthServiceServer

type UnimplementedAuthServiceServer struct {
}

UnimplementedAuthServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedAuthServiceServer) FindByIds

func (UnimplementedAuthServiceServer) ValidateToken

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"`
	// contains filtered or unexported fields
}

func (*UserData) Descriptor deprecated

func (*UserData) Descriptor() ([]byte, []int)

Deprecated: Use UserData.ProtoReflect.Descriptor instead.

func (*UserData) GetEmail

func (x *UserData) GetEmail() string

func (*UserData) GetFirstName

func (x *UserData) GetFirstName() string

func (*UserData) GetId

func (x *UserData) GetId() string

func (*UserData) GetIsActive

func (x *UserData) GetIsActive() bool

func (*UserData) GetLastName

func (x *UserData) GetLastName() string

func (*UserData) GetPhone

func (x *UserData) GetPhone() string

func (*UserData) ProtoMessage

func (*UserData) ProtoMessage()

func (*UserData) ProtoReflect

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

func (*UserData) Reset

func (x *UserData) Reset()

func (*UserData) String

func (x *UserData) String() string

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

Jump to

Keyboard shortcuts

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