profile

package
v0.0.0-...-932f57c Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const MessagesKey i18n.ModuleKey = "admin/helper/profile"
View Source
const (
	ModelID = "my-profile"
)

Variables

View Source
var (
	Messages_en_US = &Messages{}

	Messages_pt_BR = &Messages{
		ChangePassword: "Alterar Senha",
	}
)

Functions

func ConfigureMessages

func ConfigureMessages(b *i18n.Builder)

func DefaultModelOptions

func DefaultModelOptions(opts ...presets.ModelBuilderOption) []presets.ModelBuilderOption

Types

type Builder

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

func New

func New(db *gorm.DB, mgr *login_session.Manager, lb *login.Builder, userMb *presets.ModelBuilder) *Builder

func (*Builder) Brand

func (c *Builder) Brand(b *presets.Builder) func(ctx *web.EventContext) h.HTMLComponent

func (*Builder) Install

func (c *Builder) Install(p *presets.Builder) (err error)

func (*Builder) NotificationComponentFunc

func (c *Builder) NotificationComponentFunc() func(ctx *web.EventContext, u user.User) h.HTMLComponent

func (*Builder) ProfilePage

func (c *Builder) ProfilePage(p *presets.Builder) http.Handler

func (*Builder) SetNotificationComponentFunc

func (c *Builder) SetNotificationComponentFunc(notificationComponentFunc func(ctx *web.EventContext, u user.User) h.HTMLComponent) *Builder

type Messages

type Messages struct {
	ChangePassword string
}

func GetMessages

func GetMessages(ctx context.Context) *Messages

type Options

type Options struct {
	CurrentUser func(r *http.Request) user.User
	NewUser     func() user.User
}

type Profile

type Profile struct {
	ID          uint `admin:"ro"`
	Name        string
	AccountName string `admin:"ro"`
	Status      string `admin:"ro"`
	Roles       string `admin:"ro"`
}

Jump to

Keyboard shortcuts

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