router

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCity

func NewCity(bloc presenter.CityBloc) router.HTTPRouter

func NewPrefecture

func NewPrefecture(bloc presenter.PrefectureBloc) router.HTTPRouter

Types

type City

type City struct {
	Name           string `json:"name"`
	Ruby           string `json:"ruby"`
	PrefectureCode string `json:"prefecture_code"`
	CityCode       string `json:"city_code"`
	CheckDigit     int    `json:"check_digit"`
}

type CityRouter

type CityRouter struct {
	// contains filtered or unexported fields
}

CityRouter ...

func (*CityRouter) Import

func (rt *CityRouter) Import(w http.ResponseWriter, r *http.Request)

func (*CityRouter) Route

func (rt *CityRouter) Route(mux *chi.Mux) (err error)

func (*CityRouter) Search

func (rt *CityRouter) Search(w http.ResponseWriter, r *http.Request)

type CitySearchResponse

type CitySearchResponse struct {
	Cities []*City `json:"cities"`
}

type Prefecture

type Prefecture struct {
	Code string `json:"code"`
	Name string `json:"name"`
	Ruby string `json:"ruby"`
}

type PrefectureFindAllResponse

type PrefectureFindAllResponse struct {
	Prefectures []*Prefecture `json:"prefectures"`
}

type PrefectureRouter

type PrefectureRouter struct {
	// contains filtered or unexported fields
}

PrefectureRouter ...

func (*PrefectureRouter) FindAll

func (rt *PrefectureRouter) FindAll(w http.ResponseWriter, r *http.Request)

func (*PrefectureRouter) Route

func (rt *PrefectureRouter) Route(mux *chi.Mux) (err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL