session

package
v1.0.46 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: Apache-2.0 Imports: 2 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 {
	// contains filtered or unexported fields
}

Session handles session data.

func New

func New(store *storage.Storage, sessionID string) *Session

New returns a new session handler.

func (*Session) FlashErrorMessage

func (s *Session) FlashErrorMessage(message string) string

FlashErrorMessage returns the last flash error message if any.

func (*Session) FlashMessage

func (s *Session) FlashMessage(message string) string

FlashMessage returns the current flash message if any.

func (*Session) NewFlashErrorMessage

func (s *Session) NewFlashErrorMessage(message string)

NewFlashErrorMessage creates a new flash error message.

func (*Session) NewFlashMessage

func (s *Session) NewFlashMessage(message string)

NewFlashMessage creates a new flash message.

func (*Session) NewOAuth2State

func (s *Session) NewOAuth2State() string

NewOAuth2State generates a new OAuth2 state and stores the value into the database.

func (*Session) SetLanguage

func (s *Session) SetLanguage(language string)

SetLanguage updates the language field in session.

func (*Session) SetPocketRequestToken

func (s *Session) SetPocketRequestToken(requestToken string)

SetPocketRequestToken updates Pocket Request Token.

func (*Session) SetTheme

func (s *Session) SetTheme(theme string)

SetTheme updates the theme field in session.

Jump to

Keyboard shortcuts

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