Documentation
¶
Overview ¶
Package embedcup contains the common models and embedded structs used across different entities in the Fabriktor. These structs represent shared fields and provide common functionality like Getters and Setters.
Package embedcup contains the common models and embedded structs used across different entities in the Fabriktor. These structs represent shared fields and provide common functionality like Getters and Setters.
Package embedcup contains the common models and embedded structs used across different entities in the Fabriktor. These structs represent shared fields and provide common functionality like Getters and Setters.
Package embedcup contains the common models and embedded structs used across different entities in the Fabriktor. These structs represent shared fields and provide common functionality like Getters and Setters.
Index ¶
- type Address
- func (a *Address) GetCity() string
- func (a *Address) GetCountry() string
- func (a *Address) GetFormattedAddress() string
- func (a *Address) GetLatitude() float64
- func (a *Address) GetLongitude() float64
- func (a *Address) GetPlaceID() string
- func (a *Address) GetPlaceName() string
- func (a *Address) GetPostalCode() string
- func (a *Address) GetState() string
- func (a *Address) GetStreet() string
- func (a *Address) GetTimezone() string
- func (a *Address) SetCity(city string)
- func (a *Address) SetCountry(country string)
- func (a *Address) SetFormattedAddress(address string)
- func (a *Address) SetLatitude(latitude float64)
- func (a *Address) SetLongitude(longitude float64)
- func (a *Address) SetPlaceID(placeID string)
- func (a *Address) SetPlaceName(placeName string)
- func (a *Address) SetPostalCode(postalCode string)
- func (a *Address) SetState(state string)
- func (a *Address) SetStreet(street string)
- func (a *Address) SetTimezone(timezone string)
- func (a *Address) SetTimezoneFromCoordinates(ctx context.Context, c contracts.MapsClientInterface, latitude float64, ...) error
- type AddressKey
- type Archive
- type ArchiveKey
- type Common
- func (c *Common) GetCreatedAt() time.Time
- func (c *Common) GetID() primitive.ObjectID
- func (c *Common) GetSchemaVersion() string
- func (c *Common) GetUpdatedAt() time.Time
- func (c *Common) SetCreatedAt(createdAt time.Time)
- func (c *Common) SetID(id primitive.ObjectID)
- func (c *Common) SetSchemaVersion(version string)
- func (c *Common) SetUpdatedAt(updatedAt time.Time)
- type CommonKey
- type Owner
- type OwnerKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶ added in v1.39.0
type Address struct { // The complete formatted address, as returned by Google. // example: 1600 Amphitheatre Parkway, Mountain View, CA 94043, USA // required: false FormattedAddress *string `json:"formatted_address" bson:"formatted_address" validate:"nonnilpointer"` // The name of the place, typically for landmarks or specific locations. // example: Central Park // required: false PlaceName *string `json:"place_name" bson:"place_name" validate:"nonnilpointer"` // The street number and name of the address. // example: 1600 Amphitheatre Parkway // required: false Street *string `json:"street" bson:"street" validate:"nonnilpointer"` // The city or locality of the address. // example: Mountain View // required: false City *string `json:"city" bson:"city" validate:"nonnilpointer"` // The state, province, or region of the address. // example: CA // required: false State *string `json:"state" bson:"state" validate:"nonnilpointer"` // The postal code of the address. // example: 94043 // required: false PostalCode *string `json:"postal_code" bson:"postal_code" validate:"nonnilpointer"` // The country of the address. // example: USA // required: false Country *string `json:"country" bson:"country" validate:"nonnilpointer"` // The latitude of the location, if available. // example: 37.4224764 // required: false Latitude *float64 `json:"latitude" bson:"latitude" validate:"nonnilpointer"` // The longitude of the location, if available. // example: -122.0842499 // required: false Longitude *float64 `json:"longitude" bson:"longitude" validate:"nonnilpointer"` // The Google Place ID associated with the location. // example: ChIJ2eUgeAK6j4ARbn5u_wAGqWA // required: false PlaceID *string `json:"place_id" bson:"place_id" validate:"nonnilpointer"` // The timezone of the location implicitely computed from the coordinates. // example: America/New_York // readOnly: true Timezone *string `bson:"timezone" json:"timezone" validate:"nonnilpointer"` }
Address represents an address picked from a Flutter Google location picker. swagger:model
func (*Address) GetCountry ¶ added in v1.39.0
func (*Address) GetFormattedAddress ¶ added in v1.39.0
func (*Address) GetLatitude ¶ added in v1.39.0
func (*Address) GetLongitude ¶ added in v1.39.0
func (*Address) GetPlaceID ¶ added in v1.39.0
func (*Address) GetPlaceName ¶ added in v1.39.0
func (*Address) GetPostalCode ¶ added in v1.39.0
func (*Address) GetTimezone ¶ added in v1.39.0
func (*Address) SetCountry ¶ added in v1.39.0
func (*Address) SetFormattedAddress ¶ added in v1.39.0
func (*Address) SetLatitude ¶ added in v1.39.0
func (*Address) SetLongitude ¶ added in v1.39.0
func (*Address) SetPlaceID ¶ added in v1.39.0
func (*Address) SetPlaceName ¶ added in v1.39.0
func (*Address) SetPostalCode ¶ added in v1.39.0
func (*Address) SetTimezone ¶ added in v1.39.0
func (*Address) SetTimezoneFromCoordinates ¶ added in v1.39.0
func (a *Address) SetTimezoneFromCoordinates(ctx context.Context, c contracts.MapsClientInterface, latitude float64, longitude float64) error
SetTimezoneFromCoordinates sets the timezone from the given coordinates.
type AddressKey ¶ added in v1.39.2
type AddressKey = string
AddressKey represents a key for address-related fields.
const ( AddressStreetKey AddressKey = "street" AddressCityKey AddressKey = "city" AddressStateKey AddressKey = "state" AddressPostalCodeKey AddressKey = "postal_code" AddressCountryKey AddressKey = "country" AddressLatitudeKey AddressKey = "latitude" AddressLongitudeKey AddressKey = "longitude" AddressPlaceIDKey AddressKey = "place_id" AddressTimezoneKey AddressKey = "timezone" AddressFormattedAddressKey AddressKey = "formatted_address" AddressPlaceNameKey AddressKey = "place_name" )
type Archive ¶ added in v1.35.20
type Archive struct { // Indicates whether the document is archived. // example: false // required: false IsArchived *bool `bson:"is_archived" json:"is_archived" validate:"nonnilpointer"` }
Archive provides a mechanism to flag documents as archived.
This flag enables filtering without preventing access to archived documents.
It serves as an alternative to deletion, helping maintain data integrity and supporting queries for deprecated or legacy documents. swagger:model
func (*Archive) GetIsArchived ¶ added in v1.35.20
func (*Archive) SetIsArchived ¶ added in v1.35.20
type ArchiveKey ¶ added in v1.39.2
type ArchiveKey = string
ArchiveKey represents a key for archive-related fields.
const (
ArchiveIsArchivedKey ArchiveKey = "is_archived"
)
type Common ¶
type Common struct { // The MongoDB ID of the document. // example: 5f6d4b9b9c6f9f0001b9c6f9 // readOnly: true ID *primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"` // The schema version of the document. // example: v1 // readOnly: true SchemaVersion *string `bson:"schema_version" json:"schema_version" conform:"lower" validate:"nonnilpointer,nonzeropointerelem"` // The last time the document was updated. // example: 2020-10-05T10:00:00Z // readOnly: true UpdatedAt *time.Time `bson:"updated_at" json:"updated_at" validate:"nonnilpointer,nonzeropointerelem"` // The time the document was created. // example: 2020-10-05T10:00:00Z // readOnly: true CreatedAt *time.Time `bson:"created_at" json:"created_at" validate:"nonnilpointer,nonzeropointerelem"` }
Common represents the common fields for all entities, embedded in all entities. swagger:model
func (*Common) GetCreatedAt ¶
func (*Common) GetSchemaVersion ¶
func (*Common) GetUpdatedAt ¶
func (*Common) SetCreatedAt ¶
func (*Common) SetSchemaVersion ¶
func (*Common) SetUpdatedAt ¶
type CommonKey ¶ added in v1.39.2
type CommonKey = string
CommonKey represents a key for common fields.
type Owner ¶ added in v1.39.2
type Owner struct { // The MongoDB ID of the owner of the document. // example: 5f7b1b9b9b9b9b9b9b9b9b9b // required: true OwnerID *primitive.ObjectID `bson:"owner_id" json:"owner_id" validate:"nonnilpointer,nonzeropointerelem"` }
Owner represents the owner of a document. swagger:model