embedcup

package
v1.39.2 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2025 License: MIT Imports: 5 Imported by: 0

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

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) GetCity added in v1.39.0

func (a *Address) GetCity() string

func (*Address) GetCountry added in v1.39.0

func (a *Address) GetCountry() string

func (*Address) GetFormattedAddress added in v1.39.0

func (a *Address) GetFormattedAddress() string

func (*Address) GetLatitude added in v1.39.0

func (a *Address) GetLatitude() float64

func (*Address) GetLongitude added in v1.39.0

func (a *Address) GetLongitude() float64

func (*Address) GetPlaceID added in v1.39.0

func (a *Address) GetPlaceID() string

func (*Address) GetPlaceName added in v1.39.0

func (a *Address) GetPlaceName() string

func (*Address) GetPostalCode added in v1.39.0

func (a *Address) GetPostalCode() string

func (*Address) GetState added in v1.39.0

func (a *Address) GetState() string

func (*Address) GetStreet added in v1.39.0

func (a *Address) GetStreet() string

func (*Address) GetTimezone added in v1.39.0

func (a *Address) GetTimezone() string

func (*Address) SetCity added in v1.39.0

func (a *Address) SetCity(city string)

func (*Address) SetCountry added in v1.39.0

func (a *Address) SetCountry(country string)

func (*Address) SetFormattedAddress added in v1.39.0

func (a *Address) SetFormattedAddress(address string)

func (*Address) SetLatitude added in v1.39.0

func (a *Address) SetLatitude(latitude float64)

func (*Address) SetLongitude added in v1.39.0

func (a *Address) SetLongitude(longitude float64)

func (*Address) SetPlaceID added in v1.39.0

func (a *Address) SetPlaceID(placeID string)

func (*Address) SetPlaceName added in v1.39.0

func (a *Address) SetPlaceName(placeName string)

func (*Address) SetPostalCode added in v1.39.0

func (a *Address) SetPostalCode(postalCode string)

func (*Address) SetState added in v1.39.0

func (a *Address) SetState(state string)

func (*Address) SetStreet added in v1.39.0

func (a *Address) SetStreet(street string)

func (*Address) SetTimezone added in v1.39.0

func (a *Address) SetTimezone(timezone string)

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 (c *Archive) GetIsArchived() bool

func (*Archive) SetIsArchived added in v1.35.20

func (c *Archive) SetIsArchived(archive bool)

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 (c *Common) GetCreatedAt() time.Time

func (*Common) GetID

func (c *Common) GetID() primitive.ObjectID

func (*Common) GetSchemaVersion

func (c *Common) GetSchemaVersion() string

func (*Common) GetUpdatedAt

func (c *Common) GetUpdatedAt() time.Time

func (*Common) SetCreatedAt

func (c *Common) SetCreatedAt(createdAt time.Time)

func (*Common) SetID

func (c *Common) SetID(id primitive.ObjectID)

func (*Common) SetSchemaVersion

func (c *Common) SetSchemaVersion(version string)

func (*Common) SetUpdatedAt

func (c *Common) SetUpdatedAt(updatedAt time.Time)

type CommonKey added in v1.39.2

type CommonKey = string

CommonKey represents a key for common fields.

const (
	CommonIDKey            CommonKey = "_id"
	CommonSchemaVersionKey CommonKey = "schema_version"
	CommonUpdatedAtKey     CommonKey = "updated_at"
	CommonCreatedAtKey     CommonKey = "created_at"
)

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

func (*Owner) GetOwnerID added in v1.39.2

func (o *Owner) GetOwnerID() primitive.ObjectID

func (*Owner) SetOwnerID added in v1.39.2

func (o *Owner) SetOwnerID(id primitive.ObjectID)

type OwnerKey added in v1.39.2

type OwnerKey = string

OwnerKey is an alias for string, representing a key for owner-related fields.

const (
	OwnerIDKey OwnerKey = "owner_id"
)

Jump to

Keyboard shortcuts

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