sessionMaker

package
v1.0.0-my-beta35 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodePyrogramSession

func DecodePyrogramSession(hx string) (*session.Data, error)

func NewSessionStorage

func NewSessionStorage(ctx context.Context, sessionType SessionConstructor, inMemory bool) (*storage.PeerStorage, telegram.SessionStorage, error)

Types

type AuthKey

type AuthKey struct {
	Value Key
	ID    [8]byte
}

AuthKey is a Key with cached id.

type Key

type Key [256]byte

func (Key) ID

func (k Key) ID() [8]byte

ID returns auth_key_id.

func (Key) WithID

func (k Key) WithID() AuthKey

WithID creates new AuthKey from Key.

type PyrogramSessionConstructor

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

func PyrogramSession

func PyrogramSession(value string) *PyrogramSessionConstructor

func (*PyrogramSessionConstructor) Name

type SessionConstructor

type SessionConstructor interface {
	// contains filtered or unexported methods
}

type SessionStorage

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

SessionStorage implements SessionStorage for file system as file stored in Path.

func (*SessionStorage) LoadSession

func (f *SessionStorage) LoadSession(_ context.Context) ([]byte, error)

LoadSession loads session from file.

func (*SessionStorage) StoreSession

func (f *SessionStorage) StoreSession(_ context.Context, data []byte) error

StoreSession stores session to sqlite storage.

type SimpleSessionConstructor

type SimpleSessionConstructor int8

func SimpleSession

func SimpleSession() *SimpleSessionConstructor

type SqliteSessionConstructor

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

func SqliteSession

func SqliteSession(name string) *SqliteSessionConstructor

type StringSessionConstructor

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

func StringSession

func StringSession(value string) *StringSessionConstructor

func (*StringSessionConstructor) Name

type TDataSessionConstructor

type TDataSessionConstructor struct {
	UserID uint64
	// contains filtered or unexported fields
}

func TDataSession

func TDataSession(account tdesktop.Account) *TDataSessionConstructor

func TDataSessionList

func TDataSessionList(
	path string,
	passcode []byte,
) ([]*TDataSessionConstructor, error)

type TelethonSessionConstructor

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

func TelethonSession

func TelethonSession(value string) *TelethonSessionConstructor

func (*TelethonSessionConstructor) Name

Jump to

Keyboard shortcuts

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