gen

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Auth_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "auth.Auth",
	HandlerType: (*AuthServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Login",
			Handler:    _Auth_Login_Handler,
		},
		{
			MethodName: "Validate",
			Handler:    _Auth_Validate_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "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)

Functions

func RegisterAuthServer

func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)

Types

type AuthClient

type AuthClient interface {
	Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*AuthToken, error)
	Validate(ctx context.Context, in *ValidationRequest, opts ...grpc.CallOption) (*ValidationResult, 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 AuthServer

type AuthServer interface {
	Login(context.Context, *LoginRequest) (*AuthToken, error)
	Validate(context.Context, *ValidationRequest) (*ValidationResult, error)
	// contains filtered or unexported methods
}

AuthServer is the server API for Auth service. All implementations must embed UnimplementedAuthServer for forward compatibility

type AuthToken

type AuthToken struct {
	Token   string                 `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	Email   string                 `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	Expires *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=expires,proto3" json:"expires,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthToken) Descriptor deprecated

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

Deprecated: Use AuthToken.ProtoReflect.Descriptor instead.

func (*AuthToken) GetEmail

func (x *AuthToken) GetEmail() string

func (*AuthToken) GetExpires added in v0.0.13

func (x *AuthToken) GetExpires() *timestamppb.Timestamp

func (*AuthToken) GetToken

func (x *AuthToken) GetToken() string

func (*AuthToken) ProtoMessage

func (*AuthToken) ProtoMessage()

func (*AuthToken) ProtoReflect

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

func (*AuthToken) Reset

func (x *AuthToken) Reset()

func (*AuthToken) String

func (x *AuthToken) String() string

type LoginRequest

type LoginRequest struct {
	Email    string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginRequest) Descriptor deprecated

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

Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.

func (*LoginRequest) GetEmail

func (x *LoginRequest) GetEmail() string

func (*LoginRequest) GetPassword

func (x *LoginRequest) GetPassword() string

func (*LoginRequest) ProtoMessage

func (*LoginRequest) ProtoMessage()

func (*LoginRequest) ProtoReflect

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

func (*LoginRequest) Reset

func (x *LoginRequest) Reset()

func (*LoginRequest) String

func (x *LoginRequest) String() string

type UnimplementedAuthServer

type UnimplementedAuthServer struct {
}

UnimplementedAuthServer must be embedded to have forward compatible implementations.

func (UnimplementedAuthServer) Login

func (UnimplementedAuthServer) Validate

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 ValidationRequest

type ValidationRequest struct {
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

func (*ValidationRequest) Descriptor deprecated

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

Deprecated: Use ValidationRequest.ProtoReflect.Descriptor instead.

func (*ValidationRequest) GetToken

func (x *ValidationRequest) GetToken() string

func (*ValidationRequest) ProtoMessage

func (*ValidationRequest) ProtoMessage()

func (*ValidationRequest) ProtoReflect

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

func (*ValidationRequest) Reset

func (x *ValidationRequest) Reset()

func (*ValidationRequest) String

func (x *ValidationRequest) String() string

type ValidationResult

type ValidationResult struct {
	Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"`
	// contains filtered or unexported fields
}

func (*ValidationResult) Descriptor deprecated

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

Deprecated: Use ValidationResult.ProtoReflect.Descriptor instead.

func (*ValidationResult) GetValid

func (x *ValidationResult) GetValid() bool

func (*ValidationResult) ProtoMessage

func (*ValidationResult) ProtoMessage()

func (*ValidationResult) ProtoReflect

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

func (*ValidationResult) Reset

func (x *ValidationResult) Reset()

func (*ValidationResult) String

func (x *ValidationResult) String() string

Jump to

Keyboard shortcuts

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