Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var I18nMessages = messages{
Failed: "place_failed",
InvalidUUID: "place_invalid_uuid",
NotFound: "place_not_found",
FeatureUUIDsNotFound: "place_feature_uuids_not_found",
}
Functions ¶
This section is empty.
Types ¶
type Entity ¶
type Entity struct { UUID string `json:"uuid"` FeatureUUIDs []string `json:"featureUUIDs"` Images []Image `json:"images"` Translations map[Locale]*Translations `json:"translations"` AverageTimeSpent TimeSpent `json:"averageTimeSpent"` Review Review `json:"review"` Restorations []Restoration `json:"restorations"` Coordinates []float64 `json:"coordinates"` IsActive bool `json:"is_active"` IsDeleted bool `json:"is_deleted"` IsPayed bool `json:"is_payed"` Type Type `json:"type"` UpdatedAt time.Time `json:"updated_at"` CreatedAt time.Time `json:"created_at"` }
type EntityFilter ¶
type EntityFilter struct { Locale string Query string Coordinates []float64 FeatureUUIDs []string AverageTimeSpent *TimeSpent Distance *float64 IsPayed *bool MinReview *int16 MaxReview *int16 Types []Type MinAveragePoint *float32 MaxAveragePoint *float32 Sort Sort Order Order }
func (*EntityFilter) GetPerfectDistance ¶
func (e *EntityFilter) GetPerfectDistance() float64
func (*EntityFilter) IsZero ¶
func (e *EntityFilter) IsZero() bool
type I18nDetail ¶
type NewConfig ¶
type NewConfig struct { FeatureUUIDs []string Images []Image Translations map[Locale]*Translations AverageTimeSpent TimeSpent Restorations []Restoration Coordinates []float64 IsPayed bool Type Type }
type Repository ¶
type Repository interface { Create(ctx context.Context, place *Entity) (string, *i18np.Error) Update(ctx context.Context, uuid string, place *Entity) *i18np.Error Disable(ctx context.Context, uuid string) *i18np.Error Delete(ctx context.Context, uuid string) *i18np.Error Enable(ctx context.Context, uuid string) *i18np.Error Filter(ctx context.Context, filter EntityFilter, listConfig list.Config) (*list.Result[*Entity], *i18np.Error) View(ctx context.Context, detail I18nDetail) (*Entity, *i18np.Error) AdminView(ctx context.Context, uuid string) (*Entity, *i18np.Error) List(ctx context.Context, filter EntityFilter, listConfig list.Config) (*list.Result[*Entity], *i18np.Error) AdminList(ctx context.Context, filter EntityFilter, listConfig list.Config) (*list.Result[*Entity], *i18np.Error) }
type Restoration ¶
type Translations ¶
type Type ¶
type Type string
const ( TypeEating Type = "eating" TypeCoffee Type = "coffee" TypeBar Type = "bar" TypeBeach Type = "beach" TypeAmaze Type = "amaze" TypeShopping Type = "shopping" TypeTransport Type = "transport" TypeCulture Type = "culture" TypeNature Type = "nature" TypeHealth Type = "health" TypeSport Type = "sport" TypeNightlife Type = "nightlife" TypeGarden Type = "garden" TypeTemple Type = "temple" TypeMuseum Type = "museum" TypeAntique Type = "antique" TypePark Type = "park" TypeThemePark Type = "themePark" TypeOther Type = "other" )
Click to show internal directories.
Click to hide internal directories.