Documentation ¶
Index ¶
- Constants
- type Article
- func CreateArticle(url article.URL, title article.Title, description article.Description, ...) Article
- func NewArticle(id article.ID, url article.URL, title article.Title, ...) (Article, error)
- func ReconstructArticle(id uuid.UUID, url string, title string, description string, thumbnail string, ...) Article
- type Auth
- type Code
- type Invitation
- type Session
- type User
Constants ¶
View Source
const ( DefaultSessionExpiresIn = time.Hour * 24 * 30 SessionKeyFormat = "%s:%s" )
View Source
const DefaultArticleSize = value.Size(20)
View Source
const DefaultAuthExpiresIn = time.Hour // 1 hour
View Source
const DefaultCodeExpiresIn = 10 * time.Minute // 10 minutes
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Article ¶
type Article struct { ArticleID article.ID // ID URL article.URL // 記事のURL Title article.Title // タイトル Description article.Description // 記事の説明 Thumbnail article.Thumbnail // サムネイル TagList article.TagList // タグリスト }
Article 記事モデル.
func CreateArticle ¶
func CreateArticle( url article.URL, title article.Title, description article.Description, thumbnail article.Thumbnail, tags article.TagList, ) Article
CreateArticle 記事モデルを新規作成する関数.
type Auth ¶
type Auth struct { AuthID user.ID `json:"authId"` UserID user.ID `json:"userId"` IssuedAt time.Time `json:"issuedAt"` ExpiresAt time.Time `json:"expiresAt"` }
type Code ¶
type Code struct { CodeID auth.CodeID `json:"codeId"` SessionID auth.SessionID `json:"sessionId"` IssuedAt time.Time `json:"issuedAt"` ExpiresAt time.Time `json:"expiresAt"` }
func GenerateCode ¶
type Invitation ¶
type Invitation struct { Code auth.InvitationCode Email auth.Email }
func GenerateInvitation ¶
func GenerateInvitation( email auth.Email, ) Invitation
func NewInvitation ¶
func NewInvitation( code auth.InvitationCode, email auth.Email, ) (Invitation, error)
func (Invitation) Message ¶
func (inv Invitation) Message() notice.Message
func (Invitation) Subject ¶
func (inv Invitation) Subject() notice.Subject
Click to show internal directories.
Click to hide internal directories.