Documentation ¶
Index ¶
- Variables
- type City
- type Gender
- type HouseholdSize
- type Occupation
- type ProfileIcon
- type User
- func (u *User) ChangeName(name string)
- func (u *User) DeleteIcon()
- func (u *User) Demographics() *UserDemographics
- 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() oauth.AuthProviderName
- func (u *User) SetDemographics(demographics UserDemographics)
- func (u *User) SetDisplayID(id string) error
- func (u *User) SetDisplayName(name string)
- 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 UserDemographics
- func (u *UserDemographics) Age() int
- func (u *UserDemographics) ChangeYearOfBirth(yearOfBirth *YearOfBirth)
- func (u *UserDemographics) City() *City
- func (u *UserDemographics) Gender() Gender
- func (u *UserDemographics) HouseholdSize() *HouseholdSize
- func (u *UserDemographics) Occupation() Occupation
- func (u *UserDemographics) Prefecture() *string
- func (u *UserDemographics) UserDemographicsID() shared.UUID[UserDemographics]
- func (u *UserDemographics) 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: "その他", GenderPreferNotToSay: "回答しない", } )
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 oauth.AuthProviderName, profileIcon *ProfileIcon, ) User
func (*User) ChangeName ¶
func (*User) DeleteIcon ¶
func (u *User) DeleteIcon()
func (*User) Demographics ¶
func (u *User) Demographics() *UserDemographics
func (*User) DisplayName ¶
func (*User) IsIconUpdateRequired ¶
func (*User) ProfileIcon ¶
func (u *User) ProfileIcon() *ProfileIcon
func (*User) ProfileIconURL ¶
func (*User) Provider ¶
func (u *User) Provider() oauth.AuthProviderName
func (*User) SetDemographics ¶
func (u *User) SetDemographics(demographics UserDemographics)
func (*User) SetDisplayID ¶
func (*User) SetDisplayName ¶
func (*User) SetIconFile ¶
type UserDemographics ¶
type UserDemographics struct {
// contains filtered or unexported fields
}
func NewUserDemographics ¶
func NewUserDemographics( userDemographicsID shared.UUID[UserDemographics], yearOfBirth *YearOfBirth, occupation *Occupation, gender *Gender, city *City, householdSize *HouseholdSize, prefecture *string, ) UserDemographics
func (*UserDemographics) ChangeYearOfBirth ¶
func (u *UserDemographics) ChangeYearOfBirth(yearOfBirth *YearOfBirth)
func (*UserDemographics) City ¶
func (u *UserDemographics) City() *City
func (*UserDemographics) Gender ¶
func (u *UserDemographics) Gender() Gender
func (*UserDemographics) HouseholdSize ¶
func (u *UserDemographics) HouseholdSize() *HouseholdSize
func (*UserDemographics) Occupation ¶
func (u *UserDemographics) Occupation() Occupation
func (*UserDemographics) Prefecture ¶
func (u *UserDemographics) Prefecture() *string
func (*UserDemographics) UserDemographicsID ¶
func (u *UserDemographics) UserDemographicsID() shared.UUID[UserDemographics]
func (*UserDemographics) YearOfBirth ¶
func (u *UserDemographics) 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
func (YearOfBirth) Age ¶
func (y YearOfBirth) Age() int
Click to show internal directories.
Click to hide internal directories.