Documentation
¶
Index ¶
- Variables
- type City
- type Gender
- type HouseholdSize
- type Occupation
- type ProfileIcon
- type User
- func (u *User) ChangeName(ctx context.Context, name *string)
- func (u *User) DeleteIcon()
- func (u *User) Demographics() *UserDemographic
- func (u *User) DisplayID() *string
- func (u *User) DisplayName() *string
- func (u *User) IsIconUpdateRequired() bool
- func (u *User) ProfileIcon() *ProfileIcon
- func (u *User) ProfileIconURL() *string
- func (u *User) Provider() auth.AuthProviderName
- func (u *User) SetDemographics(demographics UserDemographic)
- func (u *User) SetDisplayID(id string) error
- func (u *User) SetIconFile(ctx context.Context, file *multipart.FileHeader) error
- func (u *User) Subject() string
- func (u *User) UserID() shared.UUID[User]
- func (u *User) Verify() bool
- type UserDemographic
- func (u *UserDemographic) Age(ctx context.Context) int
- func (u *UserDemographic) ChangeYearOfBirth(yearOfBirth *YearOfBirth)
- func (u *UserDemographic) City() *City
- func (u *UserDemographic) Gender() *Gender
- func (u *UserDemographic) HouseholdSize() *HouseholdSize
- func (u *UserDemographic) ID() shared.UUID[UserDemographic]
- func (u *UserDemographic) Occupation() *Occupation
- func (u *UserDemographic) Prefecture() *string
- func (u *UserDemographic) YearOfBirth() *YearOfBirth
- type UserName
- type UserRepository
- type UserService
- type UserSubject
- type YearOfBirth
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GenderMap = map[Gender]string{ GenderMale: "男性", GenderFemale: "女性", GenderOther: "その他", } )
View Source
var ( OccupationMap = map[Occupation]string{ OccupationFullTimeEmployee: "正社員", OccupationContractEmployee: "契約社員", OccupationPublicServant: "公務員", OccupationSelfEmployed: "自営業", OccupationExecutive: "会社役員", OccupationPartTimeEmployee: "パート・アルバイト", OccupationHomemaker: "家事従事者", OccupationStudent: "学生", OccupationUnemployed: "無職", OccupationOther: "回答しない", } )
Functions ¶
This section is empty.
Types ¶
type HouseholdSize ¶
type HouseholdSize int
func NewHouseholdSize ¶
func NewHouseholdSize(size *int) *HouseholdSize
type Occupation ¶
type Occupation int
const ( OccupationFullTimeEmployee Occupation = iota + 1 // 正社員 OccupationContractEmployee // 契約社員 OccupationPublicServant // 公務員 OccupationSelfEmployed // 自営業 OccupationExecutive // 会社役員 OccupationPartTimeEmployee // パート・アルバイト OccupationHomemaker // 専業主婦 OccupationStudent // 学生 OccupationUnemployed // 無職 OccupationOther // 回答しない )
func NewOccupation ¶
func NewOccupation(occupation *string) *Occupation
func (Occupation) String ¶
func (o Occupation) String() string
type ProfileIcon ¶
type ProfileIcon struct {
// contains filtered or unexported fields
}
func NewProfileIcon ¶
func NewProfileIcon( url *string, ) *ProfileIcon
func (*ProfileIcon) ImageInfo ¶
func (p *ProfileIcon) ImageInfo() *image.ImageInfo
func (*ProfileIcon) SetProfileIconImage ¶
func (p *ProfileIcon) SetProfileIconImage( ctx context.Context, file *multipart.FileHeader, user User, ) error
func (*ProfileIcon) URL ¶
func (p *ProfileIcon) URL() *string
type User ¶
type User struct {
// contains filtered or unexported fields
}
func NewUser ¶
func NewUser( userID shared.UUID[User], displayID *string, displayName *string, subject string, provider auth.AuthProviderName, profileIcon *ProfileIcon, ) User
func (*User) DeleteIcon ¶
func (u *User) DeleteIcon()
func (*User) Demographics ¶
func (u *User) Demographics() *UserDemographic
func (*User) DisplayName ¶
func (*User) IsIconUpdateRequired ¶
func (*User) ProfileIcon ¶
func (u *User) ProfileIcon() *ProfileIcon
func (*User) ProfileIconURL ¶
func (*User) Provider ¶
func (u *User) Provider() auth.AuthProviderName
func (*User) SetDemographics ¶
func (u *User) SetDemographics(demographics UserDemographic)
func (*User) SetDisplayID ¶
func (*User) SetIconFile ¶
type UserDemographic ¶
type UserDemographic struct { UserDemographicID shared.UUID[UserDemographic] // ユーザーのデモグラフィックスID // contains filtered or unexported fields }
func NewUserDemographic ¶
func (*UserDemographic) ChangeYearOfBirth ¶
func (u *UserDemographic) ChangeYearOfBirth(yearOfBirth *YearOfBirth)
func (*UserDemographic) City ¶
func (u *UserDemographic) City() *City
func (*UserDemographic) Gender ¶
func (u *UserDemographic) Gender() *Gender
func (*UserDemographic) HouseholdSize ¶
func (u *UserDemographic) HouseholdSize() *HouseholdSize
func (*UserDemographic) ID ¶
func (u *UserDemographic) ID() shared.UUID[UserDemographic]
func (*UserDemographic) Occupation ¶
func (u *UserDemographic) Occupation() *Occupation
func (*UserDemographic) Prefecture ¶
func (u *UserDemographic) Prefecture() *string
func (*UserDemographic) YearOfBirth ¶
func (u *UserDemographic) YearOfBirth() *YearOfBirth
type UserRepository ¶
type UserService ¶
type UserService interface { // DisplayIDCheckDuplicate ユーザーの表示用IDが重複していないかチェック DisplayIDCheckDuplicate(context.Context, string) (bool, error) }
UserService ユーザードメインサービス
type UserSubject ¶
type UserSubject string
func (UserSubject) String ¶
func (a UserSubject) String() string
type YearOfBirth ¶
type YearOfBirth int
func NewYearOfBirth ¶
func NewYearOfBirth(year *int) *YearOfBirth
Click to show internal directories.
Click to hide internal directories.