profile

package
v0.0.0-...-61c90a5 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const MaxBioRunes = 500

Variables

View Source
var (
	ErrNotFound       = errors.New("profile not found")
	ErrInvalidProfile = errors.New("invalid profile")
)

Functions

This section is empty.

Types

type AvatarChoice

type AvatarChoice struct {
	MediaID      string
	OriginalName string
}

type Profile

type Profile struct {
	UserID        string
	Username      string
	DisplayName   string
	Bio           string
	AvatarMediaID string
	JoinedAt      time.Time
}

type Repository

type Repository interface {
	ProfileForViewer(context.Context, string, string) (Profile, error)
	UpdateProfile(context.Context, string, UpdateParams) (Profile, error)
	AvatarChoices(context.Context, string) ([]AvatarChoice, error)
}

type Service

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

func NewService

func NewService(repository Repository) *Service

func (*Service) AvatarChoices

func (s *Service) AvatarChoices(ctx context.Context, userID string) ([]AvatarChoice, error)

func (*Service) Get

func (s *Service) Get(ctx context.Context, viewerID, username string) (Profile, error)

func (*Service) Update

func (s *Service) Update(ctx context.Context, userID string, params UpdateParams) (Profile, error)

type UpdateParams

type UpdateParams struct {
	DisplayName   string
	Bio           string
	AvatarMediaID string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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