Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Avatar ¶
type Avatar struct { Store AvatarStore RoutePath string RemarkURL string }
Avatar provides file-system store and http handler for avatars On user login auth will call Put and it will retrieve and save picture locally.
type AvatarStore ¶
type AvatarStore interface { Put(userID string, reader io.Reader) (avatar string, err error) Get(avatar string) (reader io.ReadCloser, size int, err error) }
AvatarStore defines interface to store and serve avatars
type FSAvatarStore ¶
type FSAvatarStore struct {
// contains filtered or unexported fields
}
FSAvatarStore implements AvatarStore for local file system
func NewFSAvatarStore ¶
func NewFSAvatarStore(storePath string, resizeLimit int) *FSAvatarStore
NewFSAvatarStore makes file-system avatar store
func (*FSAvatarStore) Get ¶
func (fs *FSAvatarStore) Get(avatar string) (reader io.ReadCloser, size int, err error)
Get avatar reader for avatar id.image
Click to show internal directories.
Click to hide internal directories.