session

package
v0.0.0-...-c26c475 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Sessio_CreateSession_FullMethodName        = "/session.Sessio/CreateSession"
	Sessio_Authenticate_FullMethodName         = "/session.Sessio/Authenticate"
	Sessio_GetAllActiveSessions_FullMethodName = "/session.Sessio/GetAllActiveSessions"
	Sessio_DeleteSession_FullMethodName        = "/session.Sessio/DeleteSession"
)

Variables

View Source
var File_sessio_proto protoreflect.FileDescriptor
View Source
var Sessio_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "session.Sessio",
	HandlerType: (*SessioServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateSession",
			Handler:    _Sessio_CreateSession_Handler,
		},
		{
			MethodName: "Authenticate",
			Handler:    _Sessio_Authenticate_Handler,
		},
		{
			MethodName: "GetAllActiveSessions",
			Handler:    _Sessio_GetAllActiveSessions_Handler,
		},
		{
			MethodName: "DeleteSession",
			Handler:    _Sessio_DeleteSession_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "sessio.proto",
}

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

Functions

func RegisterSessioServer

func RegisterSessioServer(s grpc.ServiceRegistrar, srv SessioServer)

Types

type AuthenticateRequest

type AuthenticateRequest struct {
	AuthKey   string `protobuf:"bytes,1,opt,name=auth_key,json=authKey,proto3" json:"auth_key,omitempty"`
	UserAgent string `protobuf:"bytes,2,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthenticateRequest) Descriptor deprecated

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

Deprecated: Use AuthenticateRequest.ProtoReflect.Descriptor instead.

func (*AuthenticateRequest) GetAuthKey

func (x *AuthenticateRequest) GetAuthKey() string

func (*AuthenticateRequest) GetUserAgent

func (x *AuthenticateRequest) GetUserAgent() string

func (*AuthenticateRequest) ProtoMessage

func (*AuthenticateRequest) ProtoMessage()

func (*AuthenticateRequest) ProtoReflect

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

func (*AuthenticateRequest) Reset

func (x *AuthenticateRequest) Reset()

func (*AuthenticateRequest) String

func (x *AuthenticateRequest) String() string

type AuthenticateResponse

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

func (*AuthenticateResponse) Descriptor deprecated

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

Deprecated: Use AuthenticateResponse.ProtoReflect.Descriptor instead.

func (*AuthenticateResponse) GetUserId

func (x *AuthenticateResponse) GetUserId() string

func (*AuthenticateResponse) ProtoMessage

func (*AuthenticateResponse) ProtoMessage()

func (*AuthenticateResponse) ProtoReflect

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

func (*AuthenticateResponse) Reset

func (x *AuthenticateResponse) Reset()

func (*AuthenticateResponse) String

func (x *AuthenticateResponse) String() string

type CreateSessionRequest

type CreateSessionRequest struct {
	UserId    string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	UserAgent string `protobuf:"bytes,2,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateSessionRequest) Descriptor deprecated

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

Deprecated: Use CreateSessionRequest.ProtoReflect.Descriptor instead.

func (*CreateSessionRequest) GetUserAgent

func (x *CreateSessionRequest) GetUserAgent() string

func (*CreateSessionRequest) GetUserId

func (x *CreateSessionRequest) GetUserId() string

func (*CreateSessionRequest) ProtoMessage

func (*CreateSessionRequest) ProtoMessage()

func (*CreateSessionRequest) ProtoReflect

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

func (*CreateSessionRequest) Reset

func (x *CreateSessionRequest) Reset()

func (*CreateSessionRequest) String

func (x *CreateSessionRequest) String() string

type CreateSessionResponse

type CreateSessionResponse struct {
	AuthKey string `protobuf:"bytes,1,opt,name=auth_key,json=authKey,proto3" json:"auth_key,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateSessionResponse) Descriptor deprecated

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

Deprecated: Use CreateSessionResponse.ProtoReflect.Descriptor instead.

func (*CreateSessionResponse) GetAuthKey

func (x *CreateSessionResponse) GetAuthKey() string

func (*CreateSessionResponse) ProtoMessage

func (*CreateSessionResponse) ProtoMessage()

func (*CreateSessionResponse) ProtoReflect

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

func (*CreateSessionResponse) Reset

func (x *CreateSessionResponse) Reset()

func (*CreateSessionResponse) String

func (x *CreateSessionResponse) String() string

type DeleteSessionRequest

type DeleteSessionRequest struct {
	UserId    string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	UserAgent string `protobuf:"bytes,2,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteSessionRequest) Descriptor deprecated

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

Deprecated: Use DeleteSessionRequest.ProtoReflect.Descriptor instead.

func (*DeleteSessionRequest) GetUserAgent

func (x *DeleteSessionRequest) GetUserAgent() string

func (*DeleteSessionRequest) GetUserId

func (x *DeleteSessionRequest) GetUserId() string

func (*DeleteSessionRequest) ProtoMessage

func (*DeleteSessionRequest) ProtoMessage()

func (*DeleteSessionRequest) ProtoReflect

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

func (*DeleteSessionRequest) Reset

func (x *DeleteSessionRequest) Reset()

func (*DeleteSessionRequest) String

func (x *DeleteSessionRequest) String() string

type GetAllActiveSessionsRequest

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

func (*GetAllActiveSessionsRequest) Descriptor deprecated

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

Deprecated: Use GetAllActiveSessionsRequest.ProtoReflect.Descriptor instead.

func (*GetAllActiveSessionsRequest) GetUserId

func (x *GetAllActiveSessionsRequest) GetUserId() string

func (*GetAllActiveSessionsRequest) ProtoMessage

func (*GetAllActiveSessionsRequest) ProtoMessage()

func (*GetAllActiveSessionsRequest) ProtoReflect

func (*GetAllActiveSessionsRequest) Reset

func (x *GetAllActiveSessionsRequest) Reset()

func (*GetAllActiveSessionsRequest) String

func (x *GetAllActiveSessionsRequest) String() string

type GetAllActiveSessionsResponse

type GetAllActiveSessionsResponse struct {
	Sessions []*Session `protobuf:"bytes,1,rep,name=sessions,proto3" json:"sessions,omitempty"`
	Total    int32      `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAllActiveSessionsResponse) Descriptor deprecated

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

Deprecated: Use GetAllActiveSessionsResponse.ProtoReflect.Descriptor instead.

func (*GetAllActiveSessionsResponse) GetSessions

func (x *GetAllActiveSessionsResponse) GetSessions() []*Session

func (*GetAllActiveSessionsResponse) GetTotal

func (x *GetAllActiveSessionsResponse) GetTotal() int32

func (*GetAllActiveSessionsResponse) ProtoMessage

func (*GetAllActiveSessionsResponse) ProtoMessage()

func (*GetAllActiveSessionsResponse) ProtoReflect

func (*GetAllActiveSessionsResponse) Reset

func (x *GetAllActiveSessionsResponse) Reset()

func (*GetAllActiveSessionsResponse) String

type SessioClient

type SessioClient interface {
	CreateSession(ctx context.Context, in *CreateSessionRequest, opts ...grpc.CallOption) (*CreateSessionResponse, error)
	Authenticate(ctx context.Context, in *AuthenticateRequest, opts ...grpc.CallOption) (*AuthenticateResponse, error)
	GetAllActiveSessions(ctx context.Context, in *GetAllActiveSessionsRequest, opts ...grpc.CallOption) (*GetAllActiveSessionsResponse, error)
	DeleteSession(ctx context.Context, in *DeleteSessionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

SessioClient is the client API for Sessio 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 NewSessioClient

func NewSessioClient(cc grpc.ClientConnInterface) SessioClient

type SessioServer

type SessioServer interface {
	CreateSession(context.Context, *CreateSessionRequest) (*CreateSessionResponse, error)
	Authenticate(context.Context, *AuthenticateRequest) (*AuthenticateResponse, error)
	GetAllActiveSessions(context.Context, *GetAllActiveSessionsRequest) (*GetAllActiveSessionsResponse, error)
	DeleteSession(context.Context, *DeleteSessionRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

SessioServer is the server API for Sessio service. All implementations must embed UnimplementedSessioServer for forward compatibility.

type Session

type Session struct {
	UserId    string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	AuthKey   string `protobuf:"bytes,2,opt,name=auth_key,json=authKey,proto3" json:"auth_key,omitempty"`
	UserAgent string `protobuf:"bytes,3,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"`
	CreatedAt int64  `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	ExpiresAt int64  `protobuf:"varint,5,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
	// contains filtered or unexported fields
}

func (*Session) Descriptor deprecated

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

Deprecated: Use Session.ProtoReflect.Descriptor instead.

func (*Session) GetAuthKey

func (x *Session) GetAuthKey() string

func (*Session) GetCreatedAt

func (x *Session) GetCreatedAt() int64

func (*Session) GetExpiresAt

func (x *Session) GetExpiresAt() int64

func (*Session) GetUserAgent

func (x *Session) GetUserAgent() string

func (*Session) GetUserId

func (x *Session) GetUserId() 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 UnimplementedSessioServer

type UnimplementedSessioServer struct{}

UnimplementedSessioServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedSessioServer) Authenticate

func (UnimplementedSessioServer) CreateSession

func (UnimplementedSessioServer) DeleteSession

type UnsafeSessioServer

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

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

Jump to

Keyboard shortcuts

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