storage

package
v0.0.0-...-15a64de Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContactsKey = "saltyim-contacts"
)
View Source
const (
	ConversationsKey = "saltyim-conversations-%x"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Actions

type Actions interface {
	Handle(actionName string, h app.ActionHandler)
	NewAction(name string, tags ...app.Tagger)
	NewActionWithValue(name string, v interface{}, tags ...app.Tagger)
}

Actions defines the action operations

type Contacts

type Contacts interface {
	Add(addr string)
	Remove(addr string)
	List() []string
}

func ContactsLocalStorage

func ContactsLocalStorage(state StateOperations) Contacts

type Conversations

type Conversations interface {
	Read() []string
	Append(line string)
	Update(lines []string)
	Delete()
}

func ConversationsLocalStorage

func ConversationsLocalStorage(state StateOperations, addr string) Conversations

type StateOperations

type StateOperations interface {
	SetState(state string, v interface{}, opts ...app.StateOption)
	GetState(state string, recv interface{})
	DelState(state string)
}

StateOperations are the state operations present in app.Context

Jump to

Keyboard shortcuts

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