userprofile

package
v0.0.0-...-6f239a5 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2021 License: MIT Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ModuleName = "profile"

Functions

This section is empty.

Types

type InstalledUserProfile

type InstalledUserProfile struct {
	*UserProfile
	UserSystem *usersystem.UserSystem
}

func MustNewAndInstallTo

func MustNewAndInstallTo(s *usersystem.UserSystem) *InstalledUserProfile

func NewInstalledUserProfile

func NewInstalledUserProfile() *InstalledUserProfile

type Service

type Service interface {
	MustGetProfile(id string) *profile.Profile
	MustUpdateProfile(id string, p *profile.Profile)
	//Start start service
	Start() error
	//Stop stop service
	Stop() error
	//Purge purge user data cache
	Purge(string) error
}

type Services

type Services []Service

func (Services) MustGetProfile

func (s Services) MustGetProfile(id string) *profile.Profile

func (Services) MustUpdateProfile

func (s Services) MustUpdateProfile(id string, p *profile.Profile)

func (Services) Purge

func (s Services) Purge(uid string) error

Purge purge user data cache

func (Services) Start

func (s Services) Start() error

Start start service

func (Services) Stop

func (s Services) Stop() error

Stop stop service

type UserProfile

type UserProfile struct {
	herbsystem.NopModule
	Services Services
}

func MustGetModule

func MustGetModule(s *usersystem.UserSystem) *UserProfile

func New

func New() *UserProfile

func (*UserProfile) AppendService

func (s *UserProfile) AppendService(service Service)

func (*UserProfile) InitModule

func (s *UserProfile) InitModule()

func (*UserProfile) InstallProcess

func (s *UserProfile) InstallProcess(ctx context.Context, system herbsystem.System, next func(context.Context, herbsystem.System))

func (*UserProfile) ModuleName

func (s *UserProfile) ModuleName() string

func (*UserProfile) MustLoadProfile

func (s *UserProfile) MustLoadProfile(uid string) *profile.Profile

func (*UserProfile) MustLoadProfiles

func (s *UserProfile) MustLoadProfiles(idlist ...string) map[string]*profile.Profile

func (*UserProfile) MustUpdateProfile

func (s *UserProfile) MustUpdateProfile(id string, p *profile.Profile)

func (*UserProfile) PurgeProcess

func (s *UserProfile) PurgeProcess(ctx context.Context, system herbsystem.System, next func(context.Context, herbsystem.System))

func (*UserProfile) StartProcess

func (s *UserProfile) StartProcess(ctx context.Context, system herbsystem.System, next func(context.Context, herbsystem.System))

func (*UserProfile) StopProcess

func (s *UserProfile) StopProcess(ctx context.Context, system herbsystem.System, next func(context.Context, herbsystem.System))

Jump to

Keyboard shortcuts

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