models

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Boat

type Boat struct {
	Name                      string       `json:"name"                        bson:"name"                        example:"EUROPA 2"`
	Maneuver                  BoatManeuver `json:"maneuver"                    bson:"maneuver"`
	ApproximativeCrossingDate time.Time    `` /* 126-byte string literal not displayed */
}

func (Boat) IsEqual

func (b Boat) IsEqual(other Boat) bool

type BoatManeuver

type BoatManeuver string
const (
	Leaving  BoatManeuver = "leaving_bordeaux"
	Entering BoatManeuver = "entering_in_bordeaux"
)

type Boats

type Boats []Boat

func (Boats) AreEqual

func (boats Boats) AreEqual(other Boats) bool

type ClosingReason

type ClosingReason string
const (
	BoatReason  ClosingReason = "boat"
	Maintenance ClosingReason = "maintenance"
)

type ClosingType

type ClosingType string
const (
	TwoWay ClosingType = "two_way"
	OneWay ClosingType = "one_way"
)

type ErrorResponse

type ErrorResponse struct {
	Error string `json:"error" example:"error in params"`
}

type Forecast

type Forecast struct {
	ID                       string          `json:"id"                         bson:"_id"                        example:"63a6430fc07ff1d895c9555ef2ef6e41c1e3b1f5"`
	ClosingType              ClosingType     `json:"closing_type"               bson:"closing_type"`
	ClosingDuration          time.Duration   `` /* 150-byte string literal not displayed */
	CirculationClosingDate   time.Time       `` /* 169-byte string literal not displayed */
	CirculationReopeningDate time.Time       `` /* 169-byte string literal not displayed */
	ClosingReason            ClosingReason   `json:"closing_reason"             bson:"closing_reason"`
	Boats                    Boats           `json:"boats,omitempty"            bson:"boats,omitempty"`
	Link                     OpenAPISelfLink `` /* 190-byte string literal not displayed */
}

func (Forecast) IsEqual

func (f Forecast) IsEqual(other Forecast) bool

type ForecastResponse

type ForecastResponse struct {
	Timezone string   `json:"timezone" example:"UTC"`
	Forecast Forecast `json:"forecast"`
}

type Forecasts

type Forecasts []Forecast

func (Forecasts) AreEqual

func (forecats Forecasts) AreEqual(other Forecasts) bool

type ForecastsResponse

type ForecastsResponse struct {
	Hits      int           `json:"hits"`
	Limit     int           `json:"limit"`
	Offset    int           `json:"offset"`
	Timezone  string        `json:"timezone"         example:"UTC"`
	Links     []interface{} `json:"_links,omitempty"`
	Forecasts []Forecast    `json:"forecasts"`
}

type MongoCountResponse

type MongoCountResponse struct {
	ItemCount int `json:"itemCount" bson:"itemCount"`
}

type MongoResponse

type MongoResponse struct {
	Results []Forecast           `json:"results" bson:"results"`
	Count   []MongoCountResponse `json:"count"   bson:"count"`
}

type OKResponse

type OKResponse struct {
	Message string `json:"message" example:"ok"`
}
type OpenAPILink struct {
	Link string `json:"href"`
}
type OpenAPINextLink struct {
	Self OpenAPILink `json:"next"`
}
type OpenAPIPreviousLink struct {
	Self OpenAPILink `json:"previous"`
}
type OpenAPISelfLink struct {
	Self OpenAPILink `json:"self"`
}

type OpenDataAPIResponse

type OpenDataAPIResponse struct {
	Hits       int                           `json:"nhits"`
	Parameters OpenDataAPIResponseParameters `json:"parameters"`
	Records    []OpenDataAPIResponseForecast `json:"records"`
}

type OpenDataAPIResponseForecast

type OpenDataAPIResponseForecast struct {
	DatasetID       string                           `json:"datasetid"`
	RecordID        string                           `json:"recordid"`
	Fields          OpenDataAPIResponseForecastField `json:"fields"`
	RecordTimestamp time.Time                        `json:"record_timestamp"`
}

type OpenDataAPIResponseForecastField

type OpenDataAPIResponseForecastField struct {
	ClosingDate  string `json:"date_passage"`
	ClosingTime  string `json:"fermeture_a_la_circulation"`
	OpeningTime  string `json:"re_ouverture_a_la_circulation"`
	TotalClosing string `json:"fermeture_totale"`
	Boat         string `json:"bateau"`
	ClosingType  string `json:"type_de_fermeture"`
}

type OpenDataAPIResponseParameters

type OpenDataAPIResponseParameters struct {
	Dataset  string   `json:"dataset"`
	Row      int      `json:"rows"`
	Start    int      `json:"start"`
	Sort     []string `json:"sort"`
	Format   string   `json:"format"`
	Timezone string   `json:"timezone"`
}

type Refresh

type Refresh struct {
	ID        primitive.ObjectID `json:"-"           bson:"_id,omitempty"`
	ItemCount int                `json:"item_count"  bson:"item_count"    example:"10"`
	Duration  time.Duration      `json:"duration_ns" bson:"duration_ns"   example:"348872934"                   swaggertype:"primitive,integer"`
	Timestamp time.Time          `` /* 128-byte string literal not displayed */
}

Jump to

Keyboard shortcuts

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