persisters

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEphemeralCommunitiesDisabled = errors.New("creation of ephemeral communites is disabled")
)

Functions

This section is empty.

Types

type CommunitiesPersister

type CommunitiesPersister interface {
	Open(dbURL string) error
	AddClientsToCommunity(
		ctx context.Context,
		community string,
		password string,
		upsert bool,
	) error
	RemoveClientFromCommunity(
		ctx context.Context,
		community string,
	) error
	Cleanup(
		ctx context.Context,
	) error
	GetCommunities(
		ctx context.Context,
	) ([]Community, error)
	CreatePersistentCommunity(
		ctx context.Context,
		community string,
		password string,
	) (*Community, error)
	DeleteCommunity(
		ctx context.Context,
		community string,
	) error
}

type Community

type Community struct {
	ID         string `json:"id"`
	Clients    int    `json:"clients"`
	Persistent bool   `json:"persistent"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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