kv

package
v0.0.0-...-e647751 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KeyFediActor

func KeyFediActor(u string) string

KeyFediActor returns the kv key which holds cached actor.

func KeyFediNodeInfo

func KeyFediNodeInfo(d string) string

KeyFediNodeInfo returns the kv key which holds cached nodeinfo.

func KeyOauthNonce

func KeyOauthNonce(uid string, sid string) string

KeyOauthNonce returns the kv key which holds oauth nonce.

func KeyOauthToken

func KeyOauthToken() string

KeyOauthToken returns the oauth token key prefix.

func KeySession

func KeySession() string

KeySession returns the base kv key prefix.

Types

type KV

type KV interface {
	Close(ctx context.Context) error

	DeleteFediActor(ctx context.Context, uri string) (err error)
	GetFediActor(ctx context.Context, uri string) (actor string, err error)
	SetFediActor(ctx context.Context, uri string, actor string, expire time.Duration) (err error)

	DeleteFediNodeInfo(ctx context.Context, domain string) (err error)
	GetFediNodeInfo(ctx context.Context, domain string) (nodeinfo string, err error)
	SetFediNodeInfo(ctx context.Context, domain string, nodeinfo string, expire time.Duration) (err error)

	DeleteOauthNonce(ctx context.Context, uid string, sid string) (err error)
	GetOauthNonce(ctx context.Context, uid string, sid string) (nonce string, err error)
	SetOauthNonce(ctx context.Context, uid string, sid string, nonce string, expire time.Duration) (err error)
}

KV represents a key value store.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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