models

package
v0.0.0-...-03b4527 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Center

type Center struct {
	Name     string
	Address  string
	District string `json:"district_name"`
	State    string `json:"state_name"`
	Pincode  int
	FeeType  string `json:"fee_type"`
	Sessions []Session
}

type CowinResponse

type CowinResponse struct {
	Centers []Center `json:"centers"`
}

type District

type District struct {
	Name string `json:"district_name"`
	Code int    `json:"district_id"`
}

type DistrictsResponse

type DistrictsResponse struct {
	Districts []District
}

type Filters

type Filters struct {
	Age          int
	Dose         int
	DistrictCode string
	Vaccine      string
	Date         string
}

type FlatSession

type FlatSession struct {
	CenterName             string
	CenterAddress          string
	CenterDistrict         string
	CenterPincode          int
	SessionId              string
	SessionDate            string
	AvailableCapacityDose1 int
	AvailableCapacityDose2 int
	Vaccine                string
	Slots                  string
}

func FlatSessionsFrom

func FlatSessionsFrom(center Center, session Session) FlatSession

type Session

type Session struct {
	ID                     string `json:"session_id"`
	Date                   string
	AvailableCapacity      int `json:"available_capacity"`
	AvailableCapacityDose1 int `json:"available_capacity_dose1"`
	AvailableCapacityDose2 int `json:"available_capacity_dose2"`
	MinAge                 int `json:"min_age_limit"`
	Vaccine                string
	Slots                  []string
}

type State

type State struct {
	Name string `json:"state_name"`
	Code int    `json:"state_id"`
}

type StatesResponse

type StatesResponse struct {
	States []State
}

Jump to

Keyboard shortcuts

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