cowin

package
v0.0.0-...-e7ad853 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateToken

func GenerateToken(number, tokenFile string)

Generates token file

func PrintCenters

func PrintCenters(options Options)

func ScheduleVaccine

func ScheduleVaccine(options Options)

Types

type BadRequest

type BadRequest struct {
	Errorcode string `json:"errorCode"`
	Error     string `json:"error"`
}

type CenterBookable

type CenterBookable struct {
	Name              string
	Freetype          string
	SessionID         string
	MinAgeLimit       int
	Date              string
	Vaccine           string
	AvailableCapacity int
	DoseType          string
	Slots             []string
}

func ExportedgetCenterBookable

func ExportedgetCenterBookable(options Options) []CenterBookable

type CentreData

type CentreData struct {
	Centers []struct {
		Name     string `json:"name"`
		FeeType  string `json:"fee_type"`
		Sessions []struct {
			SessionID              string   `json:"session_id"`
			Date                   string   `json:"date"`
			AvailableCapacity      int      `json:"available_capacity"`
			MinAgeLimit            int      `json:"min_age_limit"`
			Vaccine                string   `json:"vaccine"`
			Slots                  []string `json:"slots"`
			AvailableCapacityDose1 int      `json:"available_capacity_dose1"`
			AvailableCapacityDose2 int      `json:"available_capacity_dose2"`
		} `json:"sessions"`
	} `json:"centers"`
}

type DistrictsData

type DistrictsData struct {
	Districts []struct {
		DistrictID   int    `json:"district_id"`
		DistrictName string `json:"district_name"`
	} `json:"districts"`
}

type Options

type Options struct {
	State        string
	District     string
	Date         string
	Vaccine      string
	Info         bool
	Bookable     bool
	Schedule     bool
	Aotp         bool
	MobileNumber string
	Names        string
	Centers      string
	Age          int
	Slot         string
	Ntok         bool
	Dose         int
	TokenFile    string
	FreeType     string
	Protected    bool
	Mslot        int
}

type ScheduleData

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

type StatesData

type StatesData struct {
	States []struct {
		StateID   int    `json:"state_id"`
		StateName string `json:"state_name"`
	} `json:"states"`
}

Jump to

Keyboard shortcuts

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