Documentation ¶
Index ¶
- Constants
- Variables
- type Currencies
- type Currency
- type CurrencyStatus
- type Global
- type Globals
- type Locale
- type Locales
- type Location
- type LocationInput
- type Model
- type NewCurrency
- type NewGlobal
- type NewLocale
- type NewLocation
- type NewTerm
- type NewTimezone
- type NewWebhook
- type Object
- type Place
- func (i *Place) Collection() string
- func (i *Place) Delete(collection typesense.CollectionInterface, documentKey primitive.M) error
- func (i *Place) Document() map[string]interface{}
- func (i *Place) Index() []mongo.IndexModel
- func (i *Place) Insert(collection typesense.CollectionInterface) error
- func (Place) IsEntity()
- func (i *Place) MarshalBSON() ([]byte, error)
- func (i *Place) Schema() interface{}
- func (i *Place) Update(collection typesense.CollectionInterface, documentKey primitive.M, ...) error
- type PlaceStatus
- type PlaceType
- type Places
- type Relationship
- type Term
- func (i *Term) Collection() string
- func (i *Term) Delete(collection typesense.CollectionInterface, documentKey primitive.M) error
- func (i *Term) Document() map[string]interface{}
- func (i *Term) Index() []mongo.IndexModel
- func (i *Term) Insert(collection typesense.CollectionInterface) error
- func (Term) IsEntity()
- func (i *Term) MarshalBSON() ([]byte, error)
- func (i *Term) Schema() interface{}
- func (i *Term) Update(collection typesense.CollectionInterface, documentKey primitive.M, ...) error
- type Terms
- type Timezone
- type Timezones
- type UpdateCurrency
- type UpdateGlobal
- type UpdateLocale
- type UpdateLocation
- type UpdateTerm
- type UpdateTimezone
- type UpdateWebhook
- type User
- type Webhook
- type WebhookEvent
- type WebhookEventAction
- type WebhookEventInput
- type WebhookHeader
- type WebhookHeaderInput
- type Webhooks
Constants ¶
View Source
const ( ClientCollection = "clients" InvitationCollection = "invitations" PermissionCollection = "permissions" RoleCollection = "roles" KeyCollection = "keys" UserCollection = "users" )
Variables ¶
View Source
var AllCurrencyStatus = []CurrencyStatus{ CurrencyStatusActive, CurrencyStatusInactive, }
View Source
var AllPlaceStatus = []PlaceStatus{ PlaceStatusActive, PlaceStatusInactive, }
View Source
var AllPlaceType = []PlaceType{ PlaceTypeCountry, PlaceTypeState, PlaceTypeCity, PlaceTypeDistrict, PlaceTypeStreet, }
View Source
var AllWebhookEventAction = []WebhookEventAction{ WebhookEventActionCreate, WebhookEventActionUpdate, WebhookEventActionDelete, WebhookEventActionPublish, WebhookEventActionUnpublish, }
Functions ¶
This section is empty.
Types ¶
type Currencies ¶
type Currency ¶
type Currency struct { Model `bson:",inline"` Code string `json:"code" bson:"code"` Locale string `json:"locale" bson:"locale"` Name primitive.M `json:"name" bson:"name"` Rate float64 `json:"rate" bson:"rate"` Symbol string `json:"symbol,omitempty" bson:"symbol,omitempty"` Precision int `json:"precision,omitempty" bson:"precision,omitempty"` Decimal string `json:"decimal,omitempty" bson:"decimal,omitempty"` Thousand string `json:"thousand,omitempty" bson:"thousand,omitempty"` Order int `json:"order" bson:"order"` }
func (*Currency) Collection ¶
func (*Currency) Index ¶
func (i *Currency) Index() []mongo.IndexModel
func (*Currency) MarshalBSON ¶
type CurrencyStatus ¶
type CurrencyStatus string
const ( CurrencyStatusActive CurrencyStatus = "ACTIVE" CurrencyStatusInactive CurrencyStatus = "INACTIVE" )
func (CurrencyStatus) IsValid ¶
func (e CurrencyStatus) IsValid() bool
func (CurrencyStatus) MarshalGQL ¶
func (e CurrencyStatus) MarshalGQL(w io.Writer)
func (CurrencyStatus) String ¶
func (e CurrencyStatus) String() string
func (*CurrencyStatus) UnmarshalGQL ¶
func (e *CurrencyStatus) UnmarshalGQL(v interface{}) error
type Global ¶
type Global struct { Model `bson:",inline"` Name string `json:"name" bson:"name"` Status string `json:"status" bson:"status"` }
func (*Global) Collection ¶
func (*Global) Index ¶
func (i *Global) Index() []mongo.IndexModel
func (*Global) MarshalBSON ¶
type Locale ¶
type Locale struct { Model `bson:",inline"` Code string `json:"code" bson:"code"` Locale string `json:"locale" bson:"locale"` Name primitive.M `json:"name" bson:"name"` Order int `json:"order" bson:"order"` Rtl bool `json:"rtl,omitempty" bson:"rtl,omitempty"` DateForm string `json:"date_format,omitempty" bson:"date_format,omitempty"` TimeForm string `json:"time_format,omitempty" bson:"time_format,omitempty"` WeekStart int `json:"week_start,omitempty" bson:"week_start,omitempty"` }
func (*Locale) Collection ¶
func (*Locale) Index ¶
func (i *Locale) Index() []mongo.IndexModel
func (*Locale) MarshalBSON ¶
type LocationInput ¶
type Model ¶
type Model struct { ID primitive.ObjectID `json:"id,omitempty" bson:"_id,omitempty"` Workspace primitive.ObjectID `json:"workspace,omitempty" bson:"workspace,omitempty"` Metadata primitive.M `json:"metadata,omitempty" bson:"metadata,omitempty"` Created primitive.Timestamp `json:"created,omitempty" bson:"created,omitempty"` Updated primitive.Timestamp `json:"updated,omitempty" bson:"updated,omitempty"` Deleted primitive.Timestamp `json:"deleted,omitempty" bson:"deleted,omitempty"` Timestamp primitive.Timestamp `json:"timestamp,omitempty" bson:"timestamp,omitempty"` }
type NewCurrency ¶
type NewCurrency struct { ID *string `json:"id,omitempty"` Locale string `json:"locale"` Name string `json:"name"` Code string `json:"code"` Rate float64 `json:"rate"` Symbol string `json:"symbol"` Precision int `json:"precision"` Decimal string `json:"decimal"` Thousand string `json:"thousand"` Order int `json:"order"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
type NewLocale ¶
type NewLocale struct { ID *string `json:"id,omitempty"` Name string `json:"name"` Locale string `json:"locale"` Code string `json:"code"` Order int `json:"order"` Rtl bool `json:"rtl"` DateFormat string `json:"date_format"` TimeFormat string `json:"time_format"` WeekStart int `json:"week_start"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
type NewLocation ¶
type NewLocation struct { Parent *string `json:"parent,omitempty"` Locale string `json:"locale"` Type string `json:"type"` Name string `json:"name"` Slug string `json:"slug"` Description *string `json:"description,omitempty"` Location *LocationInput `json:"location,omitempty"` Images []map[string]interface{} `json:"images,omitempty"` Status *string `json:"status,omitempty"` Reviewable *bool `json:"reviewable,omitempty"` Popular *bool `json:"popular,omitempty"` Order *int `json:"order,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
type NewTerm ¶
type NewTerm struct { Locale string `json:"locale"` Name string `json:"name"` Slug *string `json:"slug,omitempty"` Description *string `json:"description,omitempty"` Parent *string `json:"parent,omitempty"` Type string `json:"type"` Order *int `json:"order,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
type NewTimezone ¶
type NewWebhook ¶
type NewWebhook struct { Name string `json:"name"` URL string `json:"url"` Headers []*WebhookHeaderInput `json:"headers,omitempty"` Events []*WebhookEventInput `json:"events,omitempty"` }
type Place ¶
type Place struct { Model `bson:",inline"` Parent *primitive.ObjectID `json:"parent,omitempty" bson:"parent,omitempty"` Locale string `json:"locale" bson:"locale"` Type string `json:"type" bson:"type"` Slug string `json:"slug" bson:"slug"` Name primitive.M `json:"name" bson:"name"` Description primitive.M `json:"description,omitempty" bson:"description,omitempty"` Location *Location `json:"location,omitempty" bson:"location,omitempty"` Reviewable *bool `json:"reviewable" bson:"reviewable"` Popular *bool `json:"popular" bson:"popular"` Order *int `json:"order,omitempty" bson:"order,omitempty"` Status string `json:"status" bson:"status"` }
func (*Place) Collection ¶
func (*Place) Index ¶
func (i *Place) Index() []mongo.IndexModel
func (*Place) MarshalBSON ¶
type PlaceStatus ¶
type PlaceStatus string
const ( PlaceStatusActive PlaceStatus = "ACTIVE" PlaceStatusInactive PlaceStatus = "INACTIVE" )
func (PlaceStatus) IsValid ¶
func (e PlaceStatus) IsValid() bool
func (PlaceStatus) MarshalGQL ¶
func (e PlaceStatus) MarshalGQL(w io.Writer)
func (PlaceStatus) String ¶
func (e PlaceStatus) String() string
func (*PlaceStatus) UnmarshalGQL ¶
func (e *PlaceStatus) UnmarshalGQL(v interface{}) error
type PlaceType ¶
type PlaceType string
func (PlaceType) MarshalGQL ¶
func (*PlaceType) UnmarshalGQL ¶
type Relationship ¶
type Relationship struct { Model `bson:",inline"` Object Object `json:"object" bson:"object"` Target Object `json:"target" bson:"target"` Order *int `json:"order,omitempty" bson:"order,omitempty"` }
func (*Relationship) Collection ¶
func (i *Relationship) Collection() string
func (*Relationship) Index ¶
func (i *Relationship) Index() []mongo.IndexModel
func (*Relationship) MarshalBSON ¶
func (i *Relationship) MarshalBSON() ([]byte, error)
type Term ¶
type Term struct { Model `bson:",inline"` Parent primitive.ObjectID `json:"parent,omitempty" bson:"parent,omitempty"` Locale string `json:"locale" bson:"locale"` Name primitive.M `json:"name" bson:"name"` Description primitive.M `json:"description,omitempty" bson:"description,omitempty"` Type string `json:"type" bson:"type"` Slug *string `json:"slug" bson:"slug"` Order int `json:"order" bson:"order"` Count int `json:"count" bson:"count"` }
func (*Term) Collection ¶
func (*Term) Index ¶
func (i *Term) Index() []mongo.IndexModel
func (*Term) MarshalBSON ¶
type Timezone ¶
type Timezone struct { Model `bson:",inline"` Locale string `json:"locale" bson:"locale"` Name primitive.M `json:"name" bson:"name"` Offset int `json:"offset" bson:"offset"` Description string `json:"description,omitempty" bson:"description,omitempty"` }
func (*Timezone) Collection ¶
func (*Timezone) Index ¶
func (i *Timezone) Index() []mongo.IndexModel
func (*Timezone) MarshalBSON ¶
type UpdateCurrency ¶
type UpdateCurrency struct { Locale *string `json:"locale,omitempty"` Name *string `json:"name,omitempty"` Code *string `json:"code,omitempty"` Rate *float64 `json:"rate,omitempty"` Symbol *string `json:"symbol,omitempty"` Precision *int `json:"precision,omitempty"` Decimal *string `json:"decimal,omitempty"` Thousand *string `json:"thousand,omitempty"` Order *int `json:"order,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` Status *string `json:"status,omitempty"` }
type UpdateGlobal ¶
type UpdateLocale ¶
type UpdateLocale struct { Name *string `json:"name,omitempty"` Locale string `json:"locale"` Code *string `json:"code,omitempty"` Order *int `json:"order,omitempty"` Rtl *bool `json:"rtl,omitempty"` DateFormat *string `json:"date_format,omitempty"` TimeFormat *string `json:"time_format,omitempty"` WeekStart *int `json:"week_start,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
type UpdateLocation ¶
type UpdateLocation struct { Parent *string `json:"parent,omitempty"` Locale *string `json:"locale,omitempty"` Type *string `json:"type,omitempty"` Slug *string `json:"slug,omitempty"` Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` Location *LocationInput `json:"location,omitempty"` Images []map[string]interface{} `json:"images,omitempty"` Reviewable *bool `json:"reviewable,omitempty"` Popular *bool `json:"popular,omitempty"` Status *string `json:"status,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
type UpdateTerm ¶
type UpdateTerm struct { ID *string `json:"id,omitempty"` Locale string `json:"locale"` Name *string `json:"name,omitempty"` Slug *string `json:"slug,omitempty"` Description *string `json:"description,omitempty"` Parent *string `json:"parent,omitempty"` Type *string `json:"type,omitempty"` Order *int `json:"order,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
type UpdateTimezone ¶
type UpdateWebhook ¶
type UpdateWebhook struct { Name *string `json:"name,omitempty"` URL *string `json:"url,omitempty"` Headers []*WebhookHeaderInput `json:"headers,omitempty"` Events []*WebhookEventInput `json:"events,omitempty"` }
type Webhook ¶
type Webhook struct { Model `bson:",inline"` Name string `json:"name,omitempty" bson:"name,omitempty"` Description string `json:"description,omitempty" bson:"description,omitempty"` URL string `json:"url,omitempty" bson:"url,omitempty"` Secret string `json:"secret,omitempty" bson:"secret,omitempty"` }
func (*Webhook) Collection ¶
func (*Webhook) Index ¶
func (i *Webhook) Index() []mongo.IndexModel
func (*Webhook) MarshalBSON ¶
type WebhookEvent ¶
type WebhookEvent struct { ObjectID string `json:"objectId"` ObjectType string `json:"objectType"` Actions []*WebhookEventAction `json:"actions,omitempty"` }
type WebhookEventAction ¶
type WebhookEventAction string
const ( WebhookEventActionCreate WebhookEventAction = "CREATE" WebhookEventActionUpdate WebhookEventAction = "UPDATE" WebhookEventActionDelete WebhookEventAction = "DELETE" WebhookEventActionPublish WebhookEventAction = "PUBLISH" WebhookEventActionUnpublish WebhookEventAction = "UNPUBLISH" )
func (WebhookEventAction) IsValid ¶
func (e WebhookEventAction) IsValid() bool
func (WebhookEventAction) MarshalGQL ¶
func (e WebhookEventAction) MarshalGQL(w io.Writer)
func (WebhookEventAction) String ¶
func (e WebhookEventAction) String() string
func (*WebhookEventAction) UnmarshalGQL ¶
func (e *WebhookEventAction) UnmarshalGQL(v interface{}) error
type WebhookEventInput ¶
type WebhookEventInput struct { ObjectID string `json:"objectId"` ObjectType string `json:"objectType"` Actions []*WebhookEventAction `json:"actions,omitempty"` }
type WebhookHeader ¶
type WebhookHeaderInput ¶
Click to show internal directories.
Click to hide internal directories.