cache

package
v0.0.0-...-b7e169e Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2020 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

func New

func New(log *log.Logger, key string, data dataLayer, memcacheServer string) *Cache

func (*Cache) DataGet

func (c *Cache) DataGet(ctx context.Context, URL string) (*db.Data, error)

func (*Cache) DataGetWithUser

func (c *Cache) DataGetWithUser(ctx context.Context, user *db.User, URL string) (*db.Data, error)

func (*Cache) DataNew

func (c *Cache) DataNew(ctx context.Context, user *db.User, blob []byte, public bool) (*db.Data, error)

func (*Cache) InviteNew

func (c *Cache) InviteNew(ctx context.Context, user *db.User) (*db.Invite, error)

func (*Cache) InviteUse

func (c *Cache) InviteUse(ctx context.Context, inviteID string) error

func (*Cache) InviteValid

func (c *Cache) InviteValid(ctx context.Context, inviteID string) error

func (*Cache) UserGet

func (c *Cache) UserGet(ctx context.Context, username, password string) (*db.User, error)

func (*Cache) UserGetFromToken

func (c *Cache) UserGetFromToken(ctx context.Context, token string) (*db.User, error)

func (*Cache) UserNew

func (c *Cache) UserNew(ctx context.Context, username, password string) (*db.User, error)

Jump to

Keyboard shortcuts

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