Documentation ¶
Index ¶
- func CSV(ctx context.Context, w http.ResponseWriter, name string, data [][]string)
- func CSVByShiftJIS(ctx context.Context, w http.ResponseWriter, name string, data [][]string)
- func Error(ctx context.Context, w http.ResponseWriter, status int, msg string)
- func HTML(ctx context.Context, w http.ResponseWriter, status int, name string, ...)
- func HandleError(ctx context.Context, w http.ResponseWriter, err error)
- func JSON(ctx context.Context, w http.ResponseWriter, status int, v any)
- func Success(ctx context.Context, w http.ResponseWriter)
- func Text(ctx context.Context, w http.ResponseWriter, status int, body string)
- type ResponseError
- type ResponseOK
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CSVByShiftJIS ¶
CSVByShiftJIS ... CSV(ShiftJIS)をレンダリングする
func HandleError ¶
func HandleError(ctx context.Context, w http.ResponseWriter, err error)
HandleError ... よく使うエラーハンドリング
Types ¶
type ResponseError ¶
ResponseError ... エラーレスポンス
func NewResponseError ¶
func NewResponseError(status int, message string) *ResponseError
NewResponseError ... エラーレスポンスを取得する
Click to show internal directories.
Click to hide internal directories.