Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BadRequest = &ErrorResponse{ StatusCode: http.StatusBadRequest, Message: "不正なパラメータが入力されています。", } StatusCode: http.StatusUnauthorized, Message: "認証に必要な情報がありません。", ValidationErrors: nil, } Forbidden = &ErrorResponse{ StatusCode: http.StatusForbidden, Message: "その操作を実行する権限がありません。", ValidationErrors: nil, } NotFound = &ErrorResponse{ StatusCode: http.StatusNotFound, Message: "指定の情報が見つかりません。", ValidationErrors: nil, } AlreadyExists = &ErrorResponse{ StatusCode: http.StatusConflict, Message: "不正なパラメータが入力されています。", } InternalServerError = &ErrorResponse{ StatusCode: http.StatusInternalServerError, Message: "異常な処理が検出されました。", ValidationErrors: nil, } )
ステータスコードを付与したエラーレスポンス
Functions ¶
This section is empty.
Types ¶
type ErrorResponse ¶
type ErrorResponse struct { StatusCode int `json:"status"` ErrorCode domain.ErrorCode `json:"code"` Message string `json:"message"` ValidationErrors []*ValidationError `json:"errors,omitempty"` }
ErrorResponse - エラーのレスポンス
type Group ¶
type Group struct { ID string `json:"id"` Name string `json:"name"` UserIDs []string `json:"userIds"` BoardIDs []string `json:"boardIds"` InvitedEmails []string `json:"invitedEmails"` Description string `json:"description"` CreatedAt time.Time `firestore:"createdAt"` UpdatedAt time.Time `firestore:"updatedAt"` }
Group - グループのレスポンス
type ValidationError ¶
ValidationError - バリデーションエラーのレスポンス
Click to show internal directories.
Click to hide internal directories.