session

package
v0.0.0-...-9b2646f Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: MIT Imports: 13 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 {
	UserID      string
	GuildIDs    []string
	AccessToken string
	CreatedAt   time.Time
	ExpiresAt   time.Time
}

type SessionManager

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

func (*SessionManager) CreateSession

func (s *SessionManager) CreateSession(ctx context.Context, userID string, guildIDs []string, accessToken string) (string, error)

func (*SessionManager) CreateSessionCookie

func (s *SessionManager) CreateSessionCookie(c *fiber.Ctx, token string)

func (*SessionManager) DeleteSession

func (s *SessionManager) DeleteSession(c *fiber.Ctx) error

func (*SessionManager) GetSession

func (s *SessionManager) GetSession(c *fiber.Ctx) (*Session, error)

type SessionMiddleware

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

func NewSessionMiddleware

func NewSessionMiddleware(manager *SessionManager) *SessionMiddleware

func (*SessionMiddleware) SessionOptional

func (m *SessionMiddleware) SessionOptional() func(c *fiber.Ctx) error

func (*SessionMiddleware) SessionRequired

func (m *SessionMiddleware) SessionRequired() func(c *fiber.Ctx) error

Jump to

Keyboard shortcuts

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