profile

package
v0.5.12 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SetupNonceName = "site-profile--nonce"
	SetupNonceKey  = "site-profile--form"
)
View Source
const Tag feature.Tag = "site-profile"

Variables

View Source
var (
	DefaultProfileImagePath  = "/media/profiles"
	DefaultProfileImageNames = []string{
		"enjineer",
		"spongezero",
		"spongezero-astronaut",
		"spongezero-cosmic-without",
		"spongezero-cosmos-within",
		"spongezero-on-fire",
	}
)

Functions

This section is empty.

Types

type CFeature

type CFeature struct {
	site.CSiteFeature[MakeFeature]
	// contains filtered or unexported fields
}

func (*CFeature) AddProfileImageNames

func (f *CFeature) AddProfileImageNames(images ...string) MakeFeature

func (*CFeature) Build

func (f *CFeature) Build(b feature.Buildable) (err error)

func (*CFeature) Construct

func (f *CFeature) Construct(this interface{})

func (*CFeature) DefaultProfileImageNames

func (f *CFeature) DefaultProfileImageNames() MakeFeature

func (*CFeature) Init

func (f *CFeature) Init(this interface{})

func (*CFeature) Make

func (f *CFeature) Make() (feat Feature)

func (*CFeature) ModifyUserRequest added in v0.5.1

func (f *CFeature) ModifyUserRequest(au feature.User, r *http.Request) (modified *http.Request)

func (*CFeature) RouteSiteFeature

func (f *CFeature) RouteSiteFeature(r chi.Router)

func (*CFeature) ServeProfilePage

func (f *CFeature) ServeProfilePage(w http.ResponseWriter, r *http.Request)

func (*CFeature) SetOtherProfilePagesEnabled added in v0.5.1

func (f *CFeature) SetOtherProfilePagesEnabled(enabled bool) MakeFeature

func (*CFeature) SetProfileImageNames

func (f *CFeature) SetProfileImageNames(images ...string) MakeFeature

func (*CFeature) SetProfileImagePath

func (f *CFeature) SetProfileImagePath(path string) MakeFeature

func (*CFeature) SetProfileImagesEnabled added in v0.5.1

func (f *CFeature) SetProfileImagesEnabled(enabled bool) MakeFeature

func (*CFeature) SetSelfProfilePageEnabled added in v0.5.1

func (f *CFeature) SetSelfProfilePageEnabled(enabled bool) MakeFeature

func (*CFeature) SetSiteLocaleEnabled added in v0.5.1

func (f *CFeature) SetSiteLocaleEnabled(enabled bool) MakeFeature

func (*CFeature) SiteFeatureMenu

func (f *CFeature) SiteFeatureMenu(r *http.Request) (m menu.Menu)

func (*CFeature) SiteSettingsFields

func (f *CFeature) SiteSettingsFields(r *http.Request) (fields beContext.Fields)

func (*CFeature) SiteUserSetupStageHandler

func (f *CFeature) SiteUserSetupStageHandler(saf feature.SiteAuthFeature, w http.ResponseWriter, r *http.Request)

func (*CFeature) SiteUserSetupStageReady

func (f *CFeature) SiteUserSetupStageReady(eid string, r *http.Request) (ready bool)

func (*CFeature) Startup

func (f *CFeature) Startup(ctx *cli.Context) (err error)

func (*CFeature) UserActions

func (f *CFeature) UserActions() (list feature.Actions)

type MakeFeature

type MakeFeature interface {
	feature.SiteMakeFeature[MakeFeature]

	SetSiteLocaleEnabled(enabled bool) MakeFeature

	// SetSelfProfilePageEnabled enables (or disables) the site menu item and request handler for the (read-only) profile
	// pages
	SetSelfProfilePageEnabled(enabled bool) MakeFeature

	// SetOtherProfilePagesEnabled enables (or disables) the (read-only) other user profile pages
	SetOtherProfilePagesEnabled(enabled bool) MakeFeature

	// SetProfileImagesEnabled enables the profile image aspects of this feature
	SetProfileImagesEnabled(enabled bool) MakeFeature
	// SetProfileImagePath enables profile images and specifies the public filesystem path prefix to use
	SetProfileImagePath(path string) MakeFeature
	// DefaultProfileImageNames enables profile images and adds the default image URLs to the media profiles list
	DefaultProfileImageNames() MakeFeature
	// AddProfileImageNames enables profile images and adds the given image URLs to the media profiles list
	AddProfileImageNames(names ...string) MakeFeature
	// SetProfileImageNames enables profile images and replaces the media profiles list with the given image names
	SetProfileImageNames(names ...string) MakeFeature

	Make() Feature
}

func New

func New() MakeFeature

func NewTagged

func NewTagged(tag feature.Tag) MakeFeature

Jump to

Keyboard shortcuts

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