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)

Source Files