Documentation ¶
Index ¶
- func CreateInitialSettings(filename string) error
- func LoadCache(settings Settings) (*mmap.ReaderAt, *ratecache.CacheIndex, *ratecache.FileHeader, error)
- type HandlerContext
- func (context *HandlerContext) AccoListHandler(w http.ResponseWriter, r *http.Request)
- func (context *HandlerContext) AddIndexHandler(w http.ResponseWriter, r *http.Request)
- func (context HandlerContext) Find(idxResults []ratecache.IdxResult, searchRq ratecache.SearchRq) ratecache.SearchRs
- func (context *HandlerContext) FindHandler(w http.ResponseWriter, r *http.Request)
- func (context *HandlerContext) RoomListHandler(w http.ResponseWriter, r *http.Request)
- type Settings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateInitialSettings ¶
CreateInitialSettings creates a settings file with everything necessary for starting the web service. Everything else is taken from the cache header file.
func LoadCache ¶
func LoadCache(settings Settings) (*mmap.ReaderAt, *ratecache.CacheIndex, *ratecache.FileHeader, error)
Types ¶
type HandlerContext ¶
type HandlerContext struct { Settings Settings Map *mmap.ReaderAt Idx *ratecache.CacheIndex Fhdr *ratecache.FileHeader }
func (*HandlerContext) AccoListHandler ¶
func (context *HandlerContext) AccoListHandler(w http.ResponseWriter, r *http.Request)
AccoListHandler provides an ordered list of all accommodation codes
func (*HandlerContext) AddIndexHandler ¶
func (context *HandlerContext) AddIndexHandler(w http.ResponseWriter, r *http.Request)
adds an index entry to the index based on the json data received in the body
func (*HandlerContext) FindHandler ¶
func (context *HandlerContext) FindHandler(w http.ResponseWriter, r *http.Request)
func (*HandlerContext) RoomListHandler ¶
func (context *HandlerContext) RoomListHandler(w http.ResponseWriter, r *http.Request)
RoomListHandler provides all room rate codes and the corresponding occupancies for one accommodation
Click to show internal directories.
Click to hide internal directories.