Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrAlreadyPaid - 既に支払が完了している ErrAlreadyPaid = xerrors.New("the user already paid") // ErrNoPaymentStatus - 支払情報が見つからない ErrNoPaymentStatus = xerrors.New("no payment status") // ErrNoPaymentTransaction - 支払い処理トランザクションが存在しない ErrNoPaymentTransaction = xerrors.New("no transaction") )
View Source
var ( // ErrEmailConflicts - emailが既に登録されている ErrEmailConflicts = xerrors.New("email conflicts") // ErrAccountIDConflicts - account IDが既に登録されている ErrAccountIDConflicts = xerrors.New("account id conflicts") // ErrNoUser - Userが存在しない ErrNoUser = xerrors.New("no such user") // ErrEmailAddressChanged - 既にEメールアドレスが変更されており、認証が失敗した ErrEmailAddressChanged = xerrors.New("email address has been changed") // ErrEmailAlreadyVerified - 既にEメールアドレスは認証済み ErrEmailAlreadyVerified = xerrors.New("email address is already verified") )
View Source
var ( // ErrCardIsNotPublished - サークル員が会員証を公開していない ErrCardIsNotPublished = xerrors.New("card is not published") )
View Source
var ( // ErrNoToken - トークンが見つからなかった ErrNoToken = xerrors.New("no such token") )
Functions ¶
This section is empty.
Types ¶
type Avatar ¶
type Avatar struct { URL string `json:"url" yaml:"url"` ThumbnailURL string `json:"thumbnail_url" yaml:"thumbnail_url"` }
Avatar - アイコン画像
type Card ¶
type Card struct { ID int `json:"id" yaml:"id"` Generation int `json:"generation" yaml:"generation"` Handle string `json:"handle" yaml:"handle"` Avatar *Avatar `json:"avatar,omitempty" yaml:"avatar,omitempty"` Workshops []string `json:"workshops" yaml:"workshops"` Squads []string `json:"squads" yaml:"squads"` DiscordID string `json:"discord_id,omitempty" yaml:"discord_id,omitempty"` TwitterScreenName string `json:"twitter_screen_name,omitempty" yaml:"twitter_screen_name,omitempty"` }
Card - 会員証の表示のための情報
func GetCardFromUser ¶
type EmailKind ¶
type EmailKind string
EmailKind - メール送信を行う種類
const ( // EmailVerification - Eメール認証で送信するメール EmailVerification EmailKind = "email_verification" // AfterRegistration - 新規登録時(メール確認後) AfterRegistration EmailKind = "after_registration" // PaymentReceipt - 支払い確認時 PaymentReceipt EmailKind = "payment_receipt" // PaymentReminder - 支払いが完了していないメンバーに対してメールを送る PaymentReminder EmailKind = "payment_reminder" )
type OIDCAccountInfo ¶
type OIDCAccountInfo struct { Token string `json:"token"` AccountID string `json:"account_id"` //auth0のsub Email string `json:"email"` }
OIDCAccountInfo - ソーシャルログインしたアカウントの情報. Signupする前に用いる
func NewOIDCAccountInfo ¶
func NewOIDCAccountInfo(token, accountID, email string) OIDCAccountInfo
func (*OIDCAccountInfo) Validate ¶
func (account *OIDCAccountInfo) Validate() error
Validate - oidc_account_infoを検証
type PaymentStatus ¶
type PaymentStatus struct { UserID int `json:"user_id" yaml:"user_id"` Authorizer int `json:"authorizer" yaml:"authorizer"` // Period - 支払い区間(201904, 201910のようにYYYYMM) Period int `json:"period" yaml:"period"` CreatedAt time.Time `json:"created_at" yaml:"created_at"` UpdatedAt time.Time `json:"updated_at" yaml:"updated_at"` }
PaymentStatus - 支払い情報
type PaymentTransaction ¶
type RoleType ¶
type RoleType string
RoleType - サークル員の種別
func (RoleType) GetNewRole ¶
GetNewRole - paidの状態によって次のroleの状態遷移を定義する
type Token ¶
type Token struct { UserID int `json:"user_id" yaml:"user_id"` Token string `json:"token" yaml:"token"` ExpiredAt time.Time `json:"expired_at" yaml:"expired_at"` CreatedAt time.Time `json:"created_at" yaml:"created_at"` UpdatedAt time.Time `json:"updated_at" yaml:"updated_at"` }
Token - 認証用トークン
type University ¶
type University struct { Name string `json:"name" yaml:"name"` Department string `json:"department" yaml:"department"` Subject string `json:"subject" yaml:"subject"` }
University - 所属大学
type User ¶
type User struct { ID int `json:"id" yaml:"id"` Email string `json:"email" yaml:"email"` Generation int `json:"generation" yaml:"generation"` Name string `json:"name" yaml:"name"` Kana string `json:"kana" yaml:"kana"` Handle string `json:"handle" yaml:"handle"` Avatar *Avatar `json:"avatar,omitempty" yaml:"avatar,omitempty"` Sex SexType `json:"sex" yaml:"sex"` University University `json:"university" yaml:"university"` StudentID string `json:"student_id" yaml:"student_id"` EmergencyPhoneNumber string `json:"emergency_phone_number" yaml:"emergency_phone_number"` OtherCircles string `json:"other_circles" yaml:"other_circles"` Workshops []string `json:"workshops" yaml:"workshops"` Squads []string `json:"squads" yaml:"squads"` Role RoleType `json:"role" yaml:"role"` // 外部サービス ログインに使用しているアカウントのID AccountID string `json:"account_id" yaml:"account_id"` DiscordID string `json:"discord_id,omitempty" yaml:"discord_id,omitempty"` //discordログインにした場合は消してしまってもよい TwitterScreenName string `json:"twitter_screen_name,omitempty" yaml:"twitter_screen_name,omitempty"` EmailVerified bool `json:"email_verified" yaml:"email_verified"` CardPublished bool `json:"card_published" yaml:"card_published"` CreatedAt time.Time `json:"created_at" yaml:"created_at"` UpdatedAt time.Time `json:"updated_at" yaml:"updated_at"` }
User - サークル員の情報
type UserPaymentStatus ¶
type UserPaymentStatus struct { User PaymentStatus *PaymentStatus `json:"payment_status" yaml:"payment_status"` }
UserPaymentStatus - サークル員情報と支払い情報一期分の情報
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package repository is a generated GoMock package.
|
Package repository is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.