webapp

package
v0.0.0-...-53f8b62 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppGetNotificationOK

type AppGetNotificationOK struct {
	Data         null.Value[UserNotificationData] `json:"data"`
	RetryAfterMs null.Int                         `json:"retry_after_ms"`
}

type ChairGetNotificationOK

type ChairGetNotificationOK struct {
	Data         null.Value[ChairNotificationData] `json:"data"`
	RetryAfterMs null.Int                          `json:"retry_after_ms"`
}

type ChairNotificationData

type ChairNotificationData struct {
	RideID                string         `json:"ride_id"`
	User                  api.User       `json:"user"`
	PickupCoordinate      api.Coordinate `json:"pickup_coordinate"`
	DestinationCoordinate api.Coordinate `json:"destination_coordinate"`
	Status                api.RideStatus `json:"status"`
}

type Client

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

func NewClient

func NewClient(config ClientConfig, agentOptions ...agent.AgentOption) (*Client, error)

func (*Client) AddRequestModifier

func (c *Client) AddRequestModifier(modifier func(*http.Request))

func (*Client) AppGetNearbyChairs

func (c *Client) AppGetNearbyChairs(ctx context.Context, params *api.AppGetNearbyChairsParams) (*api.AppGetNearbyChairsOK, error)

func (*Client) AppGetNotification

func (c *Client) AppGetNotification(ctx context.Context) iter.Seq2[*AppGetNotificationOK, error]

func (*Client) AppGetRequests

func (c *Client) AppGetRequests(ctx context.Context) (*api.AppGetRidesOK, error)

func (*Client) AppPostPaymentMethods

func (c *Client) AppPostPaymentMethods(ctx context.Context, reqBody *api.AppPostPaymentMethodsReq) (*api.AppPostPaymentMethodsNoContent, error)

func (*Client) AppPostRegister

func (c *Client) AppPostRegister(ctx context.Context, reqBody *api.AppPostUsersReq) (*api.AppPostUsersCreated, error)

func (*Client) AppPostRequest

func (c *Client) AppPostRequest(ctx context.Context, reqBody *api.AppPostRidesReq) (*api.AppPostRidesAccepted, error)

func (*Client) AppPostRequestEvaluate

func (c *Client) AppPostRequestEvaluate(ctx context.Context, rideID string, reqBody *api.AppPostRideEvaluationReq) (*api.AppPostRideEvaluationOK, error)

func (*Client) AppPostRidesEstimatedFare

func (c *Client) AppPostRidesEstimatedFare(ctx context.Context, reqBody *api.AppPostRidesEstimatedFareReq) (*api.AppPostRidesEstimatedFareOK, error)

func (*Client) ChairGetNotification

func (c *Client) ChairGetNotification(ctx context.Context) iter.Seq2[*ChairGetNotificationOK, error]

func (*Client) ChairPostActivity

func (c *Client) ChairPostActivity(ctx context.Context, reqBody *api.ChairPostActivityReq) (*api.ChairPostActivityNoContent, error)

func (*Client) ChairPostCoordinate

func (c *Client) ChairPostCoordinate(ctx context.Context, reqBody *api.Coordinate) (*api.ChairPostCoordinateOK, error)

func (*Client) ChairPostRegister

func (c *Client) ChairPostRegister(ctx context.Context, reqBody *api.ChairPostChairsReq) (*api.ChairPostChairsCreated, error)

func (*Client) ChairPostRideStatus

func (c *Client) ChairPostRideStatus(ctx context.Context, rideID string, reqBody *api.ChairPostRideStatusReq) (*api.ChairPostRideStatusNoContent, error)

func (*Client) OwnerGetChairs

func (c *Client) OwnerGetChairs(ctx context.Context) (*api.OwnerGetChairsOK, error)

func (*Client) OwnerGetSales

func (c *Client) OwnerGetSales(ctx context.Context, params *api.OwnerGetSalesParams) (*api.OwnerGetSalesOK, error)

func (*Client) OwnerPostRegister

func (c *Client) OwnerPostRegister(ctx context.Context, reqBody *api.OwnerPostOwnersReq) (*api.OwnerPostOwnersCreated, error)

func (*Client) PostInitialize

func (c *Client) PostInitialize(ctx context.Context, reqBody *api.PostInitializeReq) (*PostInitializeResponse, error)

func (*Client) SetCookie

func (c *Client) SetCookie(cookie *http.Cookie)

func (*Client) StaticGetFileHash

func (c *Client) StaticGetFileHash(ctx context.Context, path string) (string, error)

type ClientConfig

type ClientConfig struct {
	TargetBaseURL         string
	TargetAddr            string
	ClientIdleConnTimeout time.Duration
}

type PostInitializeResponse

type PostInitializeResponse struct {
	Language string `json:"language"`
}

type UserNotificationData

type UserNotificationData struct {
	RideID                string                           `json:"ride_id"`
	PickupCoordinate      api.Coordinate                   `json:"pickup_coordinate"`
	DestinationCoordinate api.Coordinate                   `json:"destination_coordinate"`
	Fare                  int                              `json:"fare"`
	Status                api.RideStatus                   `json:"status"`
	Chair                 api.OptUserNotificationDataChair `json:"chair"`
	CreatedAt             int64                            `json:"created_at"`
	UpdatedAt             int64                            `json:"updated_at"`
}

Directories

Path Synopsis
Code generated by ogen, DO NOT EDIT.
Code generated by ogen, DO NOT EDIT.

Jump to

Keyboard shortcuts

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