Documentation
¶
Overview ¶
Package public adds some public routes that can be used to give information to anonymous users, or to the not yet authentified cozy owner on its login page.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Avatar ¶
Avatar returns the default avatar currently.
If an avatar has been uploaded through `PUT /settings/avatar`, this image will be returned.
Otherwise it depends on the `fallback` query param:
2.1. `fallback=404`: just respond a 404 if no avatar file was set
2.2. `fallback=default` (or empty): get the `default-avatar.png` asset (for retro-compatibility)
2.3. `fallback=anonymous`: get a generic user avatar without initials visible (respects `format`)
2.4. `fallback=initials`, initials are calculated:
2.4.1. Attempt with [../../model/settings/service.go] PublicName(), which gets the instance's `public_name`, or the `DomainName`
Additional query params when `fallback` isn't set or is `anonymous`:
4.1. `fx=translucent`: if SVG, make the output partially transparent 4.2. `as=unconfirmed`: if SVG, make the output grayscale 4.3. `format=png`: request a PNG response, otherwise defaults to SVG 4.4. `q=high`: request a larger but higher quality file (for SVG means embedding the font)
Types ¶
This section is empty.