Documentation ¶
Index ¶
- Variables
- func GetFF14CharacterNameFromLodeStone(ctx context.Context, characterID string) (firstName string, lastName string, err error)
- func MakeRandomStr(digit uint32) (string, error)
- type Content
- type ContentStore
- func (s *ContentStore) CollectionName() string
- func (s *ContentStore) CollectionRef() *firestore.CollectionRef
- func (s *ContentStore) Create(ctx context.Context, value *Content) (*Content, error)
- func (s *ContentStore) Get(ctx context.Context, contentID string) (*Content, error)
- func (s *ContentStore) GetBySearchAlias(ctx context.Context, contentName string) (*Content, error)
- type ContentsHandler
- type ContentsQuizHandler
- type ContentsQuizReq
- type LoadStoneGetResponse
- type LoadStoneHandler
- type RegisterErrorResponse
- type RegisterHandler
- type RegisterReq
- type StaticContentsHandler
- type User
- type UserStore
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDirectory = errors.New("path is directory")
ErrDirectory is target path is Directory
View Source
var ErrLodeStoneCharacterNotFound = fmt.Errorf("loadstone character notfound")
View Source
var ErrLodeStoneInvalidFormat = fmt.Errorf("loadstone response invalid format")
Functions ¶
func MakeRandomStr ¶
Types ¶
type Content ¶
type Content struct { // ContentID is URLで表示するID // $ReleaseVolume-Kind-Grade-英語版コンテンツの名前を適当に3文字ぐらいにしたもの // e.g. 極ガルーダ討滅戦 RR-TR-EX-HE ContentID string `firestore:"-" json:"contentID"` // Name is コンテンツ名 Name string `json:"name"` // NameID is IDに使うName // 英語版コンテンツの名前を適当に3文字ぐらいにしたもの // https://na.finalfantasyxiv.com/lodestone/playguide/db/duty/ NameID string `json:"nameID"` // ReleaseVersion is 新生, 蒼天など ReleaseVersion enum.ReleaseVersion `json:"releaseVersion"` // ContentKind is 討滅戦, アライアンスレイドなど ContentKind enum.ContentKind `json:"contentKind"` // ContentDifficulty is 極, 絶などのグレード // アルテマウェポンなどは極もあるが、その上の絶もあるので、それをフィルタリングするために使う ContentDifficulty enum.ContentDifficulty `json:"contentDifficulty"` // エオルゼアデータベースURL JP EorzeaDatabaseJPURL string `json:"eorzeaDatabaseJPURL"` // Persons is 参加人数 // アライアンスレイドは24人なのか、8人なのか・・・ Persons int `json:"persons"` // MinItemLevel 最低平均アイテムレベル MinItemLevel int `json:"minItemLevel"` // SearchAlias is 検索に利用するコンテンツ名の別名 // e.g. 極ガルーダ討滅戦 -> ガルーダ SearchAlias []string `json:"searchAlias"` // OpenedUsers is 開放済みのUserList OpenedUsers []string `json:"openedUsers"` // CompletedUsers is LevelSyncでクリアしているUserList CompletedUsers []string `json:"completedUsers"` CreatedAt time.Time `json:"createdAt"` }
func (*Content) NewContentID ¶
type ContentStore ¶
type ContentStore struct {
// contains filtered or unexported fields
}
func NewContentStore ¶
func (*ContentStore) CollectionName ¶
func (s *ContentStore) CollectionName() string
func (*ContentStore) CollectionRef ¶
func (s *ContentStore) CollectionRef() *firestore.CollectionRef
func (*ContentStore) GetBySearchAlias ¶
type ContentsHandler ¶
type ContentsHandler struct {
// contains filtered or unexported fields
}
ContentsHandler is FF14 Contentsを表示するハンドラ
func NewContentsHandler ¶
func NewContentsHandler(ctx context.Context, contentStore *ContentStore) (*ContentsHandler, error)
func (*ContentsHandler) Handle ¶
func (h *ContentsHandler) Handle(w http.ResponseWriter, r *http.Request)
type ContentsQuizHandler ¶
type ContentsQuizHandler struct {
// contains filtered or unexported fields
}
func NewContentsQuizHandler ¶
func NewContentsQuizHandler(ctx context.Context, contentStore *ContentStore) (*ContentsQuizHandler, error)
func (*ContentsQuizHandler) Handle ¶
func (h *ContentsQuizHandler) Handle(w http.ResponseWriter, r *http.Request)
type ContentsQuizReq ¶
type LoadStoneGetResponse ¶
type LoadStoneHandler ¶
type LoadStoneHandler struct { }
func NewLoadStoneHandler ¶
func NewLoadStoneHandler(ctx context.Context) (*LoadStoneHandler, error)
func (*LoadStoneHandler) Handle ¶
func (h *LoadStoneHandler) Handle(w http.ResponseWriter, r *http.Request)
type RegisterErrorResponse ¶
type RegisterErrorResponse struct {
Message string `json:"message"`
}
type RegisterHandler ¶
type RegisterHandler struct {
// contains filtered or unexported fields
}
func NewRegisterHandler ¶
func NewRegisterHandler(ctx context.Context, userStore *UserStore) (*RegisterHandler, error)
func (*RegisterHandler) Handle ¶
func (h *RegisterHandler) Handle(w http.ResponseWriter, r *http.Request)
type RegisterReq ¶
type RegisterReq struct {
CharacterID string `json:"characterID"`
}
type StaticContentsHandler ¶
type StaticContentsHandler struct { }
func NewStaticContentsHandler ¶
func NewStaticContentsHandler(ctx context.Context) (*StaticContentsHandler, error)
func (*StaticContentsHandler) Handler ¶
func (h *StaticContentsHandler) Handler(w http.ResponseWriter, r *http.Request)
type User ¶
type User struct { // UserID is LodeStoneCharacterIDでいいか? // https://jp.finalfantasyxiv.com/lodestone/character/%d/ UserID string `firestore:"-" json:"userID"` // ViewID is URLとして利用する値 // FirstName-LastName-適当な4文字 ViewID string `json:"viewID"` // FirstName is Game内FirstName FirstName string `json:"firstName"` // LastName is Game内LastName LastName string `json:"lastName"` // HomeWorld is Game内HomeWorld HomeWorld string `json:"homeWorld"` // OpenedContents is 開放済みコンテンツ一覧 OpenedContents []string `json:"openedContents"` // CompletedContents is クリア済みコンテンツ一覧 CompletedContents []string `json:"completedContents"` CreatedAt time.Time `firestore:",serverTimestamp" json:"createdAt"` }
type UserStore ¶
type UserStore struct {
// contains filtered or unexported fields
}
func NewUserStore ¶
func (*UserStore) CollectionName ¶
func (*UserStore) CollectionRef ¶
func (s *UserStore) CollectionRef() *firestore.CollectionRef
Source Files ¶
Click to show internal directories.
Click to hide internal directories.