Documentation ¶
Index ¶
- Constants
- Variables
- type Address
- type Balance
- type Balances
- type Benefit
- type Benefits
- type Companies
- type Company
- func (i *Company) Collection() string
- func (i *Company) Delete(collection typesense.CollectionInterface, documentKey primitive.M) error
- func (i *Company) Document() map[string]interface{}
- func (i *Company) Index() []mongo.IndexModel
- func (i *Company) Insert(collection typesense.CollectionInterface) error
- func (Company) IsEntity()
- func (i *Company) MarshalBSON() ([]byte, error)
- func (i *Company) Sanitize(s string) string
- func (i *Company) Schema() interface{}
- func (i *Company) Update(collection typesense.CollectionInterface, documentKey primitive.M, ...) error
- type Contact
- func (i *Contact) Collection() string
- func (i *Contact) Delete(collection typesense.CollectionInterface, documentKey primitive.M) error
- func (i *Contact) Document() map[string]interface{}
- func (i *Contact) Index() []mongo.IndexModel
- func (i *Contact) Insert(collection typesense.CollectionInterface) error
- func (Contact) IsEntity()
- func (i *Contact) MarshalBSON() ([]byte, error)
- func (i *Contact) Schema() interface{}
- func (i *Contact) Update(collection typesense.CollectionInterface, documentKey primitive.M, ...) error
- type ContactStage
- type ContactStatus
- type Contacts
- type Coupon
- type Coupons
- type DiscountType
- type EmailType
- type Gender
- type Item
- type Items
- type Membership
- type Memberships
- type Model
- type NewBalance
- type NewBenefit
- type NewCompany
- type NewContact
- type NewCoupon
- type NewItem
- type NewMembership
- type NewOrder
- type NewPackage
- type NewProduct
- type NewPromotion
- type NewQuote
- type NewReward
- type NewTier
- type NewVoucher
- type NewWishlist
- type Order
- type Orders
- type Package
- type Packages
- type PhoneType
- type Product
- func (i *Product) Collection() string
- func (i *Product) Delete(collection typesense.CollectionInterface, documentKey primitive.M) error
- func (i *Product) Document() map[string]interface{}
- func (i *Product) Index() []mongo.IndexModel
- func (i *Product) Insert(collection typesense.CollectionInterface) error
- func (Product) IsEntity()
- func (i *Product) MarshalBSON() ([]byte, error)
- func (i *Product) Schema() interface{}
- func (i *Product) Update(collection typesense.CollectionInterface, documentKey primitive.M, ...) error
- type ProductStatus
- type Products
- type Promotion
- type PromotionType
- type Promotions
- type Quote
- type Quotes
- type Reward
- type Rewards
- type Tier
- type Tiers
- type UpdateBalance
- type UpdateBenefit
- type UpdateCompany
- type UpdateContact
- type UpdateCoupon
- type UpdateItem
- type UpdateMembership
- type UpdateOrder
- type UpdatePackage
- type UpdateProduct
- type UpdatePromotion
- type UpdateQuote
- type UpdateReward
- type UpdateTier
- type UpdateVoucher
- type UpdateWishlist
- type User
- type Voucher
- type Vouchers
- type Wishlist
- type WishlistStatus
- type Wishlists
Constants ¶
View Source
const ( ClientCollection = "clients" InvitationCollection = "invitations" PermissionCollection = "permissions" RoleCollection = "roles" KeyCollection = "keys" UserCollection = "users" )
Variables ¶
View Source
var AllContactStage = []ContactStage{ ContactStageNew, ContactStageNurturing, ContactStageQualified, ContactStageClosedLost, ContactStageClosedWon, }
View Source
var AllContactStatus = []ContactStatus{ ContactStatusActive, ContactStatusInactive, ContactStatusArchived, }
View Source
var AllDiscountType = []DiscountType{ DiscountTypePercentage, DiscountTypeFlatRate, }
View Source
var AllEmailType = []EmailType{ EmailTypePersonal, EmailTypeWork, EmailTypeOther, }
View Source
var AllGender = []Gender{ GenderMale, GenderFemale, GenderOther, }
View Source
var AllPhoneType = []PhoneType{ PhoneTypeHome, PhoneTypeMobile, PhoneTypeWork, PhoneTypeOther, }
View Source
var AllProductStatus = []ProductStatus{ ProductStatusActive, ProductStatusInactive, ProductStatusPending, ProductStatusArchived, }
View Source
var AllPromotionType = []PromotionType{ PromotionTypePurchase, PromotionTypeReferral, PromotionTypeSignup, PromotionTypeReview, PromotionTypeBirthday, PromotionTypeSubscription, }
View Source
var AllWishlistStatus = []WishlistStatus{ WishlistStatusActive, WishlistStatusArchived, WishlistStatusDeleted, }
Functions ¶
This section is empty.
Types ¶
type Balance ¶
type Balance struct { Model `bson:",inline"` UID primitive.ObjectID `json:"uid" bson:"uid"` Type string `json:"type" bson:"type"` Credits int `json:"credits" bson:"credits"` Notes *string `json:"notes,omitempty" bson:"notes,omitempty"` Status string `json:"status" bson:"status"` }
func (*Balance) Collection ¶
func (*Balance) Index ¶
func (i *Balance) Index() []mongo.IndexModel
func (*Balance) MarshalBSON ¶
type Benefit ¶
type Benefit struct { Model `bson:",inline"` Locale string `json:"locale" bson:"locale"` Name primitive.M `json:"name" bson:"name"` Description primitive.M `json:"description" bson:"description"` Status string `json:"status" bson:"status"` }
func (*Benefit) Collection ¶
func (*Benefit) Index ¶
func (i *Benefit) Index() []mongo.IndexModel
func (*Benefit) MarshalBSON ¶
type Company ¶
type Company struct { Model `bson:",inline"` UID primitive.ObjectID `json:"uid" bson:"uid"` Type string `json:"type" bson:"type"` Name string `json:"name" bson:"name"` Description *string `json:"description,omitempty" bson:"description,omitempty"` Industry *string `json:"industry,omitempty" bson:"industry,omitempty"` Employees *int `json:"employees,omitempty" bson:"employees,omitempty"` Revenue *float64 `json:"revenue,omitempty" bson:"revenue,omitempty"` Address *Address `json:"address,omitempty" bson:"address,omitempty"` Email *string `json:"email,omitempty" bson:"email,omitempty"` Phone *string `json:"phone,omitempty" bson:"phone,omitempty"` Website *string `json:"website,omitempty" bson:"website,omitempty"` Status string `json:"status" bson:"status"` }
func (*Company) Collection ¶
func (*Company) Index ¶
func (i *Company) Index() []mongo.IndexModel
func (*Company) MarshalBSON ¶
type Contact ¶
type Contact struct { Model `bson:",inline"` UID primitive.ObjectID `json:"uid" bson:"uid"` Company *primitive.ObjectID `json:"company,omitempty" bson:"company,omitempty"` FirstName *string `json:"first_name,omitempty" bson:"first_name,omitempty"` LastName *string `json:"last_name,omitempty" bson:"last_name,omitempty"` Birthday primitive.DateTime `json:"birthday,omitempty" bson:"birthday,omitempty"` Gender *string `json:"gender,omitempty" bson:"gender,omitempty"` JobTitle *string `json:"jobTitle,omitempty" bson:"job_title,omitempty"` Email *string `json:"email,omitempty" bson:"email,omitempty"` Phone *string `json:"phone,omitempty" bson:"phone,omitempty"` Picture *string `json:"picture,omitempty" bson:"picture,omitempty"` Address *Address `json:"address,omitempty" bson:"address,omitempty"` Website *string `json:"website,omitempty" bson:"website,omitempty"` Source string `json:"source,omitempty" bson:"source,omitempty"` Timezone *string `json:"timezone,omitempty" bson:"timezone,omitempty"` Language *string `json:"language,omitempty" bson:"language,omitempty"` Rating *int `json:"rating,omitempty" bson:"rating,omitempty"` Subscribed bool `json:"subscribed,omitempty" bson:"subscribed,omitempty"` Notes *string `json:"notes,omitempty" bson:"notes,omitempty"` Status string `json:"status" bson:"status"` LastActivity *primitive.Timestamp `json:"last_activity,omitempty" bson:"last_activity,omitempty"` Labels []*string `json:"labels,omitempty" bson:"labels,omitempty"` }
func (*Contact) Collection ¶
func (*Contact) Index ¶
func (i *Contact) Index() []mongo.IndexModel
func (*Contact) MarshalBSON ¶
type ContactStage ¶
type ContactStage string
const ( ContactStageNew ContactStage = "NEW" ContactStageNurturing ContactStage = "NURTURING" ContactStageQualified ContactStage = "QUALIFIED" ContactStageClosedLost ContactStage = "CLOSED_LOST" ContactStageClosedWon ContactStage = "CLOSED_WON" )
func (ContactStage) IsValid ¶
func (e ContactStage) IsValid() bool
func (ContactStage) MarshalGQL ¶
func (e ContactStage) MarshalGQL(w io.Writer)
func (ContactStage) String ¶
func (e ContactStage) String() string
func (*ContactStage) UnmarshalGQL ¶
func (e *ContactStage) UnmarshalGQL(v interface{}) error
type ContactStatus ¶
type ContactStatus string
const ( ContactStatusActive ContactStatus = "ACTIVE" ContactStatusInactive ContactStatus = "INACTIVE" ContactStatusArchived ContactStatus = "ARCHIVED" )
func (ContactStatus) IsValid ¶
func (e ContactStatus) IsValid() bool
func (ContactStatus) MarshalGQL ¶
func (e ContactStatus) MarshalGQL(w io.Writer)
func (ContactStatus) String ¶
func (e ContactStatus) String() string
func (*ContactStatus) UnmarshalGQL ¶
func (e *ContactStatus) UnmarshalGQL(v interface{}) error
type Coupon ¶
type Coupon struct { Model `bson:",inline"` UID *primitive.ObjectID `json:"uid" bson:"uid"` Code string `json:"code" bson:"code"` Locale string `json:"locale" bson:"locale"` Name primitive.M `json:"name" bson:"name"` Description primitive.M `json:"description" bson:"description"` Type string `json:"type" bson:"type"` Amount float64 `json:"amount" bson:"amount"` MaxUses *int `json:"max_uses,omitempty" bson:"max_uses,omitempty"` MaxDiscount *float64 `json:"max_discount,omitempty" bson:"max_discount,omitempty"` MinPurchase *float64 `json:"min_purchase,omitempty" bson:"min_purchase,omitempty"` Currency string `json:"currency" bson:"currency"` Uses *int `json:"uses,omitempty" bson:"uses,omitempty"` Starts *primitive.Timestamp `json:"starts,omitempty" bson:"starts,omitempty"` Expires *primitive.Timestamp `json:"expires,omitempty" bson:"expires,omitempty"` Status string `json:"status" bson:"status"` Products []*primitive.ObjectID `json:"products,omitempty" bson:"products,omitempty"` }
func (*Coupon) Collection ¶
func (*Coupon) Index ¶
func (i *Coupon) Index() []mongo.IndexModel
func (*Coupon) MarshalBSON ¶
type DiscountType ¶
type DiscountType string
const ( DiscountTypePercentage DiscountType = "PERCENTAGE" DiscountTypeFlatRate DiscountType = "FLAT_RATE" )
func (DiscountType) IsValid ¶
func (e DiscountType) IsValid() bool
func (DiscountType) MarshalGQL ¶
func (e DiscountType) MarshalGQL(w io.Writer)
func (DiscountType) String ¶
func (e DiscountType) String() string
func (*DiscountType) UnmarshalGQL ¶
func (e *DiscountType) UnmarshalGQL(v interface{}) error
type EmailType ¶
type EmailType string
func (EmailType) MarshalGQL ¶
func (*EmailType) UnmarshalGQL ¶
type Item ¶
type Item struct { Model `bson:",inline"` UID primitive.ObjectID `bson:"uid" json:"uid"` Package primitive.ObjectID `bson:"package" json:"package"` Locale string `json:"locale" bson:"locale"` Code string `json:"code" bson:"code"` Type string `json:"type" bson:"type"` Name primitive.M `json:"name" bson:"name"` Description primitive.M `json:"description,omitempty" bson:"description,omitempty"` Start primitive.DateTime `json:"start,omitempty" bson:"start,omitempty"` End primitive.DateTime `json:"end,omitempty" bson:"end,omitempty"` Price float64 `json:"price" bson:"price"` Discount *float64 `json:"discount,omitempty" bson:"discount,omitempty"` Currency string `json:"currency" bson:"currency"` }
func (*Item) Collection ¶
func (*Item) Index ¶
func (i *Item) Index() []mongo.IndexModel
func (*Item) MarshalBSON ¶
type Membership ¶
type Membership struct { Model `bson:",inline"` UID primitive.ObjectID `json:"user" bson:"user"` Tier primitive.ObjectID `json:"tier" bson:"tier"` Number string `json:"number" bson:"number"` Since string `json:"since" bson:"since"` Until string `json:"until" bson:"until"` Billing primitive.M `json:"billing,omitempty" bson:"billing,omitempty"` Payment primitive.M `json:"payment,omitempty" bson:"payment,omitempty"` Status string `json:"status" bson:"status"` }
func (*Membership) Collection ¶
func (i *Membership) Collection() string
func (*Membership) Index ¶
func (i *Membership) Index() []mongo.IndexModel
func (Membership) IsEntity ¶
func (Membership) IsEntity()
func (*Membership) MarshalBSON ¶
func (i *Membership) MarshalBSON() ([]byte, error)
type Memberships ¶
type Memberships struct { Data []*Membership `json:"data,omitempty"` Count int `json:"count"` }
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 NewBalance ¶
type NewBenefit ¶
type NewCompany ¶
type NewCompany struct { UID *string `json:"uid,omitempty"` Name string `json:"name"` Description *string `json:"description,omitempty"` Type string `json:"type"` Industry *string `json:"industry,omitempty"` Employees *int `json:"employees,omitempty"` Revenue *float64 `json:"revenue,omitempty"` Currency *string `json:"currency,omitempty"` Address map[string]interface{} `json:"address,omitempty"` Email *string `json:"email,omitempty"` Phone *string `json:"phone,omitempty"` Website *string `json:"website,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` Status string `json:"status"` }
type NewContact ¶
type NewContact struct { FirstName *string `json:"first_name,omitempty"` LastName *string `json:"last_name,omitempty"` Email *string `json:"email,omitempty"` Phone *string `json:"phone,omitempty"` Picture *string `json:"picture,omitempty"` Address map[string]interface{} `json:"address,omitempty"` Birthday *string `json:"birthday,omitempty"` Company *string `json:"company,omitempty"` JobTitle *string `json:"job_title,omitempty"` Timezone *string `json:"timezone,omitempty"` Language *string `json:"language,omitempty"` Source *string `json:"source,omitempty"` Subscribed *bool `json:"subscribed,omitempty"` Rating *int `json:"rating,omitempty"` Notes *string `json:"notes,omitempty"` Status *string `json:"status,omitempty"` Labels []*string `json:"labels,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` LastActivity *string `json:"last_activity,omitempty"` Created string `json:"created"` Updated string `json:"updated"` UID *string `json:"uid,omitempty"` }
type NewCoupon ¶
type NewCoupon struct { Locale string `json:"locale"` Code string `json:"code"` Name string `json:"name"` Description *string `json:"description,omitempty"` Type string `json:"type"` Amount float64 `json:"amount"` MaxDiscount *float64 `json:"max_discount,omitempty"` MinPurchase *float64 `json:"min_purchase,omitempty"` Currency string `json:"currency"` MaxUses *int `json:"max_uses,omitempty"` Uses *int `json:"uses,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` Starts *string `json:"starts,omitempty"` Expires *string `json:"expires,omitempty"` UID *string `json:"uid,omitempty"` Products []*string `json:"products,omitempty"` Status *string `json:"status,omitempty"` }
type NewItem ¶
type NewItem struct { Package string `json:"package"` Locale string `json:"locale"` Type string `json:"type"` Code string `json:"code"` Name string `json:"name"` Description *string `json:"description,omitempty"` Quantity int `json:"quantity"` Price float64 `json:"price"` Discount *float64 `json:"discount,omitempty"` Currency string `json:"currency"` Metadata map[string]interface{} `json:"metadata,omitempty"` Status *string `json:"status,omitempty"` }
type NewMembership ¶
type NewMembership struct { Tier string `json:"tier"` Number string `json:"number"` Since string `json:"since"` Until string `json:"until"` Billing map[string]interface{} `json:"billing,omitempty"` Payment map[string]interface{} `json:"payment,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` Status string `json:"status"` }
type NewOrder ¶
type NewOrder struct { Code string `json:"code"` Cancellable bool `json:"cancellable"` Payment string `json:"payment"` Coupon *string `json:"coupon,omitempty"` UID *string `json:"uid,omitempty"` Contact *string `json:"contact,omitempty"` Items []string `json:"items"` Metadata map[string]interface{} `json:"metadata,omitempty"` Status *string `json:"status,omitempty"` }
type NewPackage ¶
type NewPackage struct { Locale string `json:"locale"` Name string `json:"name"` Description string `json:"description"` Includes string `json:"includes"` Excludes string `json:"excludes"` Redeem string `json:"redeem"` Cancellation string `json:"cancellation"` Instant bool `json:"instant"` Metadata map[string]interface{} `json:"metadata,omitempty"` Status string `json:"status"` Product string `json:"product"` }
type NewProduct ¶
type NewProduct struct { UID *string `json:"uid,omitempty"` Locale string `json:"locale"` Type string `json:"type"` Slug string `json:"slug"` Name string `json:"name"` Description string `json:"description"` Duration string `json:"duration"` Reviewable bool `json:"reviewable"` Metadata map[string]interface{} `json:"metadata,omitempty"` Status string `json:"status"` Terms []*string `json:"terms,omitempty"` Place *string `json:"place,omitempty"` Places []*string `json:"places,omitempty"` }
type NewPromotion ¶
type NewQuote ¶
type NewQuote struct { UID string `json:"uid"` Contact *string `json:"contact,omitempty"` Locale string `json:"locale"` Code string `json:"code"` Purchase string `json:"purchase"` Name string `json:"name"` Description *string `json:"description,omitempty"` Terms *string `json:"terms,omitempty"` Notes *string `json:"notes,omitempty"` Template string `json:"template"` ValidUntil int `json:"validUntil"` Amount float64 `json:"amount"` Currency string `json:"currency"` Billing map[string]interface{} `json:"billing"` Metadata map[string]interface{} `json:"metadata,omitempty"` Status *string `json:"status,omitempty"` }
type NewReward ¶
type NewReward struct { Locale string `json:"locale"` Tier string `json:"tier"` Name string `json:"name"` Description string `json:"description"` Cost int `json:"cost"` Expires *string `json:"expires,omitempty"` Status string `json:"status"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
type NewVoucher ¶
type NewVoucher struct { Locale string `json:"locale"` Code string `json:"code"` Type string `json:"type"` Name string `json:"name"` Description string `json:"description"` Start string `json:"start"` End string `json:"end"` Price float64 `json:"price"` Discount *float64 `json:"discount,omitempty"` Currency string `json:"currency"` Metadata map[string]interface{} `json:"metadata,omitempty"` Status string `json:"status"` Package string `json:"package"` Supplier string `json:"supplier"` }
type NewWishlist ¶
type Order ¶
type Order struct { Model `bson:",inline"` UID primitive.ObjectID `bson:"uid" json:"uid"` Contact primitive.ObjectID `json:"contact" bson:"contact"` Locale string `json:"locale" bson:"locale"` Type string `json:"type" bson:"type"` Code string `json:"code" bson:"code"` Coupon *string `json:"coupon,omitempty" bson:"coupon,omitempty"` Cancellable bool `json:"cancellable" bson:"cancellable"` Payment string `json:"payment" bson:"payment"` Items []primitive.ObjectID `json:"items" bson:"items"` Status string `json:"status" bson:"status"` }
func (*Order) Collection ¶
func (*Order) Index ¶
func (i *Order) Index() []mongo.IndexModel
func (*Order) MarshalBSON ¶
type Package ¶
type Package struct { Model `bson:",inline"` Product primitive.ObjectID `json:"product" bson:"product"` Locale string `json:"locale" bson:"locale"` Name primitive.M `json:"name" bson:"name"` Description primitive.M `json:"description" bson:"description"` Includes primitive.M `json:"includes" bson:"includes"` Excludes primitive.M `json:"excludes" bson:"excludes"` Redeem primitive.M `json:"redeem" bson:"redeem"` Cancellation primitive.M `json:"cancellation" bson:"cancellation"` Instant bool `json:"instant" bson:"instant"` Price float64 `json:"price" bson:"price"` Discount float64 `json:"discount,omitempty" bson:"discount,omitempty"` Currency string `json:"currency" bson:"currency"` Status string `json:"status" bson:"status"` }
func (*Package) Collection ¶
func (*Package) Index ¶
func (i *Package) Index() []mongo.IndexModel
func (*Package) MarshalBSON ¶
type PhoneType ¶
type PhoneType string
func (PhoneType) MarshalGQL ¶
func (*PhoneType) UnmarshalGQL ¶
type Product ¶
type Product struct { Model `bson:",inline"` UID primitive.ObjectID `json:"uid" bson:"uid"` Place primitive.ObjectID `json:"place" bson:"place"` Locale string `json:"locale" bson:"locale"` Slug string `json:"slug" bson:"slug"` Type string `json:"type" bson:"type"` Name primitive.M `json:"name" bson:"name"` Description primitive.M `json:"description" bson:"description"` Duration string `json:"duration" bson:"duration"` Reviewable bool `json:"reviewable" bson:"reviewable"` Status string `json:"status" bson:"status"` Terms []*primitive.ObjectID `json:"terms,omitempty" bson:"terms,omitempty"` Places []*primitive.ObjectID `json:"places,omitempty" bson:"places,omitempty"` Recommendations []*string `json:"recommendations,omitempty" bson:"recommendations,omitempty"` }
func (*Product) Collection ¶
func (*Product) Index ¶
func (i *Product) Index() []mongo.IndexModel
func (*Product) MarshalBSON ¶
type ProductStatus ¶
type ProductStatus string
const ( ProductStatusActive ProductStatus = "ACTIVE" ProductStatusInactive ProductStatus = "INACTIVE" ProductStatusPending ProductStatus = "PENDING" ProductStatusArchived ProductStatus = "ARCHIVED" )
func (ProductStatus) IsValid ¶
func (e ProductStatus) IsValid() bool
func (ProductStatus) MarshalGQL ¶
func (e ProductStatus) MarshalGQL(w io.Writer)
func (ProductStatus) String ¶
func (e ProductStatus) String() string
func (*ProductStatus) UnmarshalGQL ¶
func (e *ProductStatus) UnmarshalGQL(v interface{}) error
type Promotion ¶
type Promotion struct { Model `bson:",inline"` Type string `bson:"type,optional" json:"type,omitempty"` Locale string `bson:"locale,omitempty" json:"locale,omitempty"` Name primitive.M `json:"name,omitempty" bson:"name,omitempty"` Description primitive.M `bson:"description,omitempty" json:"description,omitempty"` Credits int `json:"credits,omitempty" bson:"credits,omitempty"` Status string `json:"status,omitempty" bson:"status,omitempty"` }
func (*Promotion) Collection ¶
func (*Promotion) Index ¶
func (i *Promotion) Index() []mongo.IndexModel
func (*Promotion) MarshalBSON ¶
type PromotionType ¶
type PromotionType string
const ( PromotionTypePurchase PromotionType = "PURCHASE" PromotionTypeReferral PromotionType = "REFERRAL" PromotionTypeSignup PromotionType = "SIGNUP" PromotionTypeReview PromotionType = "REVIEW" PromotionTypeBirthday PromotionType = "BIRTHDAY" PromotionTypeSubscription PromotionType = "SUBSCRIPTION" )
func (PromotionType) IsValid ¶
func (e PromotionType) IsValid() bool
func (PromotionType) MarshalGQL ¶
func (e PromotionType) MarshalGQL(w io.Writer)
func (PromotionType) String ¶
func (e PromotionType) String() string
func (*PromotionType) UnmarshalGQL ¶
func (e *PromotionType) UnmarshalGQL(v interface{}) error
type Promotions ¶
type Quote ¶
type Quote struct { Model UID primitive.ObjectID `json:"uid" bson:"uid"` Contact primitive.ObjectID `json:"contacts" bson:"contacts"` Code string `json:"code" bson:"code"` Purchase *string `json:"purchase,omitempty" bson:"purchase,omitempty"` Locale string `json:"locale" bson:"locale"` Name string `json:"name" bson:"name"` Description *string `json:"description,omitempty" bson:"description,omitempty"` Template string `json:"template" bson:"template"` ValidUntil primitive.Timestamp `json:"validUntil" bson:"valid_until"` Terms string `json:"terms" bson:"terms"` Payment string `json:"payment" bson:"payment"` Notes string `json:"notes,omitempty" bson:"notes,omitempty"` Billing primitive.M `json:"billing,omitempty" bson:"billing,omitempty"` Status string `json:"status" bson:"status"` }
func (*Quote) Collection ¶
func (*Quote) Index ¶
func (i *Quote) Index() []mongo.IndexModel
func (*Quote) MarshalBSON ¶
type Reward ¶
type Reward struct { Model `bson:",inline"` Tier primitive.ObjectID `bson:"tier" json:"tier"` Locale string `bson:"locale" json:"locale"` Name primitive.M `json:"name" bson:"name"` Description primitive.M `json:"description,omitempty" bson:"description,omitempty"` Cost int64 `json:"cost" bson:"cost"` Expires *primitive.Timestamp `json:"expires,omitempty" bson:"expires,omitempty"` Status string `json:"status" bson:"status"` }
func (*Reward) Collection ¶
func (*Reward) Index ¶
func (i *Reward) Index() []mongo.IndexModel
func (*Reward) MarshalBSON ¶
type Tier ¶
type Tier struct { Model `bson:",inline"` Locale string `bson:"locale,omitempty" json:"locale,omitempty"` Name primitive.M `json:"name,omitempty" bson:"name,omitempty"` Description primitive.M `json:"description,omitempty" bson:"description,omitempty"` Benefits []primitive.ObjectID `json:"benefits,omitempty" bson:"benefits,omitempty"` Cost int64 `json:"cost,omitempty" bson:"cost,omitempty"` Status string `json:"status,omitempty" bson:"status,omitempty"` }
func (*Tier) Collection ¶
func (*Tier) Index ¶
func (i *Tier) Index() []mongo.IndexModel
func (*Tier) MarshalBSON ¶
type UpdateBalance ¶
type UpdateBenefit ¶
type UpdateCompany ¶
type UpdateCompany struct { UID *string `json:"uid,omitempty"` Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` Type *string `json:"type,omitempty"` Industry *string `json:"industry,omitempty"` Employees *int `json:"employees,omitempty"` Revenue *float64 `json:"revenue,omitempty"` Address map[string]interface{} `json:"address,omitempty"` Email *string `json:"email,omitempty"` Phone *string `json:"phone,omitempty"` Website *string `json:"website,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` Status *string `json:"status,omitempty"` }
type UpdateContact ¶
type UpdateContact struct { FirstName *string `json:"first_name,omitempty"` LastName *string `json:"last_name,omitempty"` Email *string `json:"email,omitempty"` Phone *string `json:"phone,omitempty"` Picture *string `json:"picture,omitempty"` Address map[string]interface{} `json:"address,omitempty"` Birthday *string `json:"birthday,omitempty"` Company *string `json:"company,omitempty"` JobTitle *string `json:"job_title,omitempty"` Timezone *string `json:"timezone,omitempty"` Language *string `json:"language,omitempty"` Source *string `json:"source,omitempty"` Subscribed *bool `json:"subscribed,omitempty"` Rating *int `json:"rating,omitempty"` Notes *string `json:"notes,omitempty"` Status *string `json:"status,omitempty"` Labels []*string `json:"labels,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` LastActivity *string `json:"last_activity,omitempty"` Created string `json:"created"` Updated string `json:"updated"` UID string `json:"uid"` }
type UpdateCoupon ¶
type UpdateCoupon struct { Locale *string `json:"locale,omitempty"` Code *string `json:"code,omitempty"` Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` Type *string `json:"type,omitempty"` Amount *float64 `json:"amount,omitempty"` MaxDiscount *float64 `json:"max_discount,omitempty"` MinPurchase *float64 `json:"min_purchase,omitempty"` Currency *string `json:"currency,omitempty"` MaxUses *int `json:"max_uses,omitempty"` Uses *int `json:"uses,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` Starts *string `json:"starts,omitempty"` Expires *string `json:"expires,omitempty"` UID *string `json:"uid,omitempty"` Products []*string `json:"products,omitempty"` Status *string `json:"status,omitempty"` }
type UpdateItem ¶
type UpdateItem struct { Package *string `json:"package,omitempty"` Locale *string `json:"locale,omitempty"` Type *string `json:"type,omitempty"` Code *string `json:"code,omitempty"` Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` Quantity *int `json:"quantity,omitempty"` Price *float64 `json:"price,omitempty"` Discount *float64 `json:"discount,omitempty"` Currency *string `json:"currency,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` Status *string `json:"status,omitempty"` }
type UpdateMembership ¶
type UpdateMembership struct { Tier *string `json:"tier,omitempty"` Number *string `json:"number,omitempty"` Since *string `json:"since,omitempty"` Until *string `json:"until,omitempty"` Billing map[string]interface{} `json:"billing,omitempty"` Payment map[string]interface{} `json:"payment,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` Status *string `json:"status,omitempty"` }
type UpdateOrder ¶
type UpdateOrder struct { Code *string `json:"code,omitempty"` Cancellable *bool `json:"cancellable,omitempty"` Payment *string `json:"payment,omitempty"` Coupon *string `json:"coupon,omitempty"` UID *string `json:"uid,omitempty"` Contact *string `json:"contact,omitempty"` Items []string `json:"items,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` Status *string `json:"status,omitempty"` }
type UpdatePackage ¶
type UpdatePackage struct { Locale *string `json:"locale,omitempty"` Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` Includes *string `json:"includes,omitempty"` Excludes *string `json:"excludes,omitempty"` Redeem *string `json:"redeem,omitempty"` Cancellation *string `json:"cancellation,omitempty"` Instant *bool `json:"instant,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` Status *string `json:"status,omitempty"` Product *string `json:"product,omitempty"` }
type UpdateProduct ¶
type UpdateProduct struct { 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"` Duration *string `json:"duration,omitempty"` Reviewable *bool `json:"reviewable,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` Status *string `json:"status,omitempty"` Terms []*string `json:"terms,omitempty"` Place *string `json:"place,omitempty"` Places []*string `json:"places,omitempty"` }
type UpdatePromotion ¶
type UpdateQuote ¶
type UpdateQuote struct { UID *string `json:"uid,omitempty"` Contact *string `json:"contact,omitempty"` Locale *string `json:"locale,omitempty"` Code *string `json:"code,omitempty"` Purchase *string `json:"purchase,omitempty"` Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` Terms *string `json:"terms,omitempty"` Notes *string `json:"notes,omitempty"` Template *string `json:"template,omitempty"` ValidUntil *int `json:"validUntil,omitempty"` Amount *float64 `json:"amount,omitempty"` Currency *string `json:"currency,omitempty"` Billing map[string]interface{} `json:"billing,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` Status *string `json:"status,omitempty"` }
type UpdateReward ¶
type UpdateReward struct { Locale string `json:"locale"` Tier *string `json:"tier,omitempty"` Cost *string `json:"cost,omitempty"` Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` Credits *int `json:"credits,omitempty"` Expires *string `json:"expires,omitempty"` Status *string `json:"status,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
type UpdateTier ¶
type UpdateTier struct { Locale string `json:"locale"` Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` Cost *int `json:"cost,omitempty"` Rewards []string `json:"rewards,omitempty"` Status *string `json:"status,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
type UpdateVoucher ¶
type UpdateVoucher struct { Locale *string `json:"locale,omitempty"` Code *string `json:"code,omitempty"` Type *string `json:"type,omitempty"` Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` Start *string `json:"start,omitempty"` End string `json:"end"` Price *float64 `json:"price,omitempty"` Discount *float64 `json:"discount,omitempty"` Currency *string `json:"currency,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` Status *string `json:"status,omitempty"` Package *string `json:"package,omitempty"` Supplier *string `json:"supplier,omitempty"` }
type UpdateWishlist ¶
type Voucher ¶
type Voucher struct { Model `bson:",inline"` Locale string `json:"locale" bson:"locale"` Code string `json:"code" bson:"code"` Type string `json:"type" bson:"type"` Name primitive.M `json:"name" bson:"name"` Description primitive.M `json:"description,omitempty" bson:"description,omitempty"` Start primitive.DateTime `json:"start,omitempty" bson:"start,omitempty"` End primitive.DateTime `json:"end,omitempty" bson:"end,omitempty"` Price float64 `json:"price" bson:"price"` Discount float64 `json:"discount,omitempty" bson:"discount,omitempty"` Currency string `json:"currency" bson:"currency"` Status string `json:"status" bson:"status"` Package primitive.ObjectID `json:"package" bson:"package"` Supplier primitive.ObjectID `json:"supplier" bson:"supplier"` }
func (*Voucher) Collection ¶
func (*Voucher) Index ¶
func (i *Voucher) Index() []mongo.IndexModel
func (*Voucher) MarshalBSON ¶
type Wishlist ¶
type Wishlist struct { Model `bson:",inline"` UID primitive.ObjectID `json:"uid" bson:"uid"` Content primitive.ObjectID `json:"content" bson:"content"` Status string `json:"status" bson:"status"` }
func (*Wishlist) Collection ¶
func (*Wishlist) Index ¶
func (i *Wishlist) Index() []mongo.IndexModel
func (*Wishlist) MarshalBSON ¶
type WishlistStatus ¶
type WishlistStatus string
const ( WishlistStatusActive WishlistStatus = "ACTIVE" WishlistStatusArchived WishlistStatus = "ARCHIVED" WishlistStatusDeleted WishlistStatus = "DELETED" )
func (WishlistStatus) IsValid ¶
func (e WishlistStatus) IsValid() bool
func (WishlistStatus) MarshalGQL ¶
func (e WishlistStatus) MarshalGQL(w io.Writer)
func (WishlistStatus) String ¶
func (e WishlistStatus) String() string
func (*WishlistStatus) UnmarshalGQL ¶
func (e *WishlistStatus) UnmarshalGQL(v interface{}) error
Click to show internal directories.
Click to hide internal directories.