Documentation ¶
Index ¶
- func NewAccountID() (AccountID, DomainError)
- func NewCredential(u User, p Pass) (*Credential, DomainError)
- func NewDate() (Date, DomainError)
- func NewPass(pID PassID, aID AccountID, pass Password, iat Date) (*Pass, DomainError)
- func NewPassID() (PassID, DomainError)
- func NewPassword(pass string) (Password, DomainError)
- func NewUser(aID AccountID, uID UserID, uName UserName) (*User, DomainError)
- func NewUserID(id string) (UserID, DomainError)
- func NewUserName(name string) (UserName, DomainError)
- func NilID() id
- func ReNewAccountID(data string) (AccountID, DomainError)
- func ReNewDate(d string) (Date, DomainError)
- func ReNewPass(passID string, accountID string, password string, iat string) (*Pass, DomainError)
- func ReNewPassID(data string) (PassID, DomainError)
- func ReNewPassword(pass string) (Password, DomainError)
- func ReNewUser(accountID string, userID string, name string) (*User, DomainError)
- type AccountID
- type Credential
- type CredentialRepo
- type Date
- type DomainError
- type Pass
- type PassID
- type Password
- type User
- type UserID
- type UserName
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAccountID ¶
func NewAccountID() (AccountID, DomainError)
func NewCredential ¶
func NewCredential(u User, p Pass) (*Credential, DomainError)
func NewDate ¶
func NewDate() (Date, DomainError)
func NewPassID ¶
func NewPassID() (PassID, DomainError)
func NewPassword ¶
func NewPassword(pass string) (Password, DomainError)
平文パスワード から ハッシュ化されたパスワードオブジェクトを生成する
func NewUserID ¶
func NewUserID(id string) (UserID, DomainError)
func NewUserName ¶
func NewUserName(name string) (UserName, DomainError)
func ReNewAccountID ¶
func ReNewAccountID(data string) (AccountID, DomainError)
func ReNewDate ¶
func ReNewDate(d string) (Date, DomainError)
func ReNewPassID ¶
func ReNewPassID(data string) (PassID, DomainError)
func ReNewPassword ¶
func ReNewPassword(pass string) (Password, DomainError)
ハッシュ化されたパスワード から パスワードオブジェクトを生成する
Types ¶
type AccountID ¶
type AccountID struct {
// contains filtered or unexported fields
}
アカウントID 値オブジェクト
type Credential ¶
type Credential struct {
// contains filtered or unexported fields
}
func (*Credential) Pass ¶
func (c *Credential) Pass() Pass
func (*Credential) User ¶
func (c *Credential) User() User
type CredentialRepo ¶
type CredentialRepo interface {
// contains filtered or unexported methods
}
この struct は ユースケース層 で使われていて 実装は インフラ層
type DomainError ¶
ドメイン層の 独自エラー
func NewID ¶
func NewID(prefixID string) (id, DomainError)
func ReNewID ¶
func ReNewID(data string) (id, DomainError)
func WrapDomainError ¶
func WrapDomainError(msg string, innerErr error) DomainError
エラーオブジェクトを ドメイン層エラー でラップする つまり エラーオブジェクトを生成 と本質は同じ
Click to show internal directories.
Click to hide internal directories.