avatars

package
v2.7.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2018 License: BSD-3-Clause, BSD-3-Clause Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UploadImage

func UploadImage(mctx libkb.MetaContext, filename string, teamID *keybase1.TeamID, crop *keybase1.ImageCropRect) (err error)

Types

type FullCachingSource

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

func NewFullCachingSource

func NewFullCachingSource(staleThreshold time.Duration, size int) *FullCachingSource

func (*FullCachingSource) ClearCacheForName

func (c *FullCachingSource) ClearCacheForName(m libkb.MetaContext, name string, formats []keybase1.AvatarFormat) (err error)

func (*FullCachingSource) LoadTeams

func (c *FullCachingSource) LoadTeams(m libkb.MetaContext, teams []string, formats []keybase1.AvatarFormat) (res keybase1.LoadAvatarsRes, err error)

func (*FullCachingSource) LoadUsers

func (c *FullCachingSource) LoadUsers(m libkb.MetaContext, usernames []string, formats []keybase1.AvatarFormat) (res keybase1.LoadAvatarsRes, err error)

func (*FullCachingSource) OnCacheCleared

func (c *FullCachingSource) OnCacheCleared(m libkb.MetaContext)

func (*FullCachingSource) StartBackgroundTasks

func (c *FullCachingSource) StartBackgroundTasks(m libkb.MetaContext)

func (*FullCachingSource) StopBackgroundTasks

func (c *FullCachingSource) StopBackgroundTasks(m libkb.MetaContext)

type SimpleSource

type SimpleSource struct{}

func NewSimpleSource

func NewSimpleSource() *SimpleSource

func (*SimpleSource) ClearCacheForName

func (s *SimpleSource) ClearCacheForName(m libkb.MetaContext, name string, formats []keybase1.AvatarFormat) (err error)

func (*SimpleSource) LoadTeams

func (s *SimpleSource) LoadTeams(m libkb.MetaContext, teams []string, formats []keybase1.AvatarFormat) (res keybase1.LoadAvatarsRes, err error)

func (*SimpleSource) LoadUsers

func (s *SimpleSource) LoadUsers(m libkb.MetaContext, usernames []string, formats []keybase1.AvatarFormat) (res keybase1.LoadAvatarsRes, err error)

func (*SimpleSource) OnCacheCleared

func (s *SimpleSource) OnCacheCleared(m libkb.MetaContext)

func (*SimpleSource) StartBackgroundTasks

func (s *SimpleSource) StartBackgroundTasks(_ libkb.MetaContext)

func (*SimpleSource) StopBackgroundTasks

func (s *SimpleSource) StopBackgroundTasks(_ libkb.MetaContext)

type Source

type Source interface {
	LoadUsers(libkb.MetaContext, []string, []keybase1.AvatarFormat) (keybase1.LoadAvatarsRes, error)
	LoadTeams(libkb.MetaContext, []string, []keybase1.AvatarFormat) (keybase1.LoadAvatarsRes, error)

	ClearCacheForName(libkb.MetaContext, string, []keybase1.AvatarFormat) error
	OnCacheCleared(libkb.MetaContext) // Called after leveldb data goes away after db nuke

	StartBackgroundTasks(libkb.MetaContext)
	StopBackgroundTasks(libkb.MetaContext)
}

func CreateSourceFromEnv

func CreateSourceFromEnv(g *libkb.GlobalContext) (s Source)

type URLCachingSource

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

func NewURLCachingSource

func NewURLCachingSource(staleThreshold time.Duration, size int) *URLCachingSource

func (*URLCachingSource) ClearCacheForName

func (c *URLCachingSource) ClearCacheForName(m libkb.MetaContext, name string, formats []keybase1.AvatarFormat) (err error)

func (*URLCachingSource) LoadTeams

func (c *URLCachingSource) LoadTeams(m libkb.MetaContext, teams []string, formats []keybase1.AvatarFormat) (res keybase1.LoadAvatarsRes, err error)

func (*URLCachingSource) LoadUsers

func (c *URLCachingSource) LoadUsers(m libkb.MetaContext, usernames []string, formats []keybase1.AvatarFormat) (res keybase1.LoadAvatarsRes, err error)

func (*URLCachingSource) OnCacheCleared

func (c *URLCachingSource) OnCacheCleared(m libkb.MetaContext)

func (*URLCachingSource) StartBackgroundTasks

func (c *URLCachingSource) StartBackgroundTasks(m libkb.MetaContext)

func (*URLCachingSource) StopBackgroundTasks

func (c *URLCachingSource) StopBackgroundTasks(m libkb.MetaContext)

Jump to

Keyboard shortcuts

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