domain

package
v0.0.0-...-991afdd Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

type Session struct {
	ID        string    `json:"id"`         // Session UUID
	UserID    uint64    `json:"user_id"`    // User's ID
	UserUUID  uuid.UUID `json:"user_uuid"`  // User's UUID
	UserEmail string    `json:"user_email"` // User's email
	UserName  string    `json:"user_name"`  // User's full name
	UserRole  string    `json:"user_role"`  // User's role (admin, user, etc.)
	TenantID  uuid.UUID `json:"tenant_id"`  // Tenant ID for multi-tenancy
	CreatedAt time.Time `json:"created_at"` // When the session was created
	ExpiresAt time.Time `json:"expires_at"` // When the session expires
}

Session represents a user's authentication session

func NewSession

func NewSession(userID uint64, userUUID uuid.UUID, userEmail, userName, userRole string, tenantID uuid.UUID, duration time.Duration) *Session

NewSession creates a new session

func (*Session) IsExpired

func (s *Session) IsExpired() bool

IsExpired checks if the session has expired

Directories

Path Synopsis
File Path: monorepo/cloud/maplepress-backend/internal/domain/page/interface.go
File Path: monorepo/cloud/maplepress-backend/internal/domain/page/interface.go
File Path: monorepo/cloud/maplepress-backend/internal/domain/securityevent/entity.go
File Path: monorepo/cloud/maplepress-backend/internal/domain/securityevent/entity.go
File Path: monorepo/cloud/maplepress-backend/internal/domain/site/site.go
File Path: monorepo/cloud/maplepress-backend/internal/domain/site/site.go

Jump to

Keyboard shortcuts

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