auth

package
v0.0.0-...-3122bcc Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SessionManger_Login_FullMethodName  = "/auth.SessionManger/Login"
	SessionManger_Check_FullMethodName  = "/auth.SessionManger/Check"
	SessionManger_Create_FullMethodName = "/auth.SessionManger/Create"
	SessionManger_Delete_FullMethodName = "/auth.SessionManger/Delete"
)

Variables

View Source
var File_pkg_auth_auth_proto protoreflect.FileDescriptor
View Source
var SessionManger_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "auth.SessionManger",
	HandlerType: (*SessionMangerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Login",
			Handler:    _SessionManger_Login_Handler,
		},
		{
			MethodName: "Check",
			Handler:    _SessionManger_Check_Handler,
		},
		{
			MethodName: "Create",
			Handler:    _SessionManger_Create_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _SessionManger_Delete_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "pkg/auth/auth.proto",
}

SessionManger_ServiceDesc is the grpc.ServiceDesc for SessionManger service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterSessionMangerServer

func RegisterSessionMangerServer(s grpc.ServiceRegistrar, srv SessionMangerServer)

Types

type Nothing

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

func (*Nothing) Descriptor deprecated

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

Deprecated: Use Nothing.ProtoReflect.Descriptor instead.

func (*Nothing) ProtoMessage

func (*Nothing) ProtoMessage()

func (*Nothing) ProtoReflect

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

func (*Nothing) Reset

func (x *Nothing) Reset()

func (*Nothing) String

func (x *Nothing) String() string

type Session

type Session struct {
	AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
	// contains filtered or unexported fields
}

func (*Session) Descriptor deprecated

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

Deprecated: Use Session.ProtoReflect.Descriptor instead.

func (*Session) GetAccessToken

func (x *Session) GetAccessToken() string

func (*Session) ProtoMessage

func (*Session) ProtoMessage()

func (*Session) ProtoReflect

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

func (*Session) Reset

func (x *Session) Reset()

func (*Session) String

func (x *Session) String() string

type SessionMangerClient

type SessionMangerClient interface {
	Login(ctx context.Context, in *User, opts ...grpc.CallOption) (*Session, error)
	Check(ctx context.Context, in *Session, opts ...grpc.CallOption) (*UserID, error)
	Create(ctx context.Context, in *User, opts ...grpc.CallOption) (*Session, error)
	Delete(ctx context.Context, in *Session, opts ...grpc.CallOption) (*Session, error)
}

SessionMangerClient is the client API for SessionManger 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.

type SessionMangerServer

type SessionMangerServer interface {
	Login(context.Context, *User) (*Session, error)
	Check(context.Context, *Session) (*UserID, error)
	Create(context.Context, *User) (*Session, error)
	Delete(context.Context, *Session) (*Session, error)
	// contains filtered or unexported methods
}

SessionMangerServer is the server API for SessionManger service. All implementations must embed UnimplementedSessionMangerServer for forward compatibility

type UnimplementedSessionMangerServer

type UnimplementedSessionMangerServer struct {
}

UnimplementedSessionMangerServer must be embedded to have forward compatible implementations.

func (UnimplementedSessionMangerServer) Check

func (UnimplementedSessionMangerServer) Create

func (UnimplementedSessionMangerServer) Delete

func (UnimplementedSessionMangerServer) Login

type UnsafeSessionMangerServer

type UnsafeSessionMangerServer interface {
	// contains filtered or unexported methods
}

UnsafeSessionMangerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SessionMangerServer will result in compilation errors.

type User

type User 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 (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetPassword

func (x *User) GetPassword() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

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

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

type UserID

type UserID struct {
	UserId uint64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

func (*UserID) Descriptor deprecated

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

Deprecated: Use UserID.ProtoReflect.Descriptor instead.

func (*UserID) GetUserId

func (x *UserID) GetUserId() uint64

func (*UserID) ProtoMessage

func (*UserID) ProtoMessage()

func (*UserID) ProtoReflect

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

func (*UserID) Reset

func (x *UserID) Reset()

func (*UserID) String

func (x *UserID) String() string

Directories

Path Synopsis
Code generated by MockGen.
Code generated by MockGen.

Jump to

Keyboard shortcuts

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