redis

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client represents a redis client.

func New

func New(ctx context.Context) (*Client, error)

New creates a new redis client.

func (*Client) Close

func (c *Client) Close(_ context.Context) error

Close closes the redis pool.

func (*Client) DeleteFediActor

func (c *Client) DeleteFediActor(ctx context.Context, uri string) error

DeleteFediActor deletes fedi actor from redis.

func (*Client) DeleteFediNodeInfo

func (c *Client) DeleteFediNodeInfo(ctx context.Context, domain string) error

DeleteFediNodeInfo deletes fedi nodeinfo from redis.

func (*Client) DeleteOauthNonce

func (c *Client) DeleteOauthNonce(ctx context.Context, uid string, sid string) error

DeleteOauthNonce deletes an oauth nonce from redis.

func (*Client) GetFediActor

func (c *Client) GetFediActor(ctx context.Context, uri string) (string, error)

GetFediActor retrieves fedi actor from redis.

func (*Client) GetFediNodeInfo

func (c *Client) GetFediNodeInfo(ctx context.Context, domain string) (string, error)

GetFediNodeInfo retrieves fedi nodeinfo from redis.

func (*Client) GetOauthNonce

func (c *Client) GetOauthNonce(ctx context.Context, uid string, sid string) (string, error)

GetOauthNonce retrieves an oauth nonce from redis.

func (*Client) RedisClient

func (c *Client) RedisClient() *redis.Client

RedisClient returns the redis client.

func (*Client) SetFediActor

func (c *Client) SetFediActor(ctx context.Context, uri string, actor string, expire time.Duration) error

SetFediActor adds fedi actor to redis.

func (*Client) SetFediNodeInfo

func (c *Client) SetFediNodeInfo(ctx context.Context, domain string, nodeinfo string, expire time.Duration) error

SetFediNodeInfo adds fedi nodeinfo to redis.

func (*Client) SetOauthNonce

func (c *Client) SetOauthNonce(ctx context.Context, uid string, sid string, nonce string, expire time.Duration) error

SetOauthNonce adds an oauth nonce to redis.

Jump to

Keyboard shortcuts

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