keyring

package
v0.0.0-...-6513b37 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	ID       cchat.ID
	Sessions []Session
}

Sessions is a list of sessions within a keyring. It provides an abstract way to save sessions with order.

func NewService

func NewService(svc cchat.Service, cap int) Service

NewService creates a new service.

func Restore

func Restore(svc cchat.Service) Service

Restore restores all sessions of the service asynchronously, then calls the auth callback inside the GTK main thread.

func (*Service) Add

func (svc *Service) Add(ses cchat.Session, name string)

Add adds a session into the sessions list.

func (Service) Save

func (svc Service) Save()

Save saves the sessions into the keyring.

type Session

type Session struct {
	ID cchat.ID

	// Metadata.
	Name string
	Data map[string]string
}

func ConvertSession

func ConvertSession(ses cchat.Session, name string) *Session

ConvertSession attempts to get the session data from the given cchat session. It returns nil if it can't do it.

func RestoreSession

func RestoreSession(svc cchat.Service, sessionID cchat.ID) *Session

RestoreSession restores a single session.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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