server

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2025 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Sessions []Session
)

Functions

func NewSession

func NewSession(userID uint64, ipAddress string, expiryTime time.Duration) string

Types

type Session

type Session struct {
	UserID       uint64
	SessionToken string
	IPAddress    string
	ExpireTime   time.Time
}

type UserServer

type UserServer struct {
	pb.UnimplementedUserServer
}

func (*UserServer) AddGroups

func (*UserServer) AddPermissions

func (*UserServer) GetUserData

func (u *UserServer) GetUserData(ctx context.Context, in *pb.GetUserDataRequest) (*pb.UserDataResponse, error)

func (*UserServer) Login

func (u *UserServer) Login(ctx context.Context, in *pb.LoginRequest) (*pb.LoginResponse, error)

func (*UserServer) Logout

func (u *UserServer) Logout(ctx context.Context, in *pb.LogoutRequest) (*pb.LogoutResponse, error)

Jump to

Keyboard shortcuts

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