session

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const Revision = 3

Revision - marks the version of the structure of a session file. Only files with equal revision will be loaded Note: you should increment this whenever you change the Session structure

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

type Session struct {
	Revision            int         `json:"revision"`
	AuthToken           string      `json:"authToken"`
	AuthTime            time.Time   `json:"authTime"`
	Babies              []baby.Baby `json:"babies"`
	RefreshToken        string      `json:"refreshToken"`
	LastSeenMessageTime time.Time   `json:"lastSeenMessageTime"`
}

Session - application session data container

type Store

type Store struct {
	Filename string
	Session  *Session
}

Store - application session store context

func InitSessionStore

func InitSessionStore(sessionFile string) *Store

InitSessionStore - Initializes new application session store

func NewSessionStore

func NewSessionStore() *Store

NewSessionStore - constructor

func (*Store) Load

func (store *Store) Load()

Load - loads previous state from a file

func (*Store) Save

func (store *Store) Save()

Save - stores current data in a file

Jump to

Keyboard shortcuts

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