bus

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBus

func NewBus(scheme, host, path string) *bus

Types

type ConfirmPassengerEmailDTO

type ConfirmPassengerEmailDTO struct {
	Data string `json:"data"`
}

type FeedbackRequest

type FeedbackRequest struct {
	Phone   string `json:"phone"`
	Subject string `json:"subject"`
	Text    string `json:"text"`
}

type JwtDTO

type JwtDTO struct {
	Username     string   `json:"username"`
	Roles        []string `json:"roles"`
	AccessToken  string   `json:"access_token"`
	RefreshToken string   `json:"refresh_token"`
	TokenType    string   `json:"token_type"`
	ExpiresIn    int      `json:"expires_in"`
}

type LoginRequest

type LoginRequest struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type OrderDTO

type OrderDTO struct {
	Agent struct {
		Extra    int    `json:"extra"`
		FullName string `json:"fullName"`
		Id       int    `json:"id"`
		Markup   int    `json:"markup"`
	} `json:"agent"`
	Created       time.Time `json:"created"`
	Expired       time.Time `json:"expired"`
	Finished      time.Time `json:"finished"`
	Id            int       `json:"id"`
	PaymentMethod string    `json:"paymentMethod"`
	Repayment     int       `json:"repayment"`
	ReserveCode   string    `json:"reserveCode"`
	Status        string    `json:"status"`
	Tickets       []struct {
		ArrivalAddress    string    `json:"arrivalAddress"`
		ArrivalDate       time.Time `json:"arrivalDate"`
		ArrivalStation    string    `json:"arrivalStation"`
		Barcode           string    `json:"barcode"`
		Birthday          time.Time `json:"birthday"`
		BusInfo           string    `json:"busInfo"`
		Carrier           string    `json:"carrier"`
		CarrierInn        string    `json:"carrierInn"`
		Citizenship       string    `json:"citizenship"`
		DispatchAddress   string    `json:"dispatchAddress"`
		DispatchDate      time.Time `json:"dispatchDate"`
		DispatchStation   string    `json:"dispatchStation"`
		DocNum            string    `json:"docNum"`
		DocSeries         string    `json:"docSeries"`
		DocType           string    `json:"docType"`
		DownloadUrl       string    `json:"downloadUrl"`
		Dues              int       `json:"dues"`
		FirstName         string    `json:"firstName"`
		Gender            string    `json:"gender"`
		Id                int       `json:"id"`
		LastName          string    `json:"lastName"`
		MiddleName        string    `json:"middleName"`
		Phone             string    `json:"phone"`
		Platform          string    `json:"platform"`
		Price             int       `json:"price"`
		RaceClassId       int       `json:"raceClassId"`
		RaceName          string    `json:"raceName"`
		RaceNum           string    `json:"raceNum"`
		RaceUid           string    `json:"raceUid"`
		Repayment         int       `json:"repayment"`
		Returned          time.Time `json:"returned"`
		Seat              string    `json:"seat"`
		Status            string    `json:"status"`
		SupplierDues      int       `json:"supplierDues"`
		SupplierFare      int       `json:"supplierFare"`
		SupplierPrice     int       `json:"supplierPrice"`
		SupplierRepayment int       `json:"supplierRepayment"`
		TicketClass       string    `json:"ticketClass"`
		TicketCode        string    `json:"ticketCode"`
		TicketNum         string    `json:"ticketNum"`
		TicketSeries      string    `json:"ticketSeries"`
		TicketType        string    `json:"ticketType"`
		Updatable         bool      `json:"updatable"`
		Vat               int       `json:"vat"`
	} `json:"tickets"`
	Total int `json:"total"`
}

type PassengerCreateRequest

type PassengerCreateRequest struct {
	Birthday    time.Time `json:"birthday"`
	Citizenship string    `json:"citizenship"`
	DocNum      string    `json:"docNum"`
	DocSeries   string    `json:"docSeries"`
	DocTypeCode string    `json:"docTypeCode"`
	Email       string    `json:"email"`
	FirstName   string    `json:"firstName"`
	Gender      string    `json:"gender"`
	LastName    string    `json:"lastName"`
	MiddleName  string    `json:"middleName"`
	Owner       bool      `json:"owner"`
	Phone       string    `json:"phone"`
}

type PassengerDTO

type PassengerDTO struct {
	Birthday     time.Time `json:"birthday"`
	Citizenship  string    `json:"citizenship"`
	ConfirmEmail bool      `json:"confirmEmail"`
	DocNum       string    `json:"docNum"`
	DocSeries    string    `json:"docSeries"`
	DocTypeCode  string    `json:"docTypeCode"`
	Email        string    `json:"email"`
	FirstName    string    `json:"firstName"`
	Gender       string    `json:"gender"`
	Id           int       `json:"id"`
	LastName     string    `json:"lastName"`
	MiddleName   string    `json:"middleName"`
	Owner        bool      `json:"owner"`
	Phone        string    `json:"phone"`
}

type PaymentTypeDTO

type PaymentTypeDTO struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

type PaymentsURLRequest

type PaymentsURLRequest struct {
	OrderIds      []int `json:"orderIds"`
	PaymentTypeId int   `json:"paymentTypeId"`
}

type PaymentsUrlDTO

type PaymentsUrlDTO struct {
	URL string `json:"url"`
}

type PhoneDTO

type PhoneDTO struct {
	Phone string `json:"phone"`
}

type PointDTO

type PointDTO struct {
	Address   string `json:"address"`
	Details   string `json:"details"`
	Id        int    `json:"id"`
	Latitude  string `json:"latitude"`
	Longitude string `json:"longitude"`
	Name      string `json:"name"`
	Okato     string `json:"okato"`
	Place     bool   `json:"place"`
	Region    string `json:"region"`
}

type RaceDTO

type RaceDTO struct {
	ArrivalDate        time.Time `json:"arrivalDate"`
	ArrivalPointId     int       `json:"arrivalPointId"`
	ArrivalStationName string    `json:"arrivalStationName"`
	BusInfo            string    `json:"busInfo"`
	Carrier            string    `json:"carrier"`
	CarrierInn         string    `json:"carrierInn"`
	Clazz              struct {
		Id   int    `json:"id"`
		Name string `json:"name"`
	} `json:"clazz"`
	DataRequired        bool      `json:"dataRequired"`
	DepotId             int       `json:"depotId"`
	DispatchDate        time.Time `json:"dispatchDate"`
	DispatchPointId     int       `json:"dispatchPointId"`
	DispatchStationName string    `json:"dispatchStationName"`
	FreeSeatCount       int       `json:"freeSeatCount"`
	FreeSeatEstimation  string    `json:"freeSeatEstimation"`
	FromCache           bool      `json:"fromCache"`
	Name                string    `json:"name"`
	Num                 string    `json:"num"`
	Price               float64   `json:"price"`
	Status              struct {
		Id   int    `json:"id"`
		Name string `json:"name"`
	} `json:"status"`
	SupplierPrice float64 `json:"supplierPrice"`
	Type          struct {
		Id   int    `json:"id"`
		Name string `json:"name"`
	} `json:"type"`
	Uid string `json:"uid"`
}

type RaceSummaryDTO

type RaceSummaryDTO struct {
	Depot struct {
		Address          string `json:"address"`
		BookingTimeLimit int    `json:"bookingTimeLimit"`
		Engine           string `json:"engine"`
		Features         string `json:"features"`
		Id               int    `json:"id"`
		Info             string `json:"info"`
		Latitude         string `json:"latitude"`
		Longitude        string `json:"longitude"`
		Name             string `json:"name"`
		Online           bool   `json:"online"`
		PhoneRequired    bool   `json:"phoneRequired"`
		Phones           string `json:"phones"`
		PrintInfo        string `json:"printInfo"`
		ReturnInfo       string `json:"returnInfo"`
		Site             string `json:"site"`
		TicketLimit      int    `json:"ticketLimit"`
		Timezone         string `json:"timezone"`
		Version          string `json:"version"`
		WorkingTime      string `json:"workingTime"`
	} `json:"depot"`
	DocTypes []struct {
		Code string `json:"code"`
		Name string `json:"name"`
		Type string `json:"type"`
	} `json:"docTypes"`
	Race struct {
		ArrivalDate        time.Time `json:"arrivalDate"`
		ArrivalPointId     int       `json:"arrivalPointId"`
		ArrivalStationName string    `json:"arrivalStationName"`
		BusInfo            string    `json:"busInfo"`
		Carrier            string    `json:"carrier"`
		CarrierInn         string    `json:"carrierInn"`
		Clazz              struct {
			Id   int    `json:"id"`
			Name string `json:"name"`
		} `json:"clazz"`
		DataRequired        bool      `json:"dataRequired"`
		DepotId             int       `json:"depotId"`
		DispatchDate        time.Time `json:"dispatchDate"`
		DispatchPointId     int       `json:"dispatchPointId"`
		DispatchStationName string    `json:"dispatchStationName"`
		FreeSeatCount       int       `json:"freeSeatCount"`
		FreeSeatEstimation  string    `json:"freeSeatEstimation"`
		FromCache           bool      `json:"fromCache"`
		Name                string    `json:"name"`
		Num                 string    `json:"num"`
		Price               float64   `json:"price"`
		Status              struct {
			Id   int    `json:"id"`
			Name string `json:"name"`
		} `json:"status"`
		SupplierPrice float64 `json:"supplierPrice"`
		Type          struct {
			Id   int    `json:"id"`
			Name string `json:"name"`
		} `json:"type"`
		Uid string `json:"uid"`
	} `json:"race"`
	Seats []struct {
		Code string `json:"code"`
		Name string `json:"name"`
		Type string `json:"type"`
	} `json:"seats"`
	Stops []struct {
		ArrivalDate  time.Time `json:"arrivalDate"`
		Code         string    `json:"code"`
		DispatchDate time.Time `json:"dispatchDate"`
		Distance     int       `json:"distance"`
		Name         string    `json:"name"`
		RegionName   string    `json:"regionName"`
		StopTime     int       `json:"stopTime"`
	} `json:"stops"`
	TicketTypes []struct {
		Code        string  `json:"code"`
		Name        string  `json:"name"`
		Price       float64 `json:"price"`
		TicketClass string  `json:"ticketClass"`
	} `json:"ticketTypes"`
}

type RefundTicketsDTO

type RefundTicketsDTO struct {
	Data string `json:"data"`
}

type RefundTicketsRequest

type RefundTicketsRequest struct {
	TicketIds []int `json:"ticketIds"`
}

type SaleRequest

type SaleRequest struct {
	Birthday       time.Time `json:"birthday"`
	Citizenship    string    `json:"citizenship"`
	DocNum         string    `json:"docNum"`
	DocSeries      string    `json:"docSeries"`
	DocTypeCode    string    `json:"docTypeCode"`
	FirstName      string    `json:"firstName"`
	Gender         string    `json:"gender"`
	LastName       string    `json:"lastName"`
	MiddleName     string    `json:"middleName"`
	Phone          string    `json:"phone"`
	SeatCode       string    `json:"seatCode"`
	TicketTypeCode string    `json:"ticketTypeCode"`
}

type TourDTO

type TourDTO struct {
	First struct {
		RaceUid string `json:"raceUid"`
		Sales   []struct {
			Birthday       time.Time `json:"birthday"`
			Citizenship    string    `json:"citizenship"`
			DocNum         string    `json:"docNum"`
			DocSeries      string    `json:"docSeries"`
			DocTypeCode    string    `json:"docTypeCode"`
			FirstName      string    `json:"firstName"`
			Gender         string    `json:"gender"`
			LastName       string    `json:"lastName"`
			MiddleName     string    `json:"middleName"`
			Phone          string    `json:"phone"`
			SeatCode       string    `json:"seatCode"`
			TicketTypeCode string    `json:"ticketTypeCode"`
		} `json:"sales"`
	} `json:"first"`
	Second struct {
		RaceUid string `json:"raceUid"`
		Sales   []struct {
			Birthday       time.Time `json:"birthday"`
			Citizenship    string    `json:"citizenship"`
			DocNum         string    `json:"docNum"`
			DocSeries      string    `json:"docSeries"`
			DocTypeCode    string    `json:"docTypeCode"`
			FirstName      string    `json:"firstName"`
			Gender         string    `json:"gender"`
			LastName       string    `json:"lastName"`
			MiddleName     string    `json:"middleName"`
			Phone          string    `json:"phone"`
			SeatCode       string    `json:"seatCode"`
			TicketTypeCode string    `json:"ticketTypeCode"`
		} `json:"sales"`
	} `json:"second"`
}

type UpdateUserRequest

type UpdateUserRequest struct {
	Email      string `json:"email"`
	FirstName  string `json:"firstName"`
	LastName   string `json:"lastName"`
	MiddleName string `json:"middleName"`
}

type UserDTO

type UserDTO struct {
	ConfirmEmail bool   `json:"confirmEmail"`
	Email        string `json:"email"`
	FirstName    string `json:"firstName"`
	Id           int    `json:"id"`
	LastName     string `json:"lastName"`
	MiddleName   string `json:"middleName"`
	Phone        string `json:"phone"`
}

Jump to

Keyboard shortcuts

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