Documentation
¶
Index ¶
- func WithServerURL(ctx context.Context, u *url.URL) context.Context
- type ApplyPostOK
- type CallbackPaypalPostOK
- type CallbackStripePostOK
- type Client
- func (c *Client) ApplyPost(ctx context.Context, request *SystemState) error
- func (c *Client) CallbackPaypalPost(ctx context.Context) error
- func (c *Client) CallbackStripePost(ctx context.Context) error
- func (c *Client) GroupGet(ctx context.Context, params GroupGetParams) ([]Group, error)
- func (c *Client) GroupGroupSlugDelete(ctx context.Context, params GroupGroupSlugDeleteParams) (*Group, error)
- func (c *Client) GroupGroupSlugGet(ctx context.Context, params GroupGroupSlugGetParams) (*Group, error)
- func (c *Client) GroupGroupSlugProductsDelete(ctx context.Context, request []string, ...) (*Group, error)
- func (c *Client) GroupGroupSlugProductsPost(ctx context.Context, request []string, params GroupGroupSlugProductsPostParams) (*Group, error)
- func (c *Client) GroupGroupSlugPut(ctx context.Context, request *Group, params GroupGroupSlugPutParams) (*Group, error)
- func (c *Client) GroupPost(ctx context.Context, request *Group) (*Group, error)
- func (c *Client) ProductsGet(ctx context.Context, params ProductsGetParams) ([]PurchaseableProduct, error)
- func (c *Client) ProductsPProductSlugGet(ctx context.Context, params ProductsPProductSlugGetParams) (*PurchaseableProduct, error)
- func (c *Client) ProductsPut(ctx context.Context, request *PurchaseableProduct) (*PurchaseableProduct, error)
- func (c *Client) ProductsServiceServiceSlugCountGet(ctx context.Context, params ProductsServiceServiceSlugCountGetParams) (int32, error)
- func (c *Client) ProductsServiceServiceSlugIdsGet(ctx context.Context, params ProductsServiceServiceSlugIdsGetParams) ([]string, error)
- func (c *Client) ProductsServicesGet(ctx context.Context, params ProductsServicesGetParams) ([]PurchaseableProduct, error)
- func (c *Client) ProductsTopupGet(ctx context.Context, params ProductsTopupGetParams) ([]TopUpProduct, error)
- func (c *Client) ProductsTopupPut(ctx context.Context, request *TopUpProduct) (*TopUpProduct, error)
- func (c *Client) ProductsUserUserIdGet(ctx context.Context, params ProductsUserUserIdGetParams) ([]RuleResult, error)
- func (c *Client) RulesGet(ctx context.Context, params RulesGetParams) ([]Rule, error)
- func (c *Client) RulesPost(ctx context.Context, request *RuleCreate) (*Rule, error)
- func (c *Client) RulesRuleSlugDelete(ctx context.Context, params RulesRuleSlugDeleteParams) (*Rule, error)
- func (c *Client) RulesRuleSlugGet(ctx context.Context, params RulesRuleSlugGetParams) (*Rule, error)
- func (c *Client) TopUpCompensatePost(ctx context.Context, request *Compensation) (*Int32Int32ValueTuple, error)
- func (c *Client) TopUpCustomPost(ctx context.Context, request *CustomTopUp, params TopUpCustomPostParams) (*TopUpIdResponse, error)
- func (c *Client) TopUpOptionsGet(ctx context.Context) ([]TopUpProduct, error)
- func (c *Client) TopUpPaypalPost(ctx context.Context, request *TopUpOptions, params TopUpPaypalPostParams) (*TopUpIdResponse, error)
- func (c *Client) TopUpStripePost(ctx context.Context, request *TopUpOptions, params TopUpStripePostParams) (*TopUpIdResponse, error)
- func (c *Client) TransactionPlanedUUserIdGet(ctx context.Context, params TransactionPlanedUUserIdGetParams) ([]ExternalTransaction, error)
- func (c *Client) TransactionPlanedUUserIdPost(ctx context.Context, request *ExternalTransaction, ...) (*PlanedTransaction, error)
- func (c *Client) TransactionPlanedUUserIdTTransactionIdDelete(ctx context.Context, params TransactionPlanedUUserIdTTransactionIdDeleteParams) (*PlanedTransaction, error)
- func (c *Client) TransactionPlanedUUserIdTTransactionIdPut(ctx context.Context, request *ExternalTransaction, ...) (*PlanedTransaction, error)
- func (c *Client) TransactionSendPost(ctx context.Context, request *TransactionEvent) error
- func (c *Client) TransactionUUserIdGet(ctx context.Context, params TransactionUUserIdGetParams) ([]ExternalTransaction, error)
- func (c *Client) UserUserIdGet(ctx context.Context, params UserUserIdGetParams) (*User, error)
- func (c *Client) UserUserIdOwnsLongestPost(ctx context.Context, request []string, params UserUserIdOwnsLongestPostParams) (time.Time, error)
- func (c *Client) UserUserIdOwnsPost(ctx context.Context, request []string, params UserUserIdOwnsPostParams) ([]OwnerShip, error)deprecated
- func (c *Client) UserUserIdOwnsProductSlugUntilGet(ctx context.Context, params UserUserIdOwnsProductSlugUntilGetParams) (time.Time, error)
- func (c *Client) UserUserIdOwnsUntilPost(ctx context.Context, request []string, params UserUserIdOwnsUntilPostParams) (UserUserIdOwnsUntilPostOKApplicationJSON, error)
- func (c *Client) UserUserIdPost(ctx context.Context, params UserUserIdPostParams) (*User, error)
- func (c *Client) UserUserIdPurchaseProductSlugPost(ctx context.Context, params UserUserIdPurchaseProductSlugPostParams) (*User, error)
- func (c *Client) UserUserIdServicePurchaseProductSlugPost(ctx context.Context, params UserUserIdServicePurchaseProductSlugPostParams) (*User, error)
- func (c *Client) UserUserIdTransactionIdDelete(ctx context.Context, params UserUserIdTransactionIdDeleteParams) (*User, error)
- func (c *Client) UserUserIdTransferPost(ctx context.Context, request *TransferRequest, ...) (*TransactionEvent, error)
- type ClientOption
- type Compensation
- func (s *Compensation) Decode(d *jx.Decoder) error
- func (s *Compensation) Encode(e *jx.Encoder)
- func (s *Compensation) GetAmount() OptInt32
- func (s *Compensation) GetProductId() OptNilString
- func (s *Compensation) GetReference() OptNilString
- func (s *Compensation) GetWhen() OptDateTime
- func (s *Compensation) MarshalJSON() ([]byte, error)
- func (s *Compensation) SetAmount(val OptInt32)
- func (s *Compensation) SetProductId(val OptNilString)
- func (s *Compensation) SetReference(val OptNilString)
- func (s *Compensation) SetWhen(val OptDateTime)
- func (s *Compensation) UnmarshalJSON(data []byte) error
- type CustomTopUp
- func (s *CustomTopUp) Decode(d *jx.Decoder) error
- func (s *CustomTopUp) Encode(e *jx.Encoder)
- func (s *CustomTopUp) GetAmount() OptInt64
- func (s *CustomTopUp) GetProductId() OptNilString
- func (s *CustomTopUp) GetReference() OptNilString
- func (s *CustomTopUp) MarshalJSON() ([]byte, error)
- func (s *CustomTopUp) SetAmount(val OptInt64)
- func (s *CustomTopUp) SetProductId(val OptNilString)
- func (s *CustomTopUp) SetReference(val OptNilString)
- func (s *CustomTopUp) UnmarshalJSON(data []byte) error
- type ErrorHandler
- type ExternalTransaction
- func (s *ExternalTransaction) Decode(d *jx.Decoder) error
- func (s *ExternalTransaction) Encode(e *jx.Encoder)
- func (s *ExternalTransaction) GetAmount() OptFloat64
- func (s *ExternalTransaction) GetID() OptNilString
- func (s *ExternalTransaction) GetProductId() OptNilString
- func (s *ExternalTransaction) GetReference() OptNilString
- func (s *ExternalTransaction) GetTimeStamp() OptDateTime
- func (s *ExternalTransaction) MarshalJSON() ([]byte, error)
- func (s *ExternalTransaction) SetAmount(val OptFloat64)
- func (s *ExternalTransaction) SetID(val OptNilString)
- func (s *ExternalTransaction) SetProductId(val OptNilString)
- func (s *ExternalTransaction) SetReference(val OptNilString)
- func (s *ExternalTransaction) SetTimeStamp(val OptDateTime)
- func (s *ExternalTransaction) UnmarshalJSON(data []byte) error
- func (s *ExternalTransaction) Validate() error
- type Group
- func (s *Group) Decode(d *jx.Decoder) error
- func (s *Group) Encode(e *jx.Encoder)
- func (s *Group) GetID() OptInt32
- func (s *Group) GetProducts() OptNilProductArray
- func (s *Group) GetSlug() OptNilString
- func (s *Group) MarshalJSON() ([]byte, error)
- func (s *Group) SetID(val OptInt32)
- func (s *Group) SetProducts(val OptNilProductArray)
- func (s *Group) SetSlug(val OptNilString)
- func (s *Group) UnmarshalJSON(data []byte) error
- func (s *Group) Validate() error
- type GroupGetParams
- type GroupGroupSlugDeleteParams
- type GroupGroupSlugGetParams
- type GroupGroupSlugProductsDeleteParams
- type GroupGroupSlugProductsPostParams
- type GroupGroupSlugPutParams
- type Handler
- type Int32Int32ValueTuple
- func (s *Int32Int32ValueTuple) Decode(d *jx.Decoder) error
- func (s *Int32Int32ValueTuple) Encode(e *jx.Encoder)
- func (s *Int32Int32ValueTuple) GetItem1() OptInt32
- func (s *Int32Int32ValueTuple) GetItem2() OptInt32
- func (s *Int32Int32ValueTuple) MarshalJSON() ([]byte, error)
- func (s *Int32Int32ValueTuple) SetItem1(val OptInt32)
- func (s *Int32Int32ValueTuple) SetItem2(val OptInt32)
- func (s *Int32Int32ValueTuple) UnmarshalJSON(data []byte) error
- type Middleware
- type OptDateTime
- func (o *OptDateTime) Decode(d *jx.Decoder, format func(*jx.Decoder) (time.Time, error)) error
- func (o OptDateTime) Encode(e *jx.Encoder, format func(*jx.Encoder, time.Time))
- func (o OptDateTime) Get() (v time.Time, ok bool)
- func (o OptDateTime) IsSet() bool
- func (s OptDateTime) MarshalJSON() ([]byte, error)
- func (o OptDateTime) Or(d time.Time) time.Time
- func (o *OptDateTime) Reset()
- func (o *OptDateTime) SetTo(v time.Time)
- func (s *OptDateTime) UnmarshalJSON(data []byte) error
- type OptFloat64
- func (o *OptFloat64) Decode(d *jx.Decoder) error
- func (o OptFloat64) Encode(e *jx.Encoder)
- func (o OptFloat64) Get() (v float64, ok bool)
- func (o OptFloat64) IsSet() bool
- func (s OptFloat64) MarshalJSON() ([]byte, error)
- func (o OptFloat64) Or(d float64) float64
- func (o *OptFloat64) Reset()
- func (o *OptFloat64) SetTo(v float64)
- func (s *OptFloat64) UnmarshalJSON(data []byte) error
- type OptGroup
- func (o *OptGroup) Decode(d *jx.Decoder) error
- func (o OptGroup) Encode(e *jx.Encoder)
- func (o OptGroup) Get() (v Group, ok bool)
- func (o OptGroup) IsSet() bool
- func (s OptGroup) MarshalJSON() ([]byte, error)
- func (o OptGroup) Or(d Group) Group
- func (o *OptGroup) Reset()
- func (o *OptGroup) SetTo(v Group)
- func (s *OptGroup) UnmarshalJSON(data []byte) error
- type OptInt32
- func (o *OptInt32) Decode(d *jx.Decoder) error
- func (o OptInt32) Encode(e *jx.Encoder)
- func (o OptInt32) Get() (v int32, ok bool)
- func (o OptInt32) IsSet() bool
- func (s OptInt32) MarshalJSON() ([]byte, error)
- func (o OptInt32) Or(d int32) int32
- func (o *OptInt32) Reset()
- func (o *OptInt32) SetTo(v int32)
- func (s *OptInt32) UnmarshalJSON(data []byte) error
- type OptInt64
- func (o *OptInt64) Decode(d *jx.Decoder) error
- func (o OptInt64) Encode(e *jx.Encoder)
- func (o OptInt64) Get() (v int64, ok bool)
- func (o OptInt64) IsSet() bool
- func (s OptInt64) MarshalJSON() ([]byte, error)
- func (o OptInt64) Or(d int64) int64
- func (o *OptInt64) Reset()
- func (o *OptInt64) SetTo(v int64)
- func (s *OptInt64) UnmarshalJSON(data []byte) error
- type OptNilOwnerShipArray
- func (o *OptNilOwnerShipArray) Decode(d *jx.Decoder) error
- func (o OptNilOwnerShipArray) Encode(e *jx.Encoder)
- func (o OptNilOwnerShipArray) Get() (v []OwnerShip, ok bool)
- func (o OptNilOwnerShipArray) IsNull() bool
- func (o OptNilOwnerShipArray) IsSet() bool
- func (s OptNilOwnerShipArray) MarshalJSON() ([]byte, error)
- func (o OptNilOwnerShipArray) Or(d []OwnerShip) []OwnerShip
- func (o *OptNilOwnerShipArray) Reset()
- func (o *OptNilOwnerShipArray) SetTo(v []OwnerShip)
- func (s *OptNilOwnerShipArray) UnmarshalJSON(data []byte) error
- type OptNilProductArray
- func (o *OptNilProductArray) Decode(d *jx.Decoder) error
- func (o OptNilProductArray) Encode(e *jx.Encoder)
- func (o OptNilProductArray) Get() (v []Product, ok bool)
- func (o OptNilProductArray) IsNull() bool
- func (o OptNilProductArray) IsSet() bool
- func (s OptNilProductArray) MarshalJSON() ([]byte, error)
- func (o OptNilProductArray) Or(d []Product) []Product
- func (o *OptNilProductArray) Reset()
- func (o *OptNilProductArray) SetTo(v []Product)
- func (s *OptNilProductArray) UnmarshalJSON(data []byte) error
- type OptNilPurchaseableProductArray
- func (o *OptNilPurchaseableProductArray) Decode(d *jx.Decoder) error
- func (o OptNilPurchaseableProductArray) Encode(e *jx.Encoder)
- func (o OptNilPurchaseableProductArray) Get() (v []PurchaseableProduct, ok bool)
- func (o OptNilPurchaseableProductArray) IsNull() bool
- func (o OptNilPurchaseableProductArray) IsSet() bool
- func (s OptNilPurchaseableProductArray) MarshalJSON() ([]byte, error)
- func (o OptNilPurchaseableProductArray) Or(d []PurchaseableProduct) []PurchaseableProduct
- func (o *OptNilPurchaseableProductArray) Reset()
- func (o *OptNilPurchaseableProductArray) SetTo(v []PurchaseableProduct)
- func (s *OptNilPurchaseableProductArray) UnmarshalJSON(data []byte) error
- type OptNilRuleArray
- func (o *OptNilRuleArray) Decode(d *jx.Decoder) error
- func (o OptNilRuleArray) Encode(e *jx.Encoder)
- func (o OptNilRuleArray) Get() (v []Rule, ok bool)
- func (o OptNilRuleArray) IsNull() bool
- func (o OptNilRuleArray) IsSet() bool
- func (s OptNilRuleArray) MarshalJSON() ([]byte, error)
- func (o OptNilRuleArray) Or(d []Rule) []Rule
- func (o *OptNilRuleArray) Reset()
- func (o *OptNilRuleArray) SetTo(v []Rule)
- func (s *OptNilRuleArray) UnmarshalJSON(data []byte) error
- type OptNilRuleCreateArray
- func (o *OptNilRuleCreateArray) Decode(d *jx.Decoder) error
- func (o OptNilRuleCreateArray) Encode(e *jx.Encoder)
- func (o OptNilRuleCreateArray) Get() (v []RuleCreate, ok bool)
- func (o OptNilRuleCreateArray) IsNull() bool
- func (o OptNilRuleCreateArray) IsSet() bool
- func (s OptNilRuleCreateArray) MarshalJSON() ([]byte, error)
- func (o OptNilRuleCreateArray) Or(d []RuleCreate) []RuleCreate
- func (o *OptNilRuleCreateArray) Reset()
- func (o *OptNilRuleCreateArray) SetTo(v []RuleCreate)
- func (s *OptNilRuleCreateArray) UnmarshalJSON(data []byte) error
- type OptNilString
- func (o *OptNilString) Decode(d *jx.Decoder) error
- func (o OptNilString) Encode(e *jx.Encoder)
- func (o OptNilString) Get() (v string, ok bool)
- func (o OptNilString) IsNull() bool
- func (o OptNilString) IsSet() bool
- func (s OptNilString) MarshalJSON() ([]byte, error)
- func (o OptNilString) Or(d string) string
- func (o *OptNilString) Reset()
- func (o *OptNilString) SetTo(v string)
- func (s *OptNilString) UnmarshalJSON(data []byte) error
- type OptNilSystemStateGroups
- func (o *OptNilSystemStateGroups) Decode(d *jx.Decoder) error
- func (o OptNilSystemStateGroups) Encode(e *jx.Encoder)
- func (o OptNilSystemStateGroups) Get() (v SystemStateGroups, ok bool)
- func (o OptNilSystemStateGroups) IsNull() bool
- func (o OptNilSystemStateGroups) IsSet() bool
- func (s OptNilSystemStateGroups) MarshalJSON() ([]byte, error)
- func (o OptNilSystemStateGroups) Or(d SystemStateGroups) SystemStateGroups
- func (o *OptNilSystemStateGroups) Reset()
- func (o *OptNilSystemStateGroups) SetTo(v SystemStateGroups)
- func (s *OptNilSystemStateGroups) UnmarshalJSON(data []byte) error
- type OptNilTopUpProductArray
- func (o *OptNilTopUpProductArray) Decode(d *jx.Decoder) error
- func (o OptNilTopUpProductArray) Encode(e *jx.Encoder)
- func (o OptNilTopUpProductArray) Get() (v []TopUpProduct, ok bool)
- func (o OptNilTopUpProductArray) IsNull() bool
- func (o OptNilTopUpProductArray) IsSet() bool
- func (s OptNilTopUpProductArray) MarshalJSON() ([]byte, error)
- func (o OptNilTopUpProductArray) Or(d []TopUpProduct) []TopUpProduct
- func (o *OptNilTopUpProductArray) Reset()
- func (o *OptNilTopUpProductArray) SetTo(v []TopUpProduct)
- func (s *OptNilTopUpProductArray) UnmarshalJSON(data []byte) error
- type OptProduct
- func (o *OptProduct) Decode(d *jx.Decoder) error
- func (o OptProduct) Encode(e *jx.Encoder)
- func (o OptProduct) Get() (v Product, ok bool)
- func (o OptProduct) IsSet() bool
- func (s OptProduct) MarshalJSON() ([]byte, error)
- func (o OptProduct) Or(d Product) Product
- func (o *OptProduct) Reset()
- func (o *OptProduct) SetTo(v Product)
- func (s *OptProduct) UnmarshalJSON(data []byte) error
- type OptProductType
- func (o *OptProductType) Decode(d *jx.Decoder) error
- func (o OptProductType) Encode(e *jx.Encoder)
- func (o OptProductType) Get() (v ProductType, ok bool)
- func (o OptProductType) IsSet() bool
- func (s OptProductType) MarshalJSON() ([]byte, error)
- func (o OptProductType) Or(d ProductType) ProductType
- func (o *OptProductType) Reset()
- func (o *OptProductType) SetTo(v ProductType)
- func (s *OptProductType) UnmarshalJSON(data []byte) error
- type OptPurchaseableProduct
- func (o *OptPurchaseableProduct) Decode(d *jx.Decoder) error
- func (o OptPurchaseableProduct) Encode(e *jx.Encoder)
- func (o OptPurchaseableProduct) Get() (v PurchaseableProduct, ok bool)
- func (o OptPurchaseableProduct) IsSet() bool
- func (s OptPurchaseableProduct) MarshalJSON() ([]byte, error)
- func (o OptPurchaseableProduct) Or(d PurchaseableProduct) PurchaseableProduct
- func (o *OptPurchaseableProduct) Reset()
- func (o *OptPurchaseableProduct) SetTo(v PurchaseableProduct)
- func (s *OptPurchaseableProduct) UnmarshalJSON(data []byte) error
- type OptRuleFlags
- func (o *OptRuleFlags) Decode(d *jx.Decoder) error
- func (o OptRuleFlags) Encode(e *jx.Encoder)
- func (o OptRuleFlags) Get() (v RuleFlags, ok bool)
- func (o OptRuleFlags) IsSet() bool
- func (s OptRuleFlags) MarshalJSON() ([]byte, error)
- func (o OptRuleFlags) Or(d RuleFlags) RuleFlags
- func (o *OptRuleFlags) Reset()
- func (o *OptRuleFlags) SetTo(v RuleFlags)
- func (s *OptRuleFlags) UnmarshalJSON(data []byte) error
- type OptString
- type Option
- type OwnerShip
- func (s *OwnerShip) Decode(d *jx.Decoder) error
- func (s *OwnerShip) Encode(e *jx.Encoder)
- func (s *OwnerShip) GetExpires() OptDateTime
- func (s *OwnerShip) GetID() OptInt64
- func (s *OwnerShip) GetProduct() OptPurchaseableProduct
- func (s *OwnerShip) MarshalJSON() ([]byte, error)
- func (s *OwnerShip) SetExpires(val OptDateTime)
- func (s *OwnerShip) SetID(val OptInt64)
- func (s *OwnerShip) SetProduct(val OptPurchaseableProduct)
- func (s *OwnerShip) UnmarshalJSON(data []byte) error
- func (s *OwnerShip) Validate() error
- type PlanedTransaction
- func (s *PlanedTransaction) Decode(d *jx.Decoder) error
- func (s *PlanedTransaction) Encode(e *jx.Encoder)
- func (s *PlanedTransaction) GetAmount() OptFloat64
- func (s *PlanedTransaction) GetID() OptInt64
- func (s *PlanedTransaction) GetProduct() OptProduct
- func (s *PlanedTransaction) GetReference() OptNilString
- func (s *PlanedTransaction) GetTimestamp() OptDateTime
- func (s *PlanedTransaction) MarshalJSON() ([]byte, error)
- func (s *PlanedTransaction) SetAmount(val OptFloat64)
- func (s *PlanedTransaction) SetID(val OptInt64)
- func (s *PlanedTransaction) SetProduct(val OptProduct)
- func (s *PlanedTransaction) SetReference(val OptNilString)
- func (s *PlanedTransaction) SetTimestamp(val OptDateTime)
- func (s *PlanedTransaction) UnmarshalJSON(data []byte) error
- func (s *PlanedTransaction) Validate() error
- type Product
- func (s *Product) Decode(d *jx.Decoder) error
- func (s *Product) Encode(e *jx.Encoder)
- func (s *Product) GetCost() OptFloat64
- func (s *Product) GetDescription() OptNilString
- func (s *Product) GetID() OptInt32
- func (s *Product) GetOwnershipSeconds() OptInt64
- func (s *Product) GetSlug() OptNilString
- func (s *Product) GetTitle() OptNilString
- func (s *Product) GetType() OptProductType
- func (s *Product) MarshalJSON() ([]byte, error)
- func (s *Product) SetCost(val OptFloat64)
- func (s *Product) SetDescription(val OptNilString)
- func (s *Product) SetID(val OptInt32)
- func (s *Product) SetOwnershipSeconds(val OptInt64)
- func (s *Product) SetSlug(val OptNilString)
- func (s *Product) SetTitle(val OptNilString)
- func (s *Product) SetType(val OptProductType)
- func (s *Product) UnmarshalJSON(data []byte) error
- func (s *Product) Validate() error
- type ProductType
- func (s *ProductType) Decode(d *jx.Decoder) error
- func (s ProductType) Encode(e *jx.Encoder)
- func (s ProductType) GetInt() (v int, ok bool)
- func (s ProductType) GetString() (v string, ok bool)
- func (s ProductType) IsInt() bool
- func (s ProductType) IsString() bool
- func (s ProductType) MarshalJSON() ([]byte, error)
- func (s *ProductType) SetInt(v int)
- func (s *ProductType) SetString(v string)
- func (s *ProductType) UnmarshalJSON(data []byte) error
- type ProductTypeType
- type ProductsGetParams
- type ProductsPProductSlugGetParams
- type ProductsServiceServiceSlugCountGetParams
- type ProductsServiceServiceSlugIdsGetParams
- type ProductsServicesGetParams
- type ProductsTopupGetParams
- type ProductsUserUserIdGetParams
- type PurchaseableProduct
- func (s *PurchaseableProduct) Decode(d *jx.Decoder) error
- func (s *PurchaseableProduct) Encode(e *jx.Encoder)
- func (s *PurchaseableProduct) GetCost() OptFloat64
- func (s *PurchaseableProduct) GetDescription() OptNilString
- func (s *PurchaseableProduct) GetID() OptInt32
- func (s *PurchaseableProduct) GetOwnershipSeconds() OptInt64
- func (s *PurchaseableProduct) GetSlug() OptNilString
- func (s *PurchaseableProduct) GetTitle() OptNilString
- func (s *PurchaseableProduct) GetType() OptProductType
- func (s *PurchaseableProduct) MarshalJSON() ([]byte, error)
- func (s *PurchaseableProduct) SetCost(val OptFloat64)
- func (s *PurchaseableProduct) SetDescription(val OptNilString)
- func (s *PurchaseableProduct) SetID(val OptInt32)
- func (s *PurchaseableProduct) SetOwnershipSeconds(val OptInt64)
- func (s *PurchaseableProduct) SetSlug(val OptNilString)
- func (s *PurchaseableProduct) SetTitle(val OptNilString)
- func (s *PurchaseableProduct) SetType(val OptProductType)
- func (s *PurchaseableProduct) UnmarshalJSON(data []byte) error
- func (s *PurchaseableProduct) Validate() error
- type Route
- type Rule
- func (s *Rule) Decode(d *jx.Decoder) error
- func (s *Rule) Encode(e *jx.Encoder)
- func (s *Rule) GetAmount() OptFloat64
- func (s *Rule) GetFlags() OptRuleFlags
- func (s *Rule) GetID() OptInt32
- func (s *Rule) GetPriority() OptInt32
- func (s *Rule) GetRequires() OptGroup
- func (s *Rule) GetSlug() OptNilString
- func (s *Rule) GetTargets() OptGroup
- func (s *Rule) MarshalJSON() ([]byte, error)
- func (s *Rule) SetAmount(val OptFloat64)
- func (s *Rule) SetFlags(val OptRuleFlags)
- func (s *Rule) SetID(val OptInt32)
- func (s *Rule) SetPriority(val OptInt32)
- func (s *Rule) SetRequires(val OptGroup)
- func (s *Rule) SetSlug(val OptNilString)
- func (s *Rule) SetTargets(val OptGroup)
- func (s *Rule) UnmarshalJSON(data []byte) error
- func (s *Rule) Validate() error
- type RuleCreate
- func (s *RuleCreate) Decode(d *jx.Decoder) error
- func (s *RuleCreate) Encode(e *jx.Encoder)
- func (s *RuleCreate) GetAmount() OptFloat64
- func (s *RuleCreate) GetFlags() OptRuleFlags
- func (s *RuleCreate) GetPriority() OptInt32
- func (s *RuleCreate) GetRequiresGroup() OptNilString
- func (s *RuleCreate) GetSlug() OptNilString
- func (s *RuleCreate) GetTargetsGroup() OptNilString
- func (s *RuleCreate) MarshalJSON() ([]byte, error)
- func (s *RuleCreate) SetAmount(val OptFloat64)
- func (s *RuleCreate) SetFlags(val OptRuleFlags)
- func (s *RuleCreate) SetPriority(val OptInt32)
- func (s *RuleCreate) SetRequiresGroup(val OptNilString)
- func (s *RuleCreate) SetSlug(val OptNilString)
- func (s *RuleCreate) SetTargetsGroup(val OptNilString)
- func (s *RuleCreate) UnmarshalJSON(data []byte) error
- func (s *RuleCreate) Validate() error
- type RuleFlags
- func (s *RuleFlags) Decode(d *jx.Decoder) error
- func (s RuleFlags) Encode(e *jx.Encoder)
- func (s RuleFlags) MarshalJSON() ([]byte, error)
- func (s RuleFlags) MarshalText() ([]byte, error)
- func (s *RuleFlags) UnmarshalJSON(data []byte) error
- func (s *RuleFlags) UnmarshalText(data []byte) error
- func (s RuleFlags) Validate() error
- type RuleResult
- func (s *RuleResult) Decode(d *jx.Decoder) error
- func (s *RuleResult) Encode(e *jx.Encoder)
- func (s *RuleResult) GetModifiedProduct() OptProduct
- func (s *RuleResult) GetRules() OptNilRuleArray
- func (s *RuleResult) MarshalJSON() ([]byte, error)
- func (s *RuleResult) SetModifiedProduct(val OptProduct)
- func (s *RuleResult) SetRules(val OptNilRuleArray)
- func (s *RuleResult) UnmarshalJSON(data []byte) error
- func (s *RuleResult) Validate() error
- type RulesGetParams
- type RulesRuleSlugDeleteParams
- type RulesRuleSlugGetParams
- type Server
- type ServerOption
- func WithErrorHandler(h ErrorHandler) ServerOption
- func WithMaxMultipartMemory(max int64) ServerOption
- func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
- func WithMiddleware(m ...Middleware) ServerOption
- func WithNotFound(notFound http.HandlerFunc) ServerOption
- func WithPathPrefix(prefix string) ServerOption
- type SystemState
- func (s *SystemState) Decode(d *jx.Decoder) error
- func (s *SystemState) Encode(e *jx.Encoder)
- func (s *SystemState) GetGroups() OptNilSystemStateGroups
- func (s *SystemState) GetProducts() OptNilPurchaseableProductArray
- func (s *SystemState) GetRules() OptNilRuleCreateArray
- func (s *SystemState) GetTopUps() OptNilTopUpProductArray
- func (s *SystemState) MarshalJSON() ([]byte, error)
- func (s *SystemState) SetGroups(val OptNilSystemStateGroups)
- func (s *SystemState) SetProducts(val OptNilPurchaseableProductArray)
- func (s *SystemState) SetRules(val OptNilRuleCreateArray)
- func (s *SystemState) SetTopUps(val OptNilTopUpProductArray)
- func (s *SystemState) UnmarshalJSON(data []byte) error
- func (s *SystemState) Validate() error
- type SystemStateGroups
- type TopUpCustomPostParams
- type TopUpIdResponse
- func (s *TopUpIdResponse) Decode(d *jx.Decoder) error
- func (s *TopUpIdResponse) Encode(e *jx.Encoder)
- func (s *TopUpIdResponse) GetDirctLink() OptNilString
- func (s *TopUpIdResponse) GetID() OptNilString
- func (s *TopUpIdResponse) MarshalJSON() ([]byte, error)
- func (s *TopUpIdResponse) SetDirctLink(val OptNilString)
- func (s *TopUpIdResponse) SetID(val OptNilString)
- func (s *TopUpIdResponse) UnmarshalJSON(data []byte) error
- type TopUpOptions
- func (s *TopUpOptions) Decode(d *jx.Decoder) error
- func (s *TopUpOptions) Encode(e *jx.Encoder)
- func (s *TopUpOptions) GetCancelUrl() OptNilString
- func (s *TopUpOptions) GetSuccessUrl() OptNilString
- func (s *TopUpOptions) GetTopUpAmount() OptInt64
- func (s *TopUpOptions) GetUserEmail() OptNilString
- func (s *TopUpOptions) MarshalJSON() ([]byte, error)
- func (s *TopUpOptions) SetCancelUrl(val OptNilString)
- func (s *TopUpOptions) SetSuccessUrl(val OptNilString)
- func (s *TopUpOptions) SetTopUpAmount(val OptInt64)
- func (s *TopUpOptions) SetUserEmail(val OptNilString)
- func (s *TopUpOptions) UnmarshalJSON(data []byte) error
- type TopUpPaypalPostParams
- type TopUpProduct
- func (s *TopUpProduct) Decode(d *jx.Decoder) error
- func (s *TopUpProduct) Encode(e *jx.Encoder)
- func (s *TopUpProduct) GetCost() OptFloat64
- func (s *TopUpProduct) GetCurrencyCode() OptNilString
- func (s *TopUpProduct) GetDescription() OptNilString
- func (s *TopUpProduct) GetID() OptInt32
- func (s *TopUpProduct) GetOwnershipSeconds() OptInt64
- func (s *TopUpProduct) GetPrice() OptFloat64
- func (s *TopUpProduct) GetProviderSlug() OptNilString
- func (s *TopUpProduct) GetSlug() OptNilString
- func (s *TopUpProduct) GetTitle() OptNilString
- func (s *TopUpProduct) GetType() OptProductType
- func (s *TopUpProduct) MarshalJSON() ([]byte, error)
- func (s *TopUpProduct) SetCost(val OptFloat64)
- func (s *TopUpProduct) SetCurrencyCode(val OptNilString)
- func (s *TopUpProduct) SetDescription(val OptNilString)
- func (s *TopUpProduct) SetID(val OptInt32)
- func (s *TopUpProduct) SetOwnershipSeconds(val OptInt64)
- func (s *TopUpProduct) SetPrice(val OptFloat64)
- func (s *TopUpProduct) SetProviderSlug(val OptNilString)
- func (s *TopUpProduct) SetSlug(val OptNilString)
- func (s *TopUpProduct) SetTitle(val OptNilString)
- func (s *TopUpProduct) SetType(val OptProductType)
- func (s *TopUpProduct) UnmarshalJSON(data []byte) error
- func (s *TopUpProduct) Validate() error
- type TopUpStripePostParams
- type TransactionEvent
- func (s *TransactionEvent) Decode(d *jx.Decoder) error
- func (s *TransactionEvent) Encode(e *jx.Encoder)
- func (s *TransactionEvent) GetAmount() OptFloat64
- func (s *TransactionEvent) GetID() OptInt64
- func (s *TransactionEvent) GetOwnedSeconds() OptInt64
- func (s *TransactionEvent) GetProductId() OptInt32
- func (s *TransactionEvent) GetProductSlug() OptNilString
- func (s *TransactionEvent) GetProductType() OptProductType
- func (s *TransactionEvent) GetReference() OptNilString
- func (s *TransactionEvent) GetTimestamp() OptDateTime
- func (s *TransactionEvent) GetUserId() OptNilString
- func (s *TransactionEvent) MarshalJSON() ([]byte, error)
- func (s *TransactionEvent) SetAmount(val OptFloat64)
- func (s *TransactionEvent) SetID(val OptInt64)
- func (s *TransactionEvent) SetOwnedSeconds(val OptInt64)
- func (s *TransactionEvent) SetProductId(val OptInt32)
- func (s *TransactionEvent) SetProductSlug(val OptNilString)
- func (s *TransactionEvent) SetProductType(val OptProductType)
- func (s *TransactionEvent) SetReference(val OptNilString)
- func (s *TransactionEvent) SetTimestamp(val OptDateTime)
- func (s *TransactionEvent) SetUserId(val OptNilString)
- func (s *TransactionEvent) UnmarshalJSON(data []byte) error
- func (s *TransactionEvent) Validate() error
- type TransactionPlanedUUserIdGetParams
- type TransactionPlanedUUserIdPostParams
- type TransactionPlanedUUserIdTTransactionIdDeleteParams
- type TransactionPlanedUUserIdTTransactionIdPutParams
- type TransactionSendPostOK
- type TransactionUUserIdGetParams
- type TransferRequest
- func (s *TransferRequest) Decode(d *jx.Decoder) error
- func (s *TransferRequest) Encode(e *jx.Encoder)
- func (s *TransferRequest) GetAmount() OptFloat64
- func (s *TransferRequest) GetReference() OptNilString
- func (s *TransferRequest) GetTargetUser() OptNilString
- func (s *TransferRequest) MarshalJSON() ([]byte, error)
- func (s *TransferRequest) SetAmount(val OptFloat64)
- func (s *TransferRequest) SetReference(val OptNilString)
- func (s *TransferRequest) SetTargetUser(val OptNilString)
- func (s *TransferRequest) UnmarshalJSON(data []byte) error
- func (s *TransferRequest) Validate() error
- type UnimplementedHandler
- func (UnimplementedHandler) ApplyPost(ctx context.Context, req *SystemState) error
- func (UnimplementedHandler) CallbackPaypalPost(ctx context.Context) error
- func (UnimplementedHandler) CallbackStripePost(ctx context.Context) error
- func (UnimplementedHandler) GroupGet(ctx context.Context, params GroupGetParams) (r []Group, _ error)
- func (UnimplementedHandler) GroupGroupSlugDelete(ctx context.Context, params GroupGroupSlugDeleteParams) (r *Group, _ error)
- func (UnimplementedHandler) GroupGroupSlugGet(ctx context.Context, params GroupGroupSlugGetParams) (r *Group, _ error)
- func (UnimplementedHandler) GroupGroupSlugProductsDelete(ctx context.Context, req []string, params GroupGroupSlugProductsDeleteParams) (r *Group, _ error)
- func (UnimplementedHandler) GroupGroupSlugProductsPost(ctx context.Context, req []string, params GroupGroupSlugProductsPostParams) (r *Group, _ error)
- func (UnimplementedHandler) GroupGroupSlugPut(ctx context.Context, req *Group, params GroupGroupSlugPutParams) (r *Group, _ error)
- func (UnimplementedHandler) GroupPost(ctx context.Context, req *Group) (r *Group, _ error)
- func (UnimplementedHandler) ProductsGet(ctx context.Context, params ProductsGetParams) (r []PurchaseableProduct, _ error)
- func (UnimplementedHandler) ProductsPProductSlugGet(ctx context.Context, params ProductsPProductSlugGetParams) (r *PurchaseableProduct, _ error)
- func (UnimplementedHandler) ProductsPut(ctx context.Context, req *PurchaseableProduct) (r *PurchaseableProduct, _ error)
- func (UnimplementedHandler) ProductsServiceServiceSlugCountGet(ctx context.Context, params ProductsServiceServiceSlugCountGetParams) (r int32, _ error)
- func (UnimplementedHandler) ProductsServiceServiceSlugIdsGet(ctx context.Context, params ProductsServiceServiceSlugIdsGetParams) (r []string, _ error)
- func (UnimplementedHandler) ProductsServicesGet(ctx context.Context, params ProductsServicesGetParams) (r []PurchaseableProduct, _ error)
- func (UnimplementedHandler) ProductsTopupGet(ctx context.Context, params ProductsTopupGetParams) (r []TopUpProduct, _ error)
- func (UnimplementedHandler) ProductsTopupPut(ctx context.Context, req *TopUpProduct) (r *TopUpProduct, _ error)
- func (UnimplementedHandler) ProductsUserUserIdGet(ctx context.Context, params ProductsUserUserIdGetParams) (r []RuleResult, _ error)
- func (UnimplementedHandler) RulesGet(ctx context.Context, params RulesGetParams) (r []Rule, _ error)
- func (UnimplementedHandler) RulesPost(ctx context.Context, req *RuleCreate) (r *Rule, _ error)
- func (UnimplementedHandler) RulesRuleSlugDelete(ctx context.Context, params RulesRuleSlugDeleteParams) (r *Rule, _ error)
- func (UnimplementedHandler) RulesRuleSlugGet(ctx context.Context, params RulesRuleSlugGetParams) (r *Rule, _ error)
- func (UnimplementedHandler) TopUpCompensatePost(ctx context.Context, req *Compensation) (r *Int32Int32ValueTuple, _ error)
- func (UnimplementedHandler) TopUpCustomPost(ctx context.Context, req *CustomTopUp, params TopUpCustomPostParams) (r *TopUpIdResponse, _ error)
- func (UnimplementedHandler) TopUpOptionsGet(ctx context.Context) (r []TopUpProduct, _ error)
- func (UnimplementedHandler) TopUpPaypalPost(ctx context.Context, req *TopUpOptions, params TopUpPaypalPostParams) (r *TopUpIdResponse, _ error)
- func (UnimplementedHandler) TopUpStripePost(ctx context.Context, req *TopUpOptions, params TopUpStripePostParams) (r *TopUpIdResponse, _ error)
- func (UnimplementedHandler) TransactionPlanedUUserIdGet(ctx context.Context, params TransactionPlanedUUserIdGetParams) (r []ExternalTransaction, _ error)
- func (UnimplementedHandler) TransactionPlanedUUserIdPost(ctx context.Context, req *ExternalTransaction, ...) (r *PlanedTransaction, _ error)
- func (UnimplementedHandler) TransactionPlanedUUserIdTTransactionIdDelete(ctx context.Context, params TransactionPlanedUUserIdTTransactionIdDeleteParams) (r *PlanedTransaction, _ error)
- func (UnimplementedHandler) TransactionPlanedUUserIdTTransactionIdPut(ctx context.Context, req *ExternalTransaction, ...) (r *PlanedTransaction, _ error)
- func (UnimplementedHandler) TransactionSendPost(ctx context.Context, req *TransactionEvent) error
- func (UnimplementedHandler) TransactionUUserIdGet(ctx context.Context, params TransactionUUserIdGetParams) (r []ExternalTransaction, _ error)
- func (UnimplementedHandler) UserUserIdGet(ctx context.Context, params UserUserIdGetParams) (r *User, _ error)
- func (UnimplementedHandler) UserUserIdOwnsLongestPost(ctx context.Context, req []string, params UserUserIdOwnsLongestPostParams) (r time.Time, _ error)
- func (UnimplementedHandler) UserUserIdOwnsPost(ctx context.Context, req []string, params UserUserIdOwnsPostParams) (r []OwnerShip, _ error)deprecated
- func (UnimplementedHandler) UserUserIdOwnsProductSlugUntilGet(ctx context.Context, params UserUserIdOwnsProductSlugUntilGetParams) (r time.Time, _ error)
- func (UnimplementedHandler) UserUserIdOwnsUntilPost(ctx context.Context, req []string, params UserUserIdOwnsUntilPostParams) (r UserUserIdOwnsUntilPostOKApplicationJSON, _ error)
- func (UnimplementedHandler) UserUserIdPost(ctx context.Context, params UserUserIdPostParams) (r *User, _ error)
- func (UnimplementedHandler) UserUserIdPurchaseProductSlugPost(ctx context.Context, params UserUserIdPurchaseProductSlugPostParams) (r *User, _ error)
- func (UnimplementedHandler) UserUserIdServicePurchaseProductSlugPost(ctx context.Context, params UserUserIdServicePurchaseProductSlugPostParams) (r *User, _ error)
- func (UnimplementedHandler) UserUserIdTransactionIdDelete(ctx context.Context, params UserUserIdTransactionIdDeleteParams) (r *User, _ error)
- func (UnimplementedHandler) UserUserIdTransferPost(ctx context.Context, req *TransferRequest, params UserUserIdTransferPostParams) (r *TransactionEvent, _ error)
- type User
- func (s *User) Decode(d *jx.Decoder) error
- func (s *User) Encode(e *jx.Encoder)
- func (s *User) GetAvailableBalance() OptFloat64
- func (s *User) GetBalance() OptFloat64
- func (s *User) GetExternalId() OptNilString
- func (s *User) GetID() OptInt32
- func (s *User) GetOwns() OptNilOwnerShipArray
- func (s *User) MarshalJSON() ([]byte, error)
- func (s *User) SetAvailableBalance(val OptFloat64)
- func (s *User) SetBalance(val OptFloat64)
- func (s *User) SetExternalId(val OptNilString)
- func (s *User) SetID(val OptInt32)
- func (s *User) SetOwns(val OptNilOwnerShipArray)
- func (s *User) UnmarshalJSON(data []byte) error
- func (s *User) Validate() error
- type UserUserIdGetParams
- type UserUserIdOwnsLongestPostParams
- type UserUserIdOwnsPostParams
- type UserUserIdOwnsProductSlugUntilGetParams
- type UserUserIdOwnsUntilPostOKApplicationJSON
- func (s *UserUserIdOwnsUntilPostOKApplicationJSON) Decode(d *jx.Decoder) error
- func (s UserUserIdOwnsUntilPostOKApplicationJSON) Encode(e *jx.Encoder)
- func (s UserUserIdOwnsUntilPostOKApplicationJSON) MarshalJSON() ([]byte, error)
- func (s *UserUserIdOwnsUntilPostOKApplicationJSON) UnmarshalJSON(data []byte) error
- type UserUserIdOwnsUntilPostParams
- type UserUserIdPostParams
- type UserUserIdPurchaseProductSlugPostParams
- type UserUserIdServicePurchaseProductSlugPostParams
- type UserUserIdTransactionIdDeleteParams
- type UserUserIdTransferPostParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CallbackPaypalPostOK ¶
type CallbackPaypalPostOK struct{}
CallbackPaypalPostOK is response for CallbackPaypalPost operation.
type CallbackStripePostOK ¶
type CallbackStripePostOK struct{}
CallbackStripePostOK is response for CallbackStripePost operation.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements OAS client.
func NewClient ¶
func NewClient(serverURL string, opts ...ClientOption) (*Client, error)
NewClient initializes new Client defined by OAS.
func (*Client) ApplyPost ¶
func (c *Client) ApplyPost(ctx context.Context, request *SystemState) error
ApplyPost invokes POST /Apply operation.
Brings all products, groups and roles into the given state will disable/delete anything not present so use carefully.
POST /Apply
func (*Client) CallbackPaypalPost ¶
CallbackPaypalPost invokes POST /Callback/paypal operation.
Accept callbacks from paypal.
POST /Callback/paypal
func (*Client) CallbackStripePost ¶
CallbackStripePost invokes POST /Callback/stripe operation.
Webhook callback for stripe.
POST /Callback/stripe
func (*Client) GroupGroupSlugDelete ¶
func (c *Client) GroupGroupSlugDelete(ctx context.Context, params GroupGroupSlugDeleteParams) (*Group, error)
GroupGroupSlugDelete invokes DELETE /Group/{groupSlug} operation.
DELETE /Group/{groupSlug}
func (*Client) GroupGroupSlugGet ¶
func (c *Client) GroupGroupSlugGet(ctx context.Context, params GroupGroupSlugGetParams) (*Group, error)
GroupGroupSlugGet invokes GET /Group/{groupSlug} operation.
GET /Group/{groupSlug}
func (*Client) GroupGroupSlugProductsDelete ¶
func (c *Client) GroupGroupSlugProductsDelete(ctx context.Context, request []string, params GroupGroupSlugProductsDeleteParams) (*Group, error)
GroupGroupSlugProductsDelete invokes DELETE /Group/{groupSlug}/products operation.
DELETE /Group/{groupSlug}/products
func (*Client) GroupGroupSlugProductsPost ¶
func (c *Client) GroupGroupSlugProductsPost(ctx context.Context, request []string, params GroupGroupSlugProductsPostParams) (*Group, error)
GroupGroupSlugProductsPost invokes POST /Group/{groupSlug}/products operation.
POST /Group/{groupSlug}/products
func (*Client) GroupGroupSlugPut ¶
func (c *Client) GroupGroupSlugPut(ctx context.Context, request *Group, params GroupGroupSlugPutParams) (*Group, error)
GroupGroupSlugPut invokes PUT /Group/{groupSlug} operation.
PUT /Group/{groupSlug}
func (*Client) ProductsGet ¶
func (c *Client) ProductsGet(ctx context.Context, params ProductsGetParams) ([]PurchaseableProduct, error)
ProductsGet invokes GET /Products operation.
Get all products.
GET /Products
func (*Client) ProductsPProductSlugGet ¶
func (c *Client) ProductsPProductSlugGet(ctx context.Context, params ProductsPProductSlugGetParams) (*PurchaseableProduct, error)
ProductsPProductSlugGet invokes GET /Products/p/{productSlug} operation.
Get the details of a product.
GET /Products/p/{productSlug}
func (*Client) ProductsPut ¶
func (c *Client) ProductsPut(ctx context.Context, request *PurchaseableProduct) (*PurchaseableProduct, error)
ProductsPut invokes PUT /Products operation.
Updates a product by replacing it with a new one. Old products can not be deleted to furfill accounting needs.
PUT /Products
func (*Client) ProductsServiceServiceSlugCountGet ¶
func (c *Client) ProductsServiceServiceSlugCountGet(ctx context.Context, params ProductsServiceServiceSlugCountGetParams) (int32, error)
ProductsServiceServiceSlugCountGet invokes GET /Products/service/{serviceSlug}/count operation.
Count of users owning a service.
GET /Products/service/{serviceSlug}/count
func (*Client) ProductsServiceServiceSlugIdsGet ¶
func (c *Client) ProductsServiceServiceSlugIdsGet(ctx context.Context, params ProductsServiceServiceSlugIdsGetParams) ([]string, error)
ProductsServiceServiceSlugIdsGet invokes GET /Products/service/{serviceSlug}/ids operation.
Gets all userIds owning a service.
GET /Products/service/{serviceSlug}/ids
func (*Client) ProductsServicesGet ¶
func (c *Client) ProductsServicesGet(ctx context.Context, params ProductsServicesGetParams) ([]PurchaseableProduct, error)
ProductsServicesGet invokes GET /Products/services operation.
Get services.
GET /Products/services
func (*Client) ProductsTopupGet ¶
func (c *Client) ProductsTopupGet(ctx context.Context, params ProductsTopupGetParams) ([]TopUpProduct, error)
ProductsTopupGet invokes GET /Products/topup operation.
Get topup options.
GET /Products/topup
func (*Client) ProductsTopupPut ¶
func (c *Client) ProductsTopupPut(ctx context.Context, request *TopUpProduct) (*TopUpProduct, error)
ProductsTopupPut invokes PUT /Products/topup operation.
Updates a topup option by replacing it with a new one. Old options get a new slug and are marked as disabled.
PUT /Products/topup
func (*Client) ProductsUserUserIdGet ¶
func (c *Client) ProductsUserUserIdGet(ctx context.Context, params ProductsUserUserIdGetParams) ([]RuleResult, error)
ProductsUserUserIdGet invokes GET /Products/user/{userId} operation.
Get adjusted prices for a user.
GET /Products/user/{userId}
func (*Client) RulesRuleSlugDelete ¶
func (c *Client) RulesRuleSlugDelete(ctx context.Context, params RulesRuleSlugDeleteParams) (*Rule, error)
RulesRuleSlugDelete invokes DELETE /Rules/{ruleSlug} operation.
Deletes a rule.
DELETE /Rules/{ruleSlug}
func (*Client) RulesRuleSlugGet ¶
func (c *Client) RulesRuleSlugGet(ctx context.Context, params RulesRuleSlugGetParams) (*Rule, error)
RulesRuleSlugGet invokes GET /Rules/{ruleSlug} operation.
Returns a rule by slug.
GET /Rules/{ruleSlug}
func (*Client) TopUpCompensatePost ¶
func (c *Client) TopUpCompensatePost(ctx context.Context, request *Compensation) (*Int32Int32ValueTuple, error)
TopUpCompensatePost invokes POST /TopUp/compensate operation.
Compensates users of a service for something.
POST /TopUp/compensate
func (*Client) TopUpCustomPost ¶
func (c *Client) TopUpCustomPost(ctx context.Context, request *CustomTopUp, params TopUpCustomPostParams) (*TopUpIdResponse, error)
TopUpCustomPost invokes POST /TopUp/custom operation.
Creates a custom topup that is instantly credited.
POST /TopUp/custom
func (*Client) TopUpOptionsGet ¶
func (c *Client) TopUpOptionsGet(ctx context.Context) ([]TopUpProduct, error)
TopUpOptionsGet invokes GET /TopUp/options operation.
All available topup options.
GET /TopUp/options
func (*Client) TopUpPaypalPost ¶
func (c *Client) TopUpPaypalPost(ctx context.Context, request *TopUpOptions, params TopUpPaypalPostParams) (*TopUpIdResponse, error)
TopUpPaypalPost invokes POST /TopUp/paypal operation.
Creates a payment session with paypal.
POST /TopUp/paypal
func (*Client) TopUpStripePost ¶
func (c *Client) TopUpStripePost(ctx context.Context, request *TopUpOptions, params TopUpStripePostParams) (*TopUpIdResponse, error)
TopUpStripePost invokes POST /TopUp/stripe operation.
Creates a payment session with stripe.
POST /TopUp/stripe
func (*Client) TransactionPlanedUUserIdGet ¶
func (c *Client) TransactionPlanedUUserIdGet(ctx context.Context, params TransactionPlanedUUserIdGetParams) ([]ExternalTransaction, error)
TransactionPlanedUUserIdGet invokes GET /Transaction/planed/u/{userId} operation.
GET /Transaction/planed/u/{userId}
func (*Client) TransactionPlanedUUserIdPost ¶
func (c *Client) TransactionPlanedUUserIdPost(ctx context.Context, request *ExternalTransaction, params TransactionPlanedUUserIdPostParams) (*PlanedTransaction, error)
TransactionPlanedUUserIdPost invokes POST /Transaction/planed/u/{userId} operation.
POST /Transaction/planed/u/{userId}
func (*Client) TransactionPlanedUUserIdTTransactionIdDelete ¶
func (c *Client) TransactionPlanedUUserIdTTransactionIdDelete(ctx context.Context, params TransactionPlanedUUserIdTTransactionIdDeleteParams) (*PlanedTransaction, error)
TransactionPlanedUUserIdTTransactionIdDelete invokes DELETE /Transaction/planed/u/{userId}/t/{transactionId} operation.
DELETE /Transaction/planed/u/{userId}/t/{transactionId}
func (*Client) TransactionPlanedUUserIdTTransactionIdPut ¶
func (c *Client) TransactionPlanedUUserIdTTransactionIdPut(ctx context.Context, request *ExternalTransaction, params TransactionPlanedUUserIdTTransactionIdPutParams) (*PlanedTransaction, error)
TransactionPlanedUUserIdTTransactionIdPut invokes PUT /Transaction/planed/u/{userId}/t/{transactionId} operation.
PUT /Transaction/planed/u/{userId}/t/{transactionId}
func (*Client) TransactionSendPost ¶
func (c *Client) TransactionSendPost(ctx context.Context, request *TransactionEvent) error
TransactionSendPost invokes POST /Transaction/send operation.
POST /Transaction/send
func (*Client) TransactionUUserIdGet ¶
func (c *Client) TransactionUUserIdGet(ctx context.Context, params TransactionUUserIdGetParams) ([]ExternalTransaction, error)
TransactionUUserIdGet invokes GET /Transaction/u/{userId} operation.
GET /Transaction/u/{userId}
func (*Client) UserUserIdGet ¶
UserUserIdGet invokes GET /User/{userId} operation.
Gets the user with the given id.
GET /User/{userId}
func (*Client) UserUserIdOwnsLongestPost ¶
func (c *Client) UserUserIdOwnsLongestPost(ctx context.Context, request []string, params UserUserIdOwnsLongestPostParams) (time.Time, error)
UserUserIdOwnsLongestPost invokes POST /User/{userId}/owns/longest operation.
Returns the bigest time out of a list of product ids.
POST /User/{userId}/owns/longest
func (*Client) UserUserIdOwnsPost
deprecated
func (c *Client) UserUserIdOwnsPost(ctx context.Context, request []string, params UserUserIdOwnsPostParams) ([]OwnerShip, error)
UserUserIdOwnsPost invokes POST /User/{userId}/owns operation.
Returns all ownership data for an user out of a list of interested.
Deprecated: schema marks this operation as deprecated.
POST /User/{userId}/owns
func (*Client) UserUserIdOwnsProductSlugUntilGet ¶
func (c *Client) UserUserIdOwnsProductSlugUntilGet(ctx context.Context, params UserUserIdOwnsProductSlugUntilGetParams) (time.Time, error)
UserUserIdOwnsProductSlugUntilGet invokes GET /User/{userId}/owns/{productSlug}/until operation.
Returns the time for how long a user owns a given product.
GET /User/{userId}/owns/{productSlug}/until
func (*Client) UserUserIdOwnsUntilPost ¶
func (c *Client) UserUserIdOwnsUntilPost(ctx context.Context, request []string, params UserUserIdOwnsUntilPostParams) (UserUserIdOwnsUntilPostOKApplicationJSON, error)
UserUserIdOwnsUntilPost invokes POST /User/{userId}/owns/until operation.
Returns all ownership data for an user out of a list of interested.
POST /User/{userId}/owns/until
func (*Client) UserUserIdPost ¶
UserUserIdPost invokes POST /User/{userId} operation.
Creates a new user with the given id.
POST /User/{userId}
func (*Client) UserUserIdPurchaseProductSlugPost ¶
func (c *Client) UserUserIdPurchaseProductSlugPost(ctx context.Context, params UserUserIdPurchaseProductSlugPostParams) (*User, error)
UserUserIdPurchaseProductSlugPost invokes POST /User/{userId}/purchase/{productSlug} operation.
Purchase a new product if enough funds are available.
POST /User/{userId}/purchase/{productSlug}
func (*Client) UserUserIdServicePurchaseProductSlugPost ¶
func (c *Client) UserUserIdServicePurchaseProductSlugPost(ctx context.Context, params UserUserIdServicePurchaseProductSlugPostParams) (*User, error)
UserUserIdServicePurchaseProductSlugPost invokes POST /User/{userId}/service/purchase/{productSlug} operation.
Purchase/extends a service if enough funds are available.
POST /User/{userId}/service/purchase/{productSlug}
func (*Client) UserUserIdTransactionIdDelete ¶
func (c *Client) UserUserIdTransactionIdDelete(ctx context.Context, params UserUserIdTransactionIdDeleteParams) (*User, error)
UserUserIdTransactionIdDelete invokes DELETE /User/{userId}/{transactionId} operation.
Undo the purchase of a service.
DELETE /User/{userId}/{transactionId}
func (*Client) UserUserIdTransferPost ¶
func (c *Client) UserUserIdTransferPost(ctx context.Context, request *TransferRequest, params UserUserIdTransferPostParams) (*TransactionEvent, error)
UserUserIdTransferPost invokes POST /User/{userId}/transfer operation.
Transfers coins to another user.
POST /User/{userId}/transfer
type ClientOption ¶
type ClientOption interface {
// contains filtered or unexported methods
}
ClientOption is client config option.
func WithClient ¶
func WithClient(client ht.Client) ClientOption
WithClient specifies http client to use.
type Compensation ¶
type Compensation struct { // The product id owners of which to compensate. ProductId OptNilString `json:"productId"` // A reason for the compensation, also serves as double compensation prevention. Reference OptNilString `json:"reference"` // How much to compensate. Amount OptInt32 `json:"amount"` // At what time ownership of Coflnet.Payments.Models.Product should be looked for (services might // expired since). When OptDateTime `json:"when"` }
Compensation for some kind of incident. Ref: #/components/schemas/Compensation
func (*Compensation) Decode ¶
func (s *Compensation) Decode(d *jx.Decoder) error
Decode decodes Compensation from json.
func (*Compensation) Encode ¶
func (s *Compensation) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*Compensation) GetAmount ¶
func (s *Compensation) GetAmount() OptInt32
GetAmount returns the value of Amount.
func (*Compensation) GetProductId ¶
func (s *Compensation) GetProductId() OptNilString
GetProductId returns the value of ProductId.
func (*Compensation) GetReference ¶
func (s *Compensation) GetReference() OptNilString
GetReference returns the value of Reference.
func (*Compensation) GetWhen ¶
func (s *Compensation) GetWhen() OptDateTime
GetWhen returns the value of When.
func (*Compensation) MarshalJSON ¶
func (s *Compensation) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*Compensation) SetAmount ¶
func (s *Compensation) SetAmount(val OptInt32)
SetAmount sets the value of Amount.
func (*Compensation) SetProductId ¶
func (s *Compensation) SetProductId(val OptNilString)
SetProductId sets the value of ProductId.
func (*Compensation) SetReference ¶
func (s *Compensation) SetReference(val OptNilString)
SetReference sets the value of Reference.
func (*Compensation) SetWhen ¶
func (s *Compensation) SetWhen(val OptDateTime)
SetWhen sets the value of When.
func (*Compensation) UnmarshalJSON ¶
func (s *Compensation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CustomTopUp ¶
type CustomTopUp struct { // What product this coresponds to (the product can define additional information). ProductId OptNilString `json:"productId"` // How much to add/substract. Amount OptInt64 `json:"amount"` // Reference/Reason this topup took place, dupplicates will be rejected. Reference OptNilString `json:"reference"` }
Represents a custom adjustment to an users balance. Ref: #/components/schemas/CustomTopUp
func (*CustomTopUp) Decode ¶
func (s *CustomTopUp) Decode(d *jx.Decoder) error
Decode decodes CustomTopUp from json.
func (*CustomTopUp) Encode ¶
func (s *CustomTopUp) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CustomTopUp) GetAmount ¶
func (s *CustomTopUp) GetAmount() OptInt64
GetAmount returns the value of Amount.
func (*CustomTopUp) GetProductId ¶
func (s *CustomTopUp) GetProductId() OptNilString
GetProductId returns the value of ProductId.
func (*CustomTopUp) GetReference ¶
func (s *CustomTopUp) GetReference() OptNilString
GetReference returns the value of Reference.
func (*CustomTopUp) MarshalJSON ¶
func (s *CustomTopUp) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CustomTopUp) SetAmount ¶
func (s *CustomTopUp) SetAmount(val OptInt64)
SetAmount sets the value of Amount.
func (*CustomTopUp) SetProductId ¶
func (s *CustomTopUp) SetProductId(val OptNilString)
SetProductId sets the value of ProductId.
func (*CustomTopUp) SetReference ¶
func (s *CustomTopUp) SetReference(val OptNilString)
SetReference sets the value of Reference.
func (*CustomTopUp) UnmarshalJSON ¶
func (s *CustomTopUp) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type ExternalTransaction ¶
type ExternalTransaction struct { ID OptNilString `json:"id"` ProductId OptNilString `json:"productId"` Reference OptNilString `json:"reference"` Amount OptFloat64 `json:"amount"` TimeStamp OptDateTime `json:"timeStamp"` }
Ref: #/components/schemas/ExternalTransaction
func (*ExternalTransaction) Decode ¶
func (s *ExternalTransaction) Decode(d *jx.Decoder) error
Decode decodes ExternalTransaction from json.
func (*ExternalTransaction) Encode ¶
func (s *ExternalTransaction) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ExternalTransaction) GetAmount ¶
func (s *ExternalTransaction) GetAmount() OptFloat64
GetAmount returns the value of Amount.
func (*ExternalTransaction) GetID ¶
func (s *ExternalTransaction) GetID() OptNilString
GetID returns the value of ID.
func (*ExternalTransaction) GetProductId ¶
func (s *ExternalTransaction) GetProductId() OptNilString
GetProductId returns the value of ProductId.
func (*ExternalTransaction) GetReference ¶
func (s *ExternalTransaction) GetReference() OptNilString
GetReference returns the value of Reference.
func (*ExternalTransaction) GetTimeStamp ¶
func (s *ExternalTransaction) GetTimeStamp() OptDateTime
GetTimeStamp returns the value of TimeStamp.
func (*ExternalTransaction) MarshalJSON ¶
func (s *ExternalTransaction) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ExternalTransaction) SetAmount ¶
func (s *ExternalTransaction) SetAmount(val OptFloat64)
SetAmount sets the value of Amount.
func (*ExternalTransaction) SetID ¶
func (s *ExternalTransaction) SetID(val OptNilString)
SetID sets the value of ID.
func (*ExternalTransaction) SetProductId ¶
func (s *ExternalTransaction) SetProductId(val OptNilString)
SetProductId sets the value of ProductId.
func (*ExternalTransaction) SetReference ¶
func (s *ExternalTransaction) SetReference(val OptNilString)
SetReference sets the value of Reference.
func (*ExternalTransaction) SetTimeStamp ¶
func (s *ExternalTransaction) SetTimeStamp(val OptDateTime)
SetTimeStamp sets the value of TimeStamp.
func (*ExternalTransaction) UnmarshalJSON ¶
func (s *ExternalTransaction) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ExternalTransaction) Validate ¶
func (s *ExternalTransaction) Validate() error
type Group ¶
type Group struct { // Primary Key. ID OptInt32 `json:"id"` // Identifier of this group. Slug OptNilString `json:"slug"` // Products in this group. Products OptNilProductArray `json:"products"` }
A group is a collection of one or more Coflnet.Payments.Models.Product. Ref: #/components/schemas/Group
func (*Group) GetProducts ¶
func (s *Group) GetProducts() OptNilProductArray
GetProducts returns the value of Products.
func (*Group) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Group) SetProducts ¶
func (s *Group) SetProducts(val OptNilProductArray)
SetProducts sets the value of Products.
func (*Group) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type GroupGetParams ¶
GroupGetParams is parameters of GET /Group operation.
type GroupGroupSlugDeleteParams ¶
type GroupGroupSlugDeleteParams struct {
GroupSlug string
}
GroupGroupSlugDeleteParams is parameters of DELETE /Group/{groupSlug} operation.
type GroupGroupSlugGetParams ¶
type GroupGroupSlugGetParams struct {
GroupSlug string
}
GroupGroupSlugGetParams is parameters of GET /Group/{groupSlug} operation.
type GroupGroupSlugProductsDeleteParams ¶
type GroupGroupSlugProductsDeleteParams struct {
GroupSlug string
}
GroupGroupSlugProductsDeleteParams is parameters of DELETE /Group/{groupSlug}/products operation.
type GroupGroupSlugProductsPostParams ¶
type GroupGroupSlugProductsPostParams struct {
GroupSlug string
}
GroupGroupSlugProductsPostParams is parameters of POST /Group/{groupSlug}/products operation.
type GroupGroupSlugPutParams ¶
type GroupGroupSlugPutParams struct {
GroupSlug string
}
GroupGroupSlugPutParams is parameters of PUT /Group/{groupSlug} operation.
type Handler ¶
type Handler interface { // ApplyPost implements POST /Apply operation. // // Brings all products, groups and roles into the given state // will disable/delete anything not present so use carefully. // // POST /Apply ApplyPost(ctx context.Context, req *SystemState) error // CallbackPaypalPost implements POST /Callback/paypal operation. // // Accept callbacks from paypal. // // POST /Callback/paypal CallbackPaypalPost(ctx context.Context) error // CallbackStripePost implements POST /Callback/stripe operation. // // Webhook callback for stripe. // // POST /Callback/stripe CallbackStripePost(ctx context.Context) error // GroupGet implements GET /Group operation. // // GET /Group GroupGet(ctx context.Context, params GroupGetParams) ([]Group, error) // GroupGroupSlugDelete implements DELETE /Group/{groupSlug} operation. // // DELETE /Group/{groupSlug} GroupGroupSlugDelete(ctx context.Context, params GroupGroupSlugDeleteParams) (*Group, error) // GroupGroupSlugGet implements GET /Group/{groupSlug} operation. // // GET /Group/{groupSlug} GroupGroupSlugGet(ctx context.Context, params GroupGroupSlugGetParams) (*Group, error) // GroupGroupSlugProductsDelete implements DELETE /Group/{groupSlug}/products operation. // // DELETE /Group/{groupSlug}/products GroupGroupSlugProductsDelete(ctx context.Context, req []string, params GroupGroupSlugProductsDeleteParams) (*Group, error) // GroupGroupSlugProductsPost implements POST /Group/{groupSlug}/products operation. // // POST /Group/{groupSlug}/products GroupGroupSlugProductsPost(ctx context.Context, req []string, params GroupGroupSlugProductsPostParams) (*Group, error) // GroupGroupSlugPut implements PUT /Group/{groupSlug} operation. // // PUT /Group/{groupSlug} GroupGroupSlugPut(ctx context.Context, req *Group, params GroupGroupSlugPutParams) (*Group, error) // GroupPost implements POST /Group operation. // // POST /Group GroupPost(ctx context.Context, req *Group) (*Group, error) // ProductsGet implements GET /Products operation. // // Get all products. // // GET /Products ProductsGet(ctx context.Context, params ProductsGetParams) ([]PurchaseableProduct, error) // ProductsPProductSlugGet implements GET /Products/p/{productSlug} operation. // // Get the details of a product. // // GET /Products/p/{productSlug} ProductsPProductSlugGet(ctx context.Context, params ProductsPProductSlugGetParams) (*PurchaseableProduct, error) // ProductsPut implements PUT /Products operation. // // Updates a product by replacing it with a new one. // Old products can not be deleted to furfill accounting needs. // // PUT /Products ProductsPut(ctx context.Context, req *PurchaseableProduct) (*PurchaseableProduct, error) // ProductsServiceServiceSlugCountGet implements GET /Products/service/{serviceSlug}/count operation. // // Count of users owning a service. // // GET /Products/service/{serviceSlug}/count ProductsServiceServiceSlugCountGet(ctx context.Context, params ProductsServiceServiceSlugCountGetParams) (int32, error) // ProductsServiceServiceSlugIdsGet implements GET /Products/service/{serviceSlug}/ids operation. // // Gets all userIds owning a service. // // GET /Products/service/{serviceSlug}/ids ProductsServiceServiceSlugIdsGet(ctx context.Context, params ProductsServiceServiceSlugIdsGetParams) ([]string, error) // ProductsServicesGet implements GET /Products/services operation. // // Get services. // // GET /Products/services ProductsServicesGet(ctx context.Context, params ProductsServicesGetParams) ([]PurchaseableProduct, error) // ProductsTopupGet implements GET /Products/topup operation. // // Get topup options. // // GET /Products/topup ProductsTopupGet(ctx context.Context, params ProductsTopupGetParams) ([]TopUpProduct, error) // ProductsTopupPut implements PUT /Products/topup operation. // // Updates a topup option by replacing it with a new one. // Old options get a new slug and are marked as disabled. // // PUT /Products/topup ProductsTopupPut(ctx context.Context, req *TopUpProduct) (*TopUpProduct, error) // ProductsUserUserIdGet implements GET /Products/user/{userId} operation. // // Get adjusted prices for a user. // // GET /Products/user/{userId} ProductsUserUserIdGet(ctx context.Context, params ProductsUserUserIdGetParams) ([]RuleResult, error) // RulesGet implements GET /Rules operation. // // Returns all rules. // // GET /Rules RulesGet(ctx context.Context, params RulesGetParams) ([]Rule, error) // RulesPost implements POST /Rules operation. // // Creates a new rule. // // POST /Rules RulesPost(ctx context.Context, req *RuleCreate) (*Rule, error) // RulesRuleSlugDelete implements DELETE /Rules/{ruleSlug} operation. // // Deletes a rule. // // DELETE /Rules/{ruleSlug} RulesRuleSlugDelete(ctx context.Context, params RulesRuleSlugDeleteParams) (*Rule, error) // RulesRuleSlugGet implements GET /Rules/{ruleSlug} operation. // // Returns a rule by slug. // // GET /Rules/{ruleSlug} RulesRuleSlugGet(ctx context.Context, params RulesRuleSlugGetParams) (*Rule, error) // TopUpCompensatePost implements POST /TopUp/compensate operation. // // Compensates users of a service for something. // // POST /TopUp/compensate TopUpCompensatePost(ctx context.Context, req *Compensation) (*Int32Int32ValueTuple, error) // TopUpCustomPost implements POST /TopUp/custom operation. // // Creates a custom topup that is instantly credited. // // POST /TopUp/custom TopUpCustomPost(ctx context.Context, req *CustomTopUp, params TopUpCustomPostParams) (*TopUpIdResponse, error) // TopUpOptionsGet implements GET /TopUp/options operation. // // All available topup options. // // GET /TopUp/options TopUpOptionsGet(ctx context.Context) ([]TopUpProduct, error) // TopUpPaypalPost implements POST /TopUp/paypal operation. // // Creates a payment session with paypal. // // POST /TopUp/paypal TopUpPaypalPost(ctx context.Context, req *TopUpOptions, params TopUpPaypalPostParams) (*TopUpIdResponse, error) // TopUpStripePost implements POST /TopUp/stripe operation. // // Creates a payment session with stripe. // // POST /TopUp/stripe TopUpStripePost(ctx context.Context, req *TopUpOptions, params TopUpStripePostParams) (*TopUpIdResponse, error) // TransactionPlanedUUserIdGet implements GET /Transaction/planed/u/{userId} operation. // // GET /Transaction/planed/u/{userId} TransactionPlanedUUserIdGet(ctx context.Context, params TransactionPlanedUUserIdGetParams) ([]ExternalTransaction, error) // TransactionPlanedUUserIdPost implements POST /Transaction/planed/u/{userId} operation. // // POST /Transaction/planed/u/{userId} TransactionPlanedUUserIdPost(ctx context.Context, req *ExternalTransaction, params TransactionPlanedUUserIdPostParams) (*PlanedTransaction, error) // TransactionPlanedUUserIdTTransactionIdDelete implements DELETE /Transaction/planed/u/{userId}/t/{transactionId} operation. // // DELETE /Transaction/planed/u/{userId}/t/{transactionId} TransactionPlanedUUserIdTTransactionIdDelete(ctx context.Context, params TransactionPlanedUUserIdTTransactionIdDeleteParams) (*PlanedTransaction, error) // TransactionPlanedUUserIdTTransactionIdPut implements PUT /Transaction/planed/u/{userId}/t/{transactionId} operation. // // PUT /Transaction/planed/u/{userId}/t/{transactionId} TransactionPlanedUUserIdTTransactionIdPut(ctx context.Context, req *ExternalTransaction, params TransactionPlanedUUserIdTTransactionIdPutParams) (*PlanedTransaction, error) // TransactionSendPost implements POST /Transaction/send operation. // // POST /Transaction/send TransactionSendPost(ctx context.Context, req *TransactionEvent) error // TransactionUUserIdGet implements GET /Transaction/u/{userId} operation. // // GET /Transaction/u/{userId} TransactionUUserIdGet(ctx context.Context, params TransactionUUserIdGetParams) ([]ExternalTransaction, error) // UserUserIdGet implements GET /User/{userId} operation. // // Gets the user with the given id. // // GET /User/{userId} UserUserIdGet(ctx context.Context, params UserUserIdGetParams) (*User, error) // UserUserIdOwnsLongestPost implements POST /User/{userId}/owns/longest operation. // // Returns the bigest time out of a list of product ids. // // POST /User/{userId}/owns/longest UserUserIdOwnsLongestPost(ctx context.Context, req []string, params UserUserIdOwnsLongestPostParams) (time.Time, error) // UserUserIdOwnsPost implements POST /User/{userId}/owns operation. // // Returns all ownership data for an user out of a list of interested. // // Deprecated: schema marks this operation as deprecated. // // POST /User/{userId}/owns UserUserIdOwnsPost(ctx context.Context, req []string, params UserUserIdOwnsPostParams) ([]OwnerShip, error) // UserUserIdOwnsProductSlugUntilGet implements GET /User/{userId}/owns/{productSlug}/until operation. // // Returns the time for how long a user owns a given product. // // GET /User/{userId}/owns/{productSlug}/until UserUserIdOwnsProductSlugUntilGet(ctx context.Context, params UserUserIdOwnsProductSlugUntilGetParams) (time.Time, error) // UserUserIdOwnsUntilPost implements POST /User/{userId}/owns/until operation. // // Returns all ownership data for an user out of a list of interested. // // POST /User/{userId}/owns/until UserUserIdOwnsUntilPost(ctx context.Context, req []string, params UserUserIdOwnsUntilPostParams) (UserUserIdOwnsUntilPostOKApplicationJSON, error) // UserUserIdPost implements POST /User/{userId} operation. // // Creates a new user with the given id. // // POST /User/{userId} UserUserIdPost(ctx context.Context, params UserUserIdPostParams) (*User, error) // UserUserIdPurchaseProductSlugPost implements POST /User/{userId}/purchase/{productSlug} operation. // // Purchase a new product if enough funds are available. // // POST /User/{userId}/purchase/{productSlug} UserUserIdPurchaseProductSlugPost(ctx context.Context, params UserUserIdPurchaseProductSlugPostParams) (*User, error) // UserUserIdServicePurchaseProductSlugPost implements POST /User/{userId}/service/purchase/{productSlug} operation. // // Purchase/extends a service if enough funds are available. // // POST /User/{userId}/service/purchase/{productSlug} UserUserIdServicePurchaseProductSlugPost(ctx context.Context, params UserUserIdServicePurchaseProductSlugPostParams) (*User, error) // UserUserIdTransactionIdDelete implements DELETE /User/{userId}/{transactionId} operation. // // Undo the purchase of a service. // // DELETE /User/{userId}/{transactionId} UserUserIdTransactionIdDelete(ctx context.Context, params UserUserIdTransactionIdDeleteParams) (*User, error) // UserUserIdTransferPost implements POST /User/{userId}/transfer operation. // // Transfers coins to another user. // // POST /User/{userId}/transfer UserUserIdTransferPost(ctx context.Context, req *TransferRequest, params UserUserIdTransferPostParams) (*TransactionEvent, error) }
Handler handles operations described by OpenAPI v3 specification.
type Int32Int32ValueTuple ¶
Ref: #/components/schemas/Int32Int32ValueTuple
func (*Int32Int32ValueTuple) Decode ¶
func (s *Int32Int32ValueTuple) Decode(d *jx.Decoder) error
Decode decodes Int32Int32ValueTuple from json.
func (*Int32Int32ValueTuple) Encode ¶
func (s *Int32Int32ValueTuple) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*Int32Int32ValueTuple) GetItem1 ¶
func (s *Int32Int32ValueTuple) GetItem1() OptInt32
GetItem1 returns the value of Item1.
func (*Int32Int32ValueTuple) GetItem2 ¶
func (s *Int32Int32ValueTuple) GetItem2() OptInt32
GetItem2 returns the value of Item2.
func (*Int32Int32ValueTuple) MarshalJSON ¶
func (s *Int32Int32ValueTuple) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*Int32Int32ValueTuple) SetItem1 ¶
func (s *Int32Int32ValueTuple) SetItem1(val OptInt32)
SetItem1 sets the value of Item1.
func (*Int32Int32ValueTuple) SetItem2 ¶
func (s *Int32Int32ValueTuple) SetItem2(val OptInt32)
SetItem2 sets the value of Item2.
func (*Int32Int32ValueTuple) UnmarshalJSON ¶
func (s *Int32Int32ValueTuple) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptDateTime ¶
OptDateTime is optional time.Time.
func NewOptDateTime ¶
func NewOptDateTime(v time.Time) OptDateTime
NewOptDateTime returns new OptDateTime with value set to v.
func (OptDateTime) Get ¶
func (o OptDateTime) Get() (v time.Time, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptDateTime) IsSet ¶
func (o OptDateTime) IsSet() bool
IsSet returns true if OptDateTime was set.
func (OptDateTime) MarshalJSON ¶
func (s OptDateTime) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptDateTime) Or ¶
func (o OptDateTime) Or(d time.Time) time.Time
Or returns value if set, or given parameter if does not.
func (*OptDateTime) UnmarshalJSON ¶
func (s *OptDateTime) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptFloat64 ¶
OptFloat64 is optional float64.
func NewOptFloat64 ¶
func NewOptFloat64(v float64) OptFloat64
NewOptFloat64 returns new OptFloat64 with value set to v.
func (*OptFloat64) Decode ¶
func (o *OptFloat64) Decode(d *jx.Decoder) error
Decode decodes float64 from json.
func (OptFloat64) Encode ¶
func (o OptFloat64) Encode(e *jx.Encoder)
Encode encodes float64 as json.
func (OptFloat64) Get ¶
func (o OptFloat64) Get() (v float64, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptFloat64) IsSet ¶
func (o OptFloat64) IsSet() bool
IsSet returns true if OptFloat64 was set.
func (OptFloat64) MarshalJSON ¶
func (s OptFloat64) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptFloat64) Or ¶
func (o OptFloat64) Or(d float64) float64
Or returns value if set, or given parameter if does not.
func (*OptFloat64) UnmarshalJSON ¶
func (s *OptFloat64) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptGroup ¶
OptGroup is optional Group.
func NewOptGroup ¶
NewOptGroup returns new OptGroup with value set to v.
func (OptGroup) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptGroup) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptInt32 ¶
OptInt32 is optional int32.
func NewOptInt32 ¶
NewOptInt32 returns new OptInt32 with value set to v.
func (OptInt32) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptInt32) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptInt64 ¶
OptInt64 is optional int64.
func NewOptInt64 ¶
NewOptInt64 returns new OptInt64 with value set to v.
func (OptInt64) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptInt64) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilOwnerShipArray ¶
OptNilOwnerShipArray is optional nullable []OwnerShip.
func NewOptNilOwnerShipArray ¶
func NewOptNilOwnerShipArray(v []OwnerShip) OptNilOwnerShipArray
NewOptNilOwnerShipArray returns new OptNilOwnerShipArray with value set to v.
func (*OptNilOwnerShipArray) Decode ¶
func (o *OptNilOwnerShipArray) Decode(d *jx.Decoder) error
Decode decodes []OwnerShip from json.
func (OptNilOwnerShipArray) Encode ¶
func (o OptNilOwnerShipArray) Encode(e *jx.Encoder)
Encode encodes []OwnerShip as json.
func (OptNilOwnerShipArray) Get ¶
func (o OptNilOwnerShipArray) Get() (v []OwnerShip, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilOwnerShipArray) IsNull ¶
func (o OptNilOwnerShipArray) IsNull() bool
IsSet returns true if value is Null.
func (OptNilOwnerShipArray) IsSet ¶
func (o OptNilOwnerShipArray) IsSet() bool
IsSet returns true if OptNilOwnerShipArray was set.
func (OptNilOwnerShipArray) MarshalJSON ¶
func (s OptNilOwnerShipArray) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilOwnerShipArray) Or ¶
func (o OptNilOwnerShipArray) Or(d []OwnerShip) []OwnerShip
Or returns value if set, or given parameter if does not.
func (*OptNilOwnerShipArray) SetTo ¶
func (o *OptNilOwnerShipArray) SetTo(v []OwnerShip)
SetTo sets value to v.
func (*OptNilOwnerShipArray) UnmarshalJSON ¶
func (s *OptNilOwnerShipArray) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilProductArray ¶
OptNilProductArray is optional nullable []Product.
func NewOptNilProductArray ¶
func NewOptNilProductArray(v []Product) OptNilProductArray
NewOptNilProductArray returns new OptNilProductArray with value set to v.
func (*OptNilProductArray) Decode ¶
func (o *OptNilProductArray) Decode(d *jx.Decoder) error
Decode decodes []Product from json.
func (OptNilProductArray) Encode ¶
func (o OptNilProductArray) Encode(e *jx.Encoder)
Encode encodes []Product as json.
func (OptNilProductArray) Get ¶
func (o OptNilProductArray) Get() (v []Product, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilProductArray) IsNull ¶
func (o OptNilProductArray) IsNull() bool
IsSet returns true if value is Null.
func (OptNilProductArray) IsSet ¶
func (o OptNilProductArray) IsSet() bool
IsSet returns true if OptNilProductArray was set.
func (OptNilProductArray) MarshalJSON ¶
func (s OptNilProductArray) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilProductArray) Or ¶
func (o OptNilProductArray) Or(d []Product) []Product
Or returns value if set, or given parameter if does not.
func (*OptNilProductArray) SetTo ¶
func (o *OptNilProductArray) SetTo(v []Product)
SetTo sets value to v.
func (*OptNilProductArray) UnmarshalJSON ¶
func (s *OptNilProductArray) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilPurchaseableProductArray ¶
type OptNilPurchaseableProductArray struct { Value []PurchaseableProduct Set bool Null bool }
OptNilPurchaseableProductArray is optional nullable []PurchaseableProduct.
func NewOptNilPurchaseableProductArray ¶
func NewOptNilPurchaseableProductArray(v []PurchaseableProduct) OptNilPurchaseableProductArray
NewOptNilPurchaseableProductArray returns new OptNilPurchaseableProductArray with value set to v.
func (*OptNilPurchaseableProductArray) Decode ¶
func (o *OptNilPurchaseableProductArray) Decode(d *jx.Decoder) error
Decode decodes []PurchaseableProduct from json.
func (OptNilPurchaseableProductArray) Encode ¶
func (o OptNilPurchaseableProductArray) Encode(e *jx.Encoder)
Encode encodes []PurchaseableProduct as json.
func (OptNilPurchaseableProductArray) Get ¶
func (o OptNilPurchaseableProductArray) Get() (v []PurchaseableProduct, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilPurchaseableProductArray) IsNull ¶
func (o OptNilPurchaseableProductArray) IsNull() bool
IsSet returns true if value is Null.
func (OptNilPurchaseableProductArray) IsSet ¶
func (o OptNilPurchaseableProductArray) IsSet() bool
IsSet returns true if OptNilPurchaseableProductArray was set.
func (OptNilPurchaseableProductArray) MarshalJSON ¶
func (s OptNilPurchaseableProductArray) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilPurchaseableProductArray) Or ¶
func (o OptNilPurchaseableProductArray) Or(d []PurchaseableProduct) []PurchaseableProduct
Or returns value if set, or given parameter if does not.
func (*OptNilPurchaseableProductArray) Reset ¶
func (o *OptNilPurchaseableProductArray) Reset()
Reset unsets value.
func (*OptNilPurchaseableProductArray) SetTo ¶
func (o *OptNilPurchaseableProductArray) SetTo(v []PurchaseableProduct)
SetTo sets value to v.
func (*OptNilPurchaseableProductArray) UnmarshalJSON ¶
func (s *OptNilPurchaseableProductArray) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilRuleArray ¶
OptNilRuleArray is optional nullable []Rule.
func NewOptNilRuleArray ¶
func NewOptNilRuleArray(v []Rule) OptNilRuleArray
NewOptNilRuleArray returns new OptNilRuleArray with value set to v.
func (*OptNilRuleArray) Decode ¶
func (o *OptNilRuleArray) Decode(d *jx.Decoder) error
Decode decodes []Rule from json.
func (OptNilRuleArray) Encode ¶
func (o OptNilRuleArray) Encode(e *jx.Encoder)
Encode encodes []Rule as json.
func (OptNilRuleArray) Get ¶
func (o OptNilRuleArray) Get() (v []Rule, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilRuleArray) IsNull ¶
func (o OptNilRuleArray) IsNull() bool
IsSet returns true if value is Null.
func (OptNilRuleArray) IsSet ¶
func (o OptNilRuleArray) IsSet() bool
IsSet returns true if OptNilRuleArray was set.
func (OptNilRuleArray) MarshalJSON ¶
func (s OptNilRuleArray) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilRuleArray) Or ¶
func (o OptNilRuleArray) Or(d []Rule) []Rule
Or returns value if set, or given parameter if does not.
func (*OptNilRuleArray) UnmarshalJSON ¶
func (s *OptNilRuleArray) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilRuleCreateArray ¶
type OptNilRuleCreateArray struct { Value []RuleCreate Set bool Null bool }
OptNilRuleCreateArray is optional nullable []RuleCreate.
func NewOptNilRuleCreateArray ¶
func NewOptNilRuleCreateArray(v []RuleCreate) OptNilRuleCreateArray
NewOptNilRuleCreateArray returns new OptNilRuleCreateArray with value set to v.
func (*OptNilRuleCreateArray) Decode ¶
func (o *OptNilRuleCreateArray) Decode(d *jx.Decoder) error
Decode decodes []RuleCreate from json.
func (OptNilRuleCreateArray) Encode ¶
func (o OptNilRuleCreateArray) Encode(e *jx.Encoder)
Encode encodes []RuleCreate as json.
func (OptNilRuleCreateArray) Get ¶
func (o OptNilRuleCreateArray) Get() (v []RuleCreate, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilRuleCreateArray) IsNull ¶
func (o OptNilRuleCreateArray) IsNull() bool
IsSet returns true if value is Null.
func (OptNilRuleCreateArray) IsSet ¶
func (o OptNilRuleCreateArray) IsSet() bool
IsSet returns true if OptNilRuleCreateArray was set.
func (OptNilRuleCreateArray) MarshalJSON ¶
func (s OptNilRuleCreateArray) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilRuleCreateArray) Or ¶
func (o OptNilRuleCreateArray) Or(d []RuleCreate) []RuleCreate
Or returns value if set, or given parameter if does not.
func (*OptNilRuleCreateArray) SetTo ¶
func (o *OptNilRuleCreateArray) SetTo(v []RuleCreate)
SetTo sets value to v.
func (*OptNilRuleCreateArray) UnmarshalJSON ¶
func (s *OptNilRuleCreateArray) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilString ¶
OptNilString is optional nullable string.
func NewOptNilString ¶
func NewOptNilString(v string) OptNilString
NewOptNilString returns new OptNilString with value set to v.
func (*OptNilString) Decode ¶
func (o *OptNilString) Decode(d *jx.Decoder) error
Decode decodes string from json.
func (OptNilString) Encode ¶
func (o OptNilString) Encode(e *jx.Encoder)
Encode encodes string as json.
func (OptNilString) Get ¶
func (o OptNilString) Get() (v string, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilString) IsNull ¶
func (o OptNilString) IsNull() bool
IsSet returns true if value is Null.
func (OptNilString) IsSet ¶
func (o OptNilString) IsSet() bool
IsSet returns true if OptNilString was set.
func (OptNilString) MarshalJSON ¶
func (s OptNilString) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilString) Or ¶
func (o OptNilString) Or(d string) string
Or returns value if set, or given parameter if does not.
func (*OptNilString) UnmarshalJSON ¶
func (s *OptNilString) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilSystemStateGroups ¶
type OptNilSystemStateGroups struct { Value SystemStateGroups Set bool Null bool }
OptNilSystemStateGroups is optional nullable SystemStateGroups.
func NewOptNilSystemStateGroups ¶
func NewOptNilSystemStateGroups(v SystemStateGroups) OptNilSystemStateGroups
NewOptNilSystemStateGroups returns new OptNilSystemStateGroups with value set to v.
func (*OptNilSystemStateGroups) Decode ¶
func (o *OptNilSystemStateGroups) Decode(d *jx.Decoder) error
Decode decodes SystemStateGroups from json.
func (OptNilSystemStateGroups) Encode ¶
func (o OptNilSystemStateGroups) Encode(e *jx.Encoder)
Encode encodes SystemStateGroups as json.
func (OptNilSystemStateGroups) Get ¶
func (o OptNilSystemStateGroups) Get() (v SystemStateGroups, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilSystemStateGroups) IsNull ¶
func (o OptNilSystemStateGroups) IsNull() bool
IsSet returns true if value is Null.
func (OptNilSystemStateGroups) IsSet ¶
func (o OptNilSystemStateGroups) IsSet() bool
IsSet returns true if OptNilSystemStateGroups was set.
func (OptNilSystemStateGroups) MarshalJSON ¶
func (s OptNilSystemStateGroups) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilSystemStateGroups) Or ¶
func (o OptNilSystemStateGroups) Or(d SystemStateGroups) SystemStateGroups
Or returns value if set, or given parameter if does not.
func (*OptNilSystemStateGroups) Reset ¶
func (o *OptNilSystemStateGroups) Reset()
Reset unsets value.
func (*OptNilSystemStateGroups) SetTo ¶
func (o *OptNilSystemStateGroups) SetTo(v SystemStateGroups)
SetTo sets value to v.
func (*OptNilSystemStateGroups) UnmarshalJSON ¶
func (s *OptNilSystemStateGroups) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilTopUpProductArray ¶
type OptNilTopUpProductArray struct { Value []TopUpProduct Set bool Null bool }
OptNilTopUpProductArray is optional nullable []TopUpProduct.
func NewOptNilTopUpProductArray ¶
func NewOptNilTopUpProductArray(v []TopUpProduct) OptNilTopUpProductArray
NewOptNilTopUpProductArray returns new OptNilTopUpProductArray with value set to v.
func (*OptNilTopUpProductArray) Decode ¶
func (o *OptNilTopUpProductArray) Decode(d *jx.Decoder) error
Decode decodes []TopUpProduct from json.
func (OptNilTopUpProductArray) Encode ¶
func (o OptNilTopUpProductArray) Encode(e *jx.Encoder)
Encode encodes []TopUpProduct as json.
func (OptNilTopUpProductArray) Get ¶
func (o OptNilTopUpProductArray) Get() (v []TopUpProduct, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilTopUpProductArray) IsNull ¶
func (o OptNilTopUpProductArray) IsNull() bool
IsSet returns true if value is Null.
func (OptNilTopUpProductArray) IsSet ¶
func (o OptNilTopUpProductArray) IsSet() bool
IsSet returns true if OptNilTopUpProductArray was set.
func (OptNilTopUpProductArray) MarshalJSON ¶
func (s OptNilTopUpProductArray) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilTopUpProductArray) Or ¶
func (o OptNilTopUpProductArray) Or(d []TopUpProduct) []TopUpProduct
Or returns value if set, or given parameter if does not.
func (*OptNilTopUpProductArray) Reset ¶
func (o *OptNilTopUpProductArray) Reset()
Reset unsets value.
func (*OptNilTopUpProductArray) SetTo ¶
func (o *OptNilTopUpProductArray) SetTo(v []TopUpProduct)
SetTo sets value to v.
func (*OptNilTopUpProductArray) UnmarshalJSON ¶
func (s *OptNilTopUpProductArray) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptProduct ¶
OptProduct is optional Product.
func NewOptProduct ¶
func NewOptProduct(v Product) OptProduct
NewOptProduct returns new OptProduct with value set to v.
func (*OptProduct) Decode ¶
func (o *OptProduct) Decode(d *jx.Decoder) error
Decode decodes Product from json.
func (OptProduct) Encode ¶
func (o OptProduct) Encode(e *jx.Encoder)
Encode encodes Product as json.
func (OptProduct) Get ¶
func (o OptProduct) Get() (v Product, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptProduct) IsSet ¶
func (o OptProduct) IsSet() bool
IsSet returns true if OptProduct was set.
func (OptProduct) MarshalJSON ¶
func (s OptProduct) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptProduct) Or ¶
func (o OptProduct) Or(d Product) Product
Or returns value if set, or given parameter if does not.
func (*OptProduct) UnmarshalJSON ¶
func (s *OptProduct) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptProductType ¶
type OptProductType struct { Value ProductType Set bool }
OptProductType is optional ProductType.
func NewOptProductType ¶
func NewOptProductType(v ProductType) OptProductType
NewOptProductType returns new OptProductType with value set to v.
func (*OptProductType) Decode ¶
func (o *OptProductType) Decode(d *jx.Decoder) error
Decode decodes ProductType from json.
func (OptProductType) Encode ¶
func (o OptProductType) Encode(e *jx.Encoder)
Encode encodes ProductType as json.
func (OptProductType) Get ¶
func (o OptProductType) Get() (v ProductType, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptProductType) IsSet ¶
func (o OptProductType) IsSet() bool
IsSet returns true if OptProductType was set.
func (OptProductType) MarshalJSON ¶
func (s OptProductType) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptProductType) Or ¶
func (o OptProductType) Or(d ProductType) ProductType
Or returns value if set, or given parameter if does not.
func (*OptProductType) UnmarshalJSON ¶
func (s *OptProductType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptPurchaseableProduct ¶
type OptPurchaseableProduct struct { Value PurchaseableProduct Set bool }
OptPurchaseableProduct is optional PurchaseableProduct.
func NewOptPurchaseableProduct ¶
func NewOptPurchaseableProduct(v PurchaseableProduct) OptPurchaseableProduct
NewOptPurchaseableProduct returns new OptPurchaseableProduct with value set to v.
func (*OptPurchaseableProduct) Decode ¶
func (o *OptPurchaseableProduct) Decode(d *jx.Decoder) error
Decode decodes PurchaseableProduct from json.
func (OptPurchaseableProduct) Encode ¶
func (o OptPurchaseableProduct) Encode(e *jx.Encoder)
Encode encodes PurchaseableProduct as json.
func (OptPurchaseableProduct) Get ¶
func (o OptPurchaseableProduct) Get() (v PurchaseableProduct, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptPurchaseableProduct) IsSet ¶
func (o OptPurchaseableProduct) IsSet() bool
IsSet returns true if OptPurchaseableProduct was set.
func (OptPurchaseableProduct) MarshalJSON ¶
func (s OptPurchaseableProduct) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptPurchaseableProduct) Or ¶
func (o OptPurchaseableProduct) Or(d PurchaseableProduct) PurchaseableProduct
Or returns value if set, or given parameter if does not.
func (*OptPurchaseableProduct) SetTo ¶
func (o *OptPurchaseableProduct) SetTo(v PurchaseableProduct)
SetTo sets value to v.
func (*OptPurchaseableProduct) UnmarshalJSON ¶
func (s *OptPurchaseableProduct) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptRuleFlags ¶
OptRuleFlags is optional RuleFlags.
func NewOptRuleFlags ¶
func NewOptRuleFlags(v RuleFlags) OptRuleFlags
NewOptRuleFlags returns new OptRuleFlags with value set to v.
func (*OptRuleFlags) Decode ¶
func (o *OptRuleFlags) Decode(d *jx.Decoder) error
Decode decodes RuleFlags from json.
func (OptRuleFlags) Encode ¶
func (o OptRuleFlags) Encode(e *jx.Encoder)
Encode encodes RuleFlags as json.
func (OptRuleFlags) Get ¶
func (o OptRuleFlags) Get() (v RuleFlags, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptRuleFlags) IsSet ¶
func (o OptRuleFlags) IsSet() bool
IsSet returns true if OptRuleFlags was set.
func (OptRuleFlags) MarshalJSON ¶
func (s OptRuleFlags) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptRuleFlags) Or ¶
func (o OptRuleFlags) Or(d RuleFlags) RuleFlags
Or returns value if set, or given parameter if does not.
func (*OptRuleFlags) UnmarshalJSON ¶
func (s *OptRuleFlags) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptString ¶
OptString is optional string.
func NewOptString ¶
NewOptString returns new OptString with value set to v.
type Option ¶
type Option interface { ServerOption ClientOption }
Option is config option.
func WithMeterProvider ¶
func WithMeterProvider(provider metric.MeterProvider) Option
WithMeterProvider specifies a meter provider to use for creating a meter.
If none is specified, the metric.NewNoopMeterProvider is used.
func WithTracerProvider ¶
func WithTracerProvider(provider trace.TracerProvider) Option
WithTracerProvider specifies a tracer provider to use for creating a tracer.
If none is specified, the global provider is used.
type OwnerShip ¶
type OwnerShip struct { // Primary Id. ID OptInt64 `json:"id"` Product OptPurchaseableProduct `json:"product"` // How long. Expires OptDateTime `json:"expires"` }
Represents an ownership of some product by some user. Has the time of when the ownership expires. Ref: #/components/schemas/OwnerShip
func (*OwnerShip) GetExpires ¶
func (s *OwnerShip) GetExpires() OptDateTime
GetExpires returns the value of Expires.
func (*OwnerShip) GetProduct ¶
func (s *OwnerShip) GetProduct() OptPurchaseableProduct
GetProduct returns the value of Product.
func (*OwnerShip) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OwnerShip) SetExpires ¶
func (s *OwnerShip) SetExpires(val OptDateTime)
SetExpires sets the value of Expires.
func (*OwnerShip) SetProduct ¶
func (s *OwnerShip) SetProduct(val OptPurchaseableProduct)
SetProduct sets the value of Product.
func (*OwnerShip) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type PlanedTransaction ¶
type PlanedTransaction struct { // Primary Id. ID OptInt64 `json:"id"` Product OptProduct `json:"product"` // The size of the transaction. Amount OptFloat64 `json:"amount"` // Custom reference data for this transaction. // External identifiers, notes, metadata. Reference OptNilString `json:"reference"` // Timestamp of this transaction. Timestamp OptDateTime `json:"timestamp"` }
A empheral transaction that can still be changed. Intended for invoices that may still be canceled or bidding. Ref: #/components/schemas/PlanedTransaction
func (*PlanedTransaction) Decode ¶
func (s *PlanedTransaction) Decode(d *jx.Decoder) error
Decode decodes PlanedTransaction from json.
func (*PlanedTransaction) Encode ¶
func (s *PlanedTransaction) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*PlanedTransaction) GetAmount ¶
func (s *PlanedTransaction) GetAmount() OptFloat64
GetAmount returns the value of Amount.
func (*PlanedTransaction) GetID ¶
func (s *PlanedTransaction) GetID() OptInt64
GetID returns the value of ID.
func (*PlanedTransaction) GetProduct ¶
func (s *PlanedTransaction) GetProduct() OptProduct
GetProduct returns the value of Product.
func (*PlanedTransaction) GetReference ¶
func (s *PlanedTransaction) GetReference() OptNilString
GetReference returns the value of Reference.
func (*PlanedTransaction) GetTimestamp ¶
func (s *PlanedTransaction) GetTimestamp() OptDateTime
GetTimestamp returns the value of Timestamp.
func (*PlanedTransaction) MarshalJSON ¶
func (s *PlanedTransaction) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*PlanedTransaction) SetAmount ¶
func (s *PlanedTransaction) SetAmount(val OptFloat64)
SetAmount sets the value of Amount.
func (*PlanedTransaction) SetID ¶
func (s *PlanedTransaction) SetID(val OptInt64)
SetID sets the value of ID.
func (*PlanedTransaction) SetProduct ¶
func (s *PlanedTransaction) SetProduct(val OptProduct)
SetProduct sets the value of Product.
func (*PlanedTransaction) SetReference ¶
func (s *PlanedTransaction) SetReference(val OptNilString)
SetReference sets the value of Reference.
func (*PlanedTransaction) SetTimestamp ¶
func (s *PlanedTransaction) SetTimestamp(val OptDateTime)
SetTimestamp sets the value of Timestamp.
func (*PlanedTransaction) UnmarshalJSON ¶
func (s *PlanedTransaction) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*PlanedTransaction) Validate ¶
func (s *PlanedTransaction) Validate() error
type Product ¶
type Product struct { // Primary Key. ID OptInt32 `json:"id"` // Title of this product. Title OptNilString `json:"title"` // Unique Slug for this product. Slug OptNilString `json:"slug"` // DB-Level description may not be displayed to the end user directly (localisation n stuff). Description OptNilString `json:"description"` // The exact amount this product costs to purchase. Cost OptFloat64 `json:"cost"` // How long this product is owned by an user in seconds. OwnershipSeconds OptInt64 `json:"ownershipSeconds"` Type OptProductType `json:"type"` }
Base class for Products. Ref: #/components/schemas/Product
func (*Product) GetDescription ¶
func (s *Product) GetDescription() OptNilString
GetDescription returns the value of Description.
func (*Product) GetOwnershipSeconds ¶
GetOwnershipSeconds returns the value of OwnershipSeconds.
func (*Product) GetSlug ¶
func (s *Product) GetSlug() OptNilString
GetSlug returns the value of Slug.
func (*Product) GetTitle ¶
func (s *Product) GetTitle() OptNilString
GetTitle returns the value of Title.
func (*Product) GetType ¶
func (s *Product) GetType() OptProductType
GetType returns the value of Type.
func (*Product) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Product) SetDescription ¶
func (s *Product) SetDescription(val OptNilString)
SetDescription sets the value of Description.
func (*Product) SetOwnershipSeconds ¶
SetOwnershipSeconds sets the value of OwnershipSeconds.
func (*Product) SetSlug ¶
func (s *Product) SetSlug(val OptNilString)
SetSlug sets the value of Slug.
func (*Product) SetTitle ¶
func (s *Product) SetTitle(val OptNilString)
SetTitle sets the value of Title.
func (*Product) SetType ¶
func (s *Product) SetType(val OptProductType)
SetType sets the value of Type.
func (*Product) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type ProductType ¶
type ProductType struct { Type ProductTypeType // switch on this field String string Int int }
Types of products. Ref: #/components/schemas/ProductType ProductType represents sum type.
func NewIntProductType ¶
func NewIntProductType(v int) ProductType
NewIntProductType returns new ProductType from int.
func NewStringProductType ¶
func NewStringProductType(v string) ProductType
NewStringProductType returns new ProductType from string.
func (*ProductType) Decode ¶
func (s *ProductType) Decode(d *jx.Decoder) error
Decode decodes ProductType from json.
func (ProductType) Encode ¶
func (s ProductType) Encode(e *jx.Encoder)
Encode encodes ProductType as json.
func (ProductType) GetInt ¶
func (s ProductType) GetInt() (v int, ok bool)
GetInt returns int and true boolean if ProductType is int.
func (ProductType) GetString ¶
func (s ProductType) GetString() (v string, ok bool)
GetString returns string and true boolean if ProductType is string.
func (ProductType) IsInt ¶
func (s ProductType) IsInt() bool
IsInt reports whether ProductType is int.
func (ProductType) IsString ¶
func (s ProductType) IsString() bool
IsString reports whether ProductType is string.
func (ProductType) MarshalJSON ¶
func (s ProductType) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ProductType) SetString ¶
func (s *ProductType) SetString(v string)
SetString sets ProductType to string.
func (*ProductType) UnmarshalJSON ¶
func (s *ProductType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type ProductTypeType ¶
type ProductTypeType string
ProductTypeType is oneOf type of ProductType.
const ( StringProductType ProductTypeType = "string" IntProductType ProductTypeType = "int" )
Possible values for ProductTypeType.
type ProductsGetParams ¶
ProductsGetParams is parameters of GET /Products operation.
type ProductsPProductSlugGetParams ¶
type ProductsPProductSlugGetParams struct {
ProductSlug string
}
ProductsPProductSlugGetParams is parameters of GET /Products/p/{productSlug} operation.
type ProductsServiceServiceSlugCountGetParams ¶
type ProductsServiceServiceSlugCountGetParams struct {
ServiceSlug string
}
ProductsServiceServiceSlugCountGetParams is parameters of GET /Products/service/{serviceSlug}/count operation.
type ProductsServiceServiceSlugIdsGetParams ¶
type ProductsServiceServiceSlugIdsGetParams struct {
ServiceSlug string
}
ProductsServiceServiceSlugIdsGetParams is parameters of GET /Products/service/{serviceSlug}/ids operation.
type ProductsServicesGetParams ¶
ProductsServicesGetParams is parameters of GET /Products/services operation.
type ProductsTopupGetParams ¶
ProductsTopupGetParams is parameters of GET /Products/topup operation.
type ProductsUserUserIdGetParams ¶
ProductsUserUserIdGetParams is parameters of GET /Products/user/{userId} operation.
type PurchaseableProduct ¶
type PurchaseableProduct struct { // Primary Key. ID OptInt32 `json:"id"` // Title of this product. Title OptNilString `json:"title"` // Unique Slug for this product. Slug OptNilString `json:"slug"` // DB-Level description may not be displayed to the end user directly (localisation n stuff). Description OptNilString `json:"description"` // The exact amount this product costs to purchase. Cost OptFloat64 `json:"cost"` // How long this product is owned by an user in seconds. OwnershipSeconds OptInt64 `json:"ownershipSeconds"` Type OptProductType `json:"type"` }
Products that can be purchased. Ref: #/components/schemas/PurchaseableProduct
func (*PurchaseableProduct) Decode ¶
func (s *PurchaseableProduct) Decode(d *jx.Decoder) error
Decode decodes PurchaseableProduct from json.
func (*PurchaseableProduct) Encode ¶
func (s *PurchaseableProduct) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*PurchaseableProduct) GetCost ¶
func (s *PurchaseableProduct) GetCost() OptFloat64
GetCost returns the value of Cost.
func (*PurchaseableProduct) GetDescription ¶
func (s *PurchaseableProduct) GetDescription() OptNilString
GetDescription returns the value of Description.
func (*PurchaseableProduct) GetID ¶
func (s *PurchaseableProduct) GetID() OptInt32
GetID returns the value of ID.
func (*PurchaseableProduct) GetOwnershipSeconds ¶
func (s *PurchaseableProduct) GetOwnershipSeconds() OptInt64
GetOwnershipSeconds returns the value of OwnershipSeconds.
func (*PurchaseableProduct) GetSlug ¶
func (s *PurchaseableProduct) GetSlug() OptNilString
GetSlug returns the value of Slug.
func (*PurchaseableProduct) GetTitle ¶
func (s *PurchaseableProduct) GetTitle() OptNilString
GetTitle returns the value of Title.
func (*PurchaseableProduct) GetType ¶
func (s *PurchaseableProduct) GetType() OptProductType
GetType returns the value of Type.
func (*PurchaseableProduct) MarshalJSON ¶
func (s *PurchaseableProduct) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*PurchaseableProduct) SetCost ¶
func (s *PurchaseableProduct) SetCost(val OptFloat64)
SetCost sets the value of Cost.
func (*PurchaseableProduct) SetDescription ¶
func (s *PurchaseableProduct) SetDescription(val OptNilString)
SetDescription sets the value of Description.
func (*PurchaseableProduct) SetID ¶
func (s *PurchaseableProduct) SetID(val OptInt32)
SetID sets the value of ID.
func (*PurchaseableProduct) SetOwnershipSeconds ¶
func (s *PurchaseableProduct) SetOwnershipSeconds(val OptInt64)
SetOwnershipSeconds sets the value of OwnershipSeconds.
func (*PurchaseableProduct) SetSlug ¶
func (s *PurchaseableProduct) SetSlug(val OptNilString)
SetSlug sets the value of Slug.
func (*PurchaseableProduct) SetTitle ¶
func (s *PurchaseableProduct) SetTitle(val OptNilString)
SetTitle sets the value of Title.
func (*PurchaseableProduct) SetType ¶
func (s *PurchaseableProduct) SetType(val OptProductType)
SetType sets the value of Type.
func (*PurchaseableProduct) UnmarshalJSON ¶
func (s *PurchaseableProduct) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*PurchaseableProduct) Validate ¶
func (s *PurchaseableProduct) Validate() error
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
Route is route object.
func (Route) OperationID ¶
OperationID returns OpenAPI operationId.
type Rule ¶
type Rule struct { // Primary key of this rule. ID OptInt32 `json:"id"` // Identifier of this rule. Slug OptNilString `json:"slug"` // In what order to apply the rules. Priority OptInt32 `json:"priority"` Requires OptGroup `json:"requires"` Targets OptGroup `json:"targets"` Flags OptRuleFlags `json:"flags"` // Amount this rule changes the target property. Amount OptFloat64 `json:"amount"` }
Rules can change attributes of products based on the ownership of another. Ref: #/components/schemas/Rule
func (*Rule) GetAmount ¶
func (s *Rule) GetAmount() OptFloat64
GetAmount returns the value of Amount.
func (*Rule) GetPriority ¶
GetPriority returns the value of Priority.
func (*Rule) GetRequires ¶
GetRequires returns the value of Requires.
func (*Rule) GetTargets ¶
GetTargets returns the value of Targets.
func (*Rule) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Rule) SetAmount ¶
func (s *Rule) SetAmount(val OptFloat64)
SetAmount sets the value of Amount.
func (*Rule) SetPriority ¶
SetPriority sets the value of Priority.
func (*Rule) SetRequires ¶
SetRequires sets the value of Requires.
func (*Rule) SetTargets ¶
SetTargets sets the value of Targets.
func (*Rule) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type RuleCreate ¶
type RuleCreate struct { // Identifier of this rule. Slug OptNilString `json:"slug"` // In what order to apply the rules (highest first). Priority OptInt32 `json:"priority"` // This rule only applies if the user owns a product contained in this group // if null, the rule always applies to the target group (except overriden by another rule). RequiresGroup OptNilString `json:"requiresGroup"` // This rule applies to all products in this group. TargetsGroup OptNilString `json:"targetsGroup"` Flags OptRuleFlags `json:"flags"` // Amount this rule changes the target property. Amount OptFloat64 `json:"amount"` }
Arguments for creating a new rule. Ref: #/components/schemas/RuleCreate
func (*RuleCreate) Decode ¶
func (s *RuleCreate) Decode(d *jx.Decoder) error
Decode decodes RuleCreate from json.
func (*RuleCreate) Encode ¶
func (s *RuleCreate) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*RuleCreate) GetAmount ¶
func (s *RuleCreate) GetAmount() OptFloat64
GetAmount returns the value of Amount.
func (*RuleCreate) GetFlags ¶
func (s *RuleCreate) GetFlags() OptRuleFlags
GetFlags returns the value of Flags.
func (*RuleCreate) GetPriority ¶
func (s *RuleCreate) GetPriority() OptInt32
GetPriority returns the value of Priority.
func (*RuleCreate) GetRequiresGroup ¶
func (s *RuleCreate) GetRequiresGroup() OptNilString
GetRequiresGroup returns the value of RequiresGroup.
func (*RuleCreate) GetSlug ¶
func (s *RuleCreate) GetSlug() OptNilString
GetSlug returns the value of Slug.
func (*RuleCreate) GetTargetsGroup ¶
func (s *RuleCreate) GetTargetsGroup() OptNilString
GetTargetsGroup returns the value of TargetsGroup.
func (*RuleCreate) MarshalJSON ¶
func (s *RuleCreate) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*RuleCreate) SetAmount ¶
func (s *RuleCreate) SetAmount(val OptFloat64)
SetAmount sets the value of Amount.
func (*RuleCreate) SetFlags ¶
func (s *RuleCreate) SetFlags(val OptRuleFlags)
SetFlags sets the value of Flags.
func (*RuleCreate) SetPriority ¶
func (s *RuleCreate) SetPriority(val OptInt32)
SetPriority sets the value of Priority.
func (*RuleCreate) SetRequiresGroup ¶
func (s *RuleCreate) SetRequiresGroup(val OptNilString)
SetRequiresGroup sets the value of RequiresGroup.
func (*RuleCreate) SetSlug ¶
func (s *RuleCreate) SetSlug(val OptNilString)
SetSlug sets the value of Slug.
func (*RuleCreate) SetTargetsGroup ¶
func (s *RuleCreate) SetTargetsGroup(val OptNilString)
SetTargetsGroup sets the value of TargetsGroup.
func (*RuleCreate) UnmarshalJSON ¶
func (s *RuleCreate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*RuleCreate) Validate ¶
func (s *RuleCreate) Validate() error
type RuleFlags ¶
type RuleFlags string
Flags modifying a Coflnet.Payments.Models.Rule. Ref: #/components/schemas/RuleFlags
func (RuleFlags) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (RuleFlags) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (*RuleFlags) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
func (*RuleFlags) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
type RuleResult ¶
type RuleResult struct { ModifiedProduct OptProduct `json:"modifiedProduct"` Rules OptNilRuleArray `json:"rules"` }
Ref: #/components/schemas/RuleResult
func (*RuleResult) Decode ¶
func (s *RuleResult) Decode(d *jx.Decoder) error
Decode decodes RuleResult from json.
func (*RuleResult) Encode ¶
func (s *RuleResult) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*RuleResult) GetModifiedProduct ¶
func (s *RuleResult) GetModifiedProduct() OptProduct
GetModifiedProduct returns the value of ModifiedProduct.
func (*RuleResult) GetRules ¶
func (s *RuleResult) GetRules() OptNilRuleArray
GetRules returns the value of Rules.
func (*RuleResult) MarshalJSON ¶
func (s *RuleResult) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*RuleResult) SetModifiedProduct ¶
func (s *RuleResult) SetModifiedProduct(val OptProduct)
SetModifiedProduct sets the value of ModifiedProduct.
func (*RuleResult) SetRules ¶
func (s *RuleResult) SetRules(val OptNilRuleArray)
SetRules sets the value of Rules.
func (*RuleResult) UnmarshalJSON ¶
func (s *RuleResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*RuleResult) Validate ¶
func (s *RuleResult) Validate() error
type RulesGetParams ¶
RulesGetParams is parameters of GET /Rules operation.
type RulesRuleSlugDeleteParams ¶
type RulesRuleSlugDeleteParams struct {
RuleSlug string
}
RulesRuleSlugDeleteParams is parameters of DELETE /Rules/{ruleSlug} operation.
type RulesRuleSlugGetParams ¶
type RulesRuleSlugGetParams struct {
RuleSlug string
}
RulesRuleSlugGetParams is parameters of GET /Rules/{ruleSlug} operation.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements http server based on OpenAPI v3 specification and calls Handler to handle requests.
func NewServer ¶
func NewServer(h Handler, opts ...ServerOption) (*Server, error)
NewServer creates new Server.
type ServerOption ¶
type ServerOption interface {
// contains filtered or unexported methods
}
ServerOption is server config option.
func WithErrorHandler ¶
func WithErrorHandler(h ErrorHandler) ServerOption
WithErrorHandler specifies error handler to use.
func WithMaxMultipartMemory ¶
func WithMaxMultipartMemory(max int64) ServerOption
WithMaxMultipartMemory specifies limit of memory for storing file parts. File parts which can't be stored in memory will be stored on disk in temporary files.
func WithMethodNotAllowed ¶
func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
WithMethodNotAllowed specifies Method Not Allowed handler to use.
func WithMiddleware ¶
func WithMiddleware(m ...Middleware) ServerOption
WithMiddleware specifies middlewares to use.
func WithNotFound ¶
func WithNotFound(notFound http.HandlerFunc) ServerOption
WithNotFound specifies Not Found handler to use.
func WithPathPrefix ¶
func WithPathPrefix(prefix string) ServerOption
WithPathPrefix specifies server path prefix.
type SystemState ¶
type SystemState struct { // Available products. Products OptNilPurchaseableProductArray `json:"products"` // Topups that are currently active. TopUps OptNilTopUpProductArray `json:"topUps"` // What products go into which groups. Groups OptNilSystemStateGroups `json:"groups"` // Rules. Rules OptNilRuleCreateArray `json:"rules"` }
State to get the db into Useful for gitops. Ref: #/components/schemas/SystemState
func (*SystemState) Decode ¶
func (s *SystemState) Decode(d *jx.Decoder) error
Decode decodes SystemState from json.
func (*SystemState) Encode ¶
func (s *SystemState) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*SystemState) GetGroups ¶
func (s *SystemState) GetGroups() OptNilSystemStateGroups
GetGroups returns the value of Groups.
func (*SystemState) GetProducts ¶
func (s *SystemState) GetProducts() OptNilPurchaseableProductArray
GetProducts returns the value of Products.
func (*SystemState) GetRules ¶
func (s *SystemState) GetRules() OptNilRuleCreateArray
GetRules returns the value of Rules.
func (*SystemState) GetTopUps ¶
func (s *SystemState) GetTopUps() OptNilTopUpProductArray
GetTopUps returns the value of TopUps.
func (*SystemState) MarshalJSON ¶
func (s *SystemState) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*SystemState) SetGroups ¶
func (s *SystemState) SetGroups(val OptNilSystemStateGroups)
SetGroups sets the value of Groups.
func (*SystemState) SetProducts ¶
func (s *SystemState) SetProducts(val OptNilPurchaseableProductArray)
SetProducts sets the value of Products.
func (*SystemState) SetRules ¶
func (s *SystemState) SetRules(val OptNilRuleCreateArray)
SetRules sets the value of Rules.
func (*SystemState) SetTopUps ¶
func (s *SystemState) SetTopUps(val OptNilTopUpProductArray)
SetTopUps sets the value of TopUps.
func (*SystemState) UnmarshalJSON ¶
func (s *SystemState) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*SystemState) Validate ¶
func (s *SystemState) Validate() error
type SystemStateGroups ¶
What products go into which groups.
func (*SystemStateGroups) Decode ¶
func (s *SystemStateGroups) Decode(d *jx.Decoder) error
Decode decodes SystemStateGroups from json.
func (SystemStateGroups) Encode ¶
func (s SystemStateGroups) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (SystemStateGroups) MarshalJSON ¶
func (s SystemStateGroups) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*SystemStateGroups) UnmarshalJSON ¶
func (s *SystemStateGroups) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type TopUpCustomPostParams ¶
type TopUpCustomPostParams struct {
UserId OptString
}
TopUpCustomPostParams is parameters of POST /TopUp/custom operation.
type TopUpIdResponse ¶
type TopUpIdResponse struct { // Checkout id. ID OptNilString `json:"id"` // Directlink to redirect the user to. DirctLink OptNilString `json:"dirctLink"` }
Response containing an id. Ref: #/components/schemas/TopUpIdResponse
func (*TopUpIdResponse) Decode ¶
func (s *TopUpIdResponse) Decode(d *jx.Decoder) error
Decode decodes TopUpIdResponse from json.
func (*TopUpIdResponse) Encode ¶
func (s *TopUpIdResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*TopUpIdResponse) GetDirctLink ¶
func (s *TopUpIdResponse) GetDirctLink() OptNilString
GetDirctLink returns the value of DirctLink.
func (*TopUpIdResponse) GetID ¶
func (s *TopUpIdResponse) GetID() OptNilString
GetID returns the value of ID.
func (*TopUpIdResponse) MarshalJSON ¶
func (s *TopUpIdResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*TopUpIdResponse) SetDirctLink ¶
func (s *TopUpIdResponse) SetDirctLink(val OptNilString)
SetDirctLink sets the value of DirctLink.
func (*TopUpIdResponse) SetID ¶
func (s *TopUpIdResponse) SetID(val OptNilString)
SetID sets the value of ID.
func (*TopUpIdResponse) UnmarshalJSON ¶
func (s *TopUpIdResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type TopUpOptions ¶
type TopUpOptions struct { // Overwrite the default redirect url after successful payment. SuccessUrl OptNilString `json:"successUrl"` // Overwrite the default redirect url for anything else but payment. CancelUrl OptNilString `json:"cancelUrl"` // If provided, this value will be used when the Customer object is created. If not provided, // customers will be asked to enter their email address. UserEmail OptNilString `json:"userEmail"` // Percise amount of coflcoins to topup. TopUpAmount OptInt64 `json:"topUpAmount"` }
Ref: #/components/schemas/TopUpOptions
func (*TopUpOptions) Decode ¶
func (s *TopUpOptions) Decode(d *jx.Decoder) error
Decode decodes TopUpOptions from json.
func (*TopUpOptions) Encode ¶
func (s *TopUpOptions) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*TopUpOptions) GetCancelUrl ¶
func (s *TopUpOptions) GetCancelUrl() OptNilString
GetCancelUrl returns the value of CancelUrl.
func (*TopUpOptions) GetSuccessUrl ¶
func (s *TopUpOptions) GetSuccessUrl() OptNilString
GetSuccessUrl returns the value of SuccessUrl.
func (*TopUpOptions) GetTopUpAmount ¶
func (s *TopUpOptions) GetTopUpAmount() OptInt64
GetTopUpAmount returns the value of TopUpAmount.
func (*TopUpOptions) GetUserEmail ¶
func (s *TopUpOptions) GetUserEmail() OptNilString
GetUserEmail returns the value of UserEmail.
func (*TopUpOptions) MarshalJSON ¶
func (s *TopUpOptions) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*TopUpOptions) SetCancelUrl ¶
func (s *TopUpOptions) SetCancelUrl(val OptNilString)
SetCancelUrl sets the value of CancelUrl.
func (*TopUpOptions) SetSuccessUrl ¶
func (s *TopUpOptions) SetSuccessUrl(val OptNilString)
SetSuccessUrl sets the value of SuccessUrl.
func (*TopUpOptions) SetTopUpAmount ¶
func (s *TopUpOptions) SetTopUpAmount(val OptInt64)
SetTopUpAmount sets the value of TopUpAmount.
func (*TopUpOptions) SetUserEmail ¶
func (s *TopUpOptions) SetUserEmail(val OptNilString)
SetUserEmail sets the value of UserEmail.
func (*TopUpOptions) UnmarshalJSON ¶
func (s *TopUpOptions) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type TopUpPaypalPostParams ¶
TopUpPaypalPostParams is parameters of POST /TopUp/paypal operation.
type TopUpProduct ¶
type TopUpProduct struct { // The price of this Coflnet.Payments.Models.TopUpProduct in Coflnet.Payments.Models.TopUpProduct. // CurrencyCode. Price OptFloat64 `json:"price"` // The currency code. CurrencyCode OptNilString `json:"currencyCode"` // What provider this top up is valid for // (differnt fees can require different prices). ProviderSlug OptNilString `json:"providerSlug"` // Primary Key. ID OptInt32 `json:"id"` // Title of this product. Title OptNilString `json:"title"` // Unique Slug for this product. Slug OptNilString `json:"slug"` // DB-Level description may not be displayed to the end user directly (localisation n stuff). Description OptNilString `json:"description"` // The exact amount this product costs to purchase. Cost OptFloat64 `json:"cost"` // How long this product is owned by an user in seconds. OwnershipSeconds OptInt64 `json:"ownershipSeconds"` Type OptProductType `json:"type"` }
Ref: #/components/schemas/TopUpProduct
func (*TopUpProduct) Decode ¶
func (s *TopUpProduct) Decode(d *jx.Decoder) error
Decode decodes TopUpProduct from json.
func (*TopUpProduct) Encode ¶
func (s *TopUpProduct) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*TopUpProduct) GetCost ¶
func (s *TopUpProduct) GetCost() OptFloat64
GetCost returns the value of Cost.
func (*TopUpProduct) GetCurrencyCode ¶
func (s *TopUpProduct) GetCurrencyCode() OptNilString
GetCurrencyCode returns the value of CurrencyCode.
func (*TopUpProduct) GetDescription ¶
func (s *TopUpProduct) GetDescription() OptNilString
GetDescription returns the value of Description.
func (*TopUpProduct) GetOwnershipSeconds ¶
func (s *TopUpProduct) GetOwnershipSeconds() OptInt64
GetOwnershipSeconds returns the value of OwnershipSeconds.
func (*TopUpProduct) GetPrice ¶
func (s *TopUpProduct) GetPrice() OptFloat64
GetPrice returns the value of Price.
func (*TopUpProduct) GetProviderSlug ¶
func (s *TopUpProduct) GetProviderSlug() OptNilString
GetProviderSlug returns the value of ProviderSlug.
func (*TopUpProduct) GetSlug ¶
func (s *TopUpProduct) GetSlug() OptNilString
GetSlug returns the value of Slug.
func (*TopUpProduct) GetTitle ¶
func (s *TopUpProduct) GetTitle() OptNilString
GetTitle returns the value of Title.
func (*TopUpProduct) GetType ¶
func (s *TopUpProduct) GetType() OptProductType
GetType returns the value of Type.
func (*TopUpProduct) MarshalJSON ¶
func (s *TopUpProduct) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*TopUpProduct) SetCost ¶
func (s *TopUpProduct) SetCost(val OptFloat64)
SetCost sets the value of Cost.
func (*TopUpProduct) SetCurrencyCode ¶
func (s *TopUpProduct) SetCurrencyCode(val OptNilString)
SetCurrencyCode sets the value of CurrencyCode.
func (*TopUpProduct) SetDescription ¶
func (s *TopUpProduct) SetDescription(val OptNilString)
SetDescription sets the value of Description.
func (*TopUpProduct) SetOwnershipSeconds ¶
func (s *TopUpProduct) SetOwnershipSeconds(val OptInt64)
SetOwnershipSeconds sets the value of OwnershipSeconds.
func (*TopUpProduct) SetPrice ¶
func (s *TopUpProduct) SetPrice(val OptFloat64)
SetPrice sets the value of Price.
func (*TopUpProduct) SetProviderSlug ¶
func (s *TopUpProduct) SetProviderSlug(val OptNilString)
SetProviderSlug sets the value of ProviderSlug.
func (*TopUpProduct) SetSlug ¶
func (s *TopUpProduct) SetSlug(val OptNilString)
SetSlug sets the value of Slug.
func (*TopUpProduct) SetTitle ¶
func (s *TopUpProduct) SetTitle(val OptNilString)
SetTitle sets the value of Title.
func (*TopUpProduct) SetType ¶
func (s *TopUpProduct) SetType(val OptProductType)
SetType sets the value of Type.
func (*TopUpProduct) UnmarshalJSON ¶
func (s *TopUpProduct) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*TopUpProduct) Validate ¶
func (s *TopUpProduct) Validate() error
type TopUpStripePostParams ¶
TopUpStripePostParams is parameters of POST /TopUp/stripe operation.
type TransactionEvent ¶
type TransactionEvent struct { // The internal id of the transaction. ID OptInt64 `json:"id"` // Id of the user triggering the transaction. UserId OptNilString `json:"userId"` // Slug of the product. ProductSlug OptNilString `json:"productSlug"` // Unique id of this product settings. ProductId OptInt32 `json:"productId"` // How long this product will last till it expires. OwnedSeconds OptInt64 `json:"ownedSeconds"` ProductType OptProductType `json:"productType"` // The transaction amount. Amount OptFloat64 `json:"amount"` // Optional reference. Reference OptNilString `json:"reference"` // When this transaction occured. Timestamp OptDateTime `json:"timestamp"` }
Event produced when a transaction occurs. Ref: #/components/schemas/TransactionEvent
func (*TransactionEvent) Decode ¶
func (s *TransactionEvent) Decode(d *jx.Decoder) error
Decode decodes TransactionEvent from json.
func (*TransactionEvent) Encode ¶
func (s *TransactionEvent) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*TransactionEvent) GetAmount ¶
func (s *TransactionEvent) GetAmount() OptFloat64
GetAmount returns the value of Amount.
func (*TransactionEvent) GetID ¶
func (s *TransactionEvent) GetID() OptInt64
GetID returns the value of ID.
func (*TransactionEvent) GetOwnedSeconds ¶
func (s *TransactionEvent) GetOwnedSeconds() OptInt64
GetOwnedSeconds returns the value of OwnedSeconds.
func (*TransactionEvent) GetProductId ¶
func (s *TransactionEvent) GetProductId() OptInt32
GetProductId returns the value of ProductId.
func (*TransactionEvent) GetProductSlug ¶
func (s *TransactionEvent) GetProductSlug() OptNilString
GetProductSlug returns the value of ProductSlug.
func (*TransactionEvent) GetProductType ¶
func (s *TransactionEvent) GetProductType() OptProductType
GetProductType returns the value of ProductType.
func (*TransactionEvent) GetReference ¶
func (s *TransactionEvent) GetReference() OptNilString
GetReference returns the value of Reference.
func (*TransactionEvent) GetTimestamp ¶
func (s *TransactionEvent) GetTimestamp() OptDateTime
GetTimestamp returns the value of Timestamp.
func (*TransactionEvent) GetUserId ¶
func (s *TransactionEvent) GetUserId() OptNilString
GetUserId returns the value of UserId.
func (*TransactionEvent) MarshalJSON ¶
func (s *TransactionEvent) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*TransactionEvent) SetAmount ¶
func (s *TransactionEvent) SetAmount(val OptFloat64)
SetAmount sets the value of Amount.
func (*TransactionEvent) SetID ¶
func (s *TransactionEvent) SetID(val OptInt64)
SetID sets the value of ID.
func (*TransactionEvent) SetOwnedSeconds ¶
func (s *TransactionEvent) SetOwnedSeconds(val OptInt64)
SetOwnedSeconds sets the value of OwnedSeconds.
func (*TransactionEvent) SetProductId ¶
func (s *TransactionEvent) SetProductId(val OptInt32)
SetProductId sets the value of ProductId.
func (*TransactionEvent) SetProductSlug ¶
func (s *TransactionEvent) SetProductSlug(val OptNilString)
SetProductSlug sets the value of ProductSlug.
func (*TransactionEvent) SetProductType ¶
func (s *TransactionEvent) SetProductType(val OptProductType)
SetProductType sets the value of ProductType.
func (*TransactionEvent) SetReference ¶
func (s *TransactionEvent) SetReference(val OptNilString)
SetReference sets the value of Reference.
func (*TransactionEvent) SetTimestamp ¶
func (s *TransactionEvent) SetTimestamp(val OptDateTime)
SetTimestamp sets the value of Timestamp.
func (*TransactionEvent) SetUserId ¶
func (s *TransactionEvent) SetUserId(val OptNilString)
SetUserId sets the value of UserId.
func (*TransactionEvent) UnmarshalJSON ¶
func (s *TransactionEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*TransactionEvent) Validate ¶
func (s *TransactionEvent) Validate() error
type TransactionPlanedUUserIdGetParams ¶
type TransactionPlanedUUserIdGetParams struct {
UserId string
}
TransactionPlanedUUserIdGetParams is parameters of GET /Transaction/planed/u/{userId} operation.
type TransactionPlanedUUserIdPostParams ¶
type TransactionPlanedUUserIdPostParams struct {
UserId string
}
TransactionPlanedUUserIdPostParams is parameters of POST /Transaction/planed/u/{userId} operation.
type TransactionPlanedUUserIdTTransactionIdDeleteParams ¶
type TransactionPlanedUUserIdTTransactionIdDeleteParams struct { UserId string TransactionId int32 }
TransactionPlanedUUserIdTTransactionIdDeleteParams is parameters of DELETE /Transaction/planed/u/{userId}/t/{transactionId} operation.
type TransactionPlanedUUserIdTTransactionIdPutParams ¶
TransactionPlanedUUserIdTTransactionIdPutParams is parameters of PUT /Transaction/planed/u/{userId}/t/{transactionId} operation.
type TransactionSendPostOK ¶
type TransactionSendPostOK struct{}
TransactionSendPostOK is response for TransactionSendPost operation.
type TransactionUUserIdGetParams ¶
type TransactionUUserIdGetParams struct {
UserId string
}
TransactionUUserIdGetParams is parameters of GET /Transaction/u/{userId} operation.
type TransferRequest ¶
type TransferRequest struct { // The identifier of the user which should receive the funds. TargetUser OptNilString `json:"targetUser"` // A unique reference to prevent double transfers. Reference OptNilString `json:"reference"` // The amount to transfer. Amount OptFloat64 `json:"amount"` }
Transfer request to another user. Ref: #/components/schemas/TransferRequest
func (*TransferRequest) Decode ¶
func (s *TransferRequest) Decode(d *jx.Decoder) error
Decode decodes TransferRequest from json.
func (*TransferRequest) Encode ¶
func (s *TransferRequest) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*TransferRequest) GetAmount ¶
func (s *TransferRequest) GetAmount() OptFloat64
GetAmount returns the value of Amount.
func (*TransferRequest) GetReference ¶
func (s *TransferRequest) GetReference() OptNilString
GetReference returns the value of Reference.
func (*TransferRequest) GetTargetUser ¶
func (s *TransferRequest) GetTargetUser() OptNilString
GetTargetUser returns the value of TargetUser.
func (*TransferRequest) MarshalJSON ¶
func (s *TransferRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*TransferRequest) SetAmount ¶
func (s *TransferRequest) SetAmount(val OptFloat64)
SetAmount sets the value of Amount.
func (*TransferRequest) SetReference ¶
func (s *TransferRequest) SetReference(val OptNilString)
SetReference sets the value of Reference.
func (*TransferRequest) SetTargetUser ¶
func (s *TransferRequest) SetTargetUser(val OptNilString)
SetTargetUser sets the value of TargetUser.
func (*TransferRequest) UnmarshalJSON ¶
func (s *TransferRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*TransferRequest) Validate ¶
func (s *TransferRequest) Validate() error
type UnimplementedHandler ¶
type UnimplementedHandler struct{}
UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.
func (UnimplementedHandler) ApplyPost ¶
func (UnimplementedHandler) ApplyPost(ctx context.Context, req *SystemState) error
ApplyPost implements POST /Apply operation.
Brings all products, groups and roles into the given state will disable/delete anything not present so use carefully.
POST /Apply
func (UnimplementedHandler) CallbackPaypalPost ¶
func (UnimplementedHandler) CallbackPaypalPost(ctx context.Context) error
CallbackPaypalPost implements POST /Callback/paypal operation.
Accept callbacks from paypal.
POST /Callback/paypal
func (UnimplementedHandler) CallbackStripePost ¶
func (UnimplementedHandler) CallbackStripePost(ctx context.Context) error
CallbackStripePost implements POST /Callback/stripe operation.
Webhook callback for stripe.
POST /Callback/stripe
func (UnimplementedHandler) GroupGet ¶
func (UnimplementedHandler) GroupGet(ctx context.Context, params GroupGetParams) (r []Group, _ error)
GroupGet implements GET /Group operation.
GET /Group
func (UnimplementedHandler) GroupGroupSlugDelete ¶
func (UnimplementedHandler) GroupGroupSlugDelete(ctx context.Context, params GroupGroupSlugDeleteParams) (r *Group, _ error)
GroupGroupSlugDelete implements DELETE /Group/{groupSlug} operation.
DELETE /Group/{groupSlug}
func (UnimplementedHandler) GroupGroupSlugGet ¶
func (UnimplementedHandler) GroupGroupSlugGet(ctx context.Context, params GroupGroupSlugGetParams) (r *Group, _ error)
GroupGroupSlugGet implements GET /Group/{groupSlug} operation.
GET /Group/{groupSlug}
func (UnimplementedHandler) GroupGroupSlugProductsDelete ¶
func (UnimplementedHandler) GroupGroupSlugProductsDelete(ctx context.Context, req []string, params GroupGroupSlugProductsDeleteParams) (r *Group, _ error)
GroupGroupSlugProductsDelete implements DELETE /Group/{groupSlug}/products operation.
DELETE /Group/{groupSlug}/products
func (UnimplementedHandler) GroupGroupSlugProductsPost ¶
func (UnimplementedHandler) GroupGroupSlugProductsPost(ctx context.Context, req []string, params GroupGroupSlugProductsPostParams) (r *Group, _ error)
GroupGroupSlugProductsPost implements POST /Group/{groupSlug}/products operation.
POST /Group/{groupSlug}/products
func (UnimplementedHandler) GroupGroupSlugPut ¶
func (UnimplementedHandler) GroupGroupSlugPut(ctx context.Context, req *Group, params GroupGroupSlugPutParams) (r *Group, _ error)
GroupGroupSlugPut implements PUT /Group/{groupSlug} operation.
PUT /Group/{groupSlug}
func (UnimplementedHandler) ProductsGet ¶
func (UnimplementedHandler) ProductsGet(ctx context.Context, params ProductsGetParams) (r []PurchaseableProduct, _ error)
ProductsGet implements GET /Products operation.
Get all products.
GET /Products
func (UnimplementedHandler) ProductsPProductSlugGet ¶
func (UnimplementedHandler) ProductsPProductSlugGet(ctx context.Context, params ProductsPProductSlugGetParams) (r *PurchaseableProduct, _ error)
ProductsPProductSlugGet implements GET /Products/p/{productSlug} operation.
Get the details of a product.
GET /Products/p/{productSlug}
func (UnimplementedHandler) ProductsPut ¶
func (UnimplementedHandler) ProductsPut(ctx context.Context, req *PurchaseableProduct) (r *PurchaseableProduct, _ error)
ProductsPut implements PUT /Products operation.
Updates a product by replacing it with a new one. Old products can not be deleted to furfill accounting needs.
PUT /Products
func (UnimplementedHandler) ProductsServiceServiceSlugCountGet ¶
func (UnimplementedHandler) ProductsServiceServiceSlugCountGet(ctx context.Context, params ProductsServiceServiceSlugCountGetParams) (r int32, _ error)
ProductsServiceServiceSlugCountGet implements GET /Products/service/{serviceSlug}/count operation.
Count of users owning a service.
GET /Products/service/{serviceSlug}/count
func (UnimplementedHandler) ProductsServiceServiceSlugIdsGet ¶
func (UnimplementedHandler) ProductsServiceServiceSlugIdsGet(ctx context.Context, params ProductsServiceServiceSlugIdsGetParams) (r []string, _ error)
ProductsServiceServiceSlugIdsGet implements GET /Products/service/{serviceSlug}/ids operation.
Gets all userIds owning a service.
GET /Products/service/{serviceSlug}/ids
func (UnimplementedHandler) ProductsServicesGet ¶
func (UnimplementedHandler) ProductsServicesGet(ctx context.Context, params ProductsServicesGetParams) (r []PurchaseableProduct, _ error)
ProductsServicesGet implements GET /Products/services operation.
Get services.
GET /Products/services
func (UnimplementedHandler) ProductsTopupGet ¶
func (UnimplementedHandler) ProductsTopupGet(ctx context.Context, params ProductsTopupGetParams) (r []TopUpProduct, _ error)
ProductsTopupGet implements GET /Products/topup operation.
Get topup options.
GET /Products/topup
func (UnimplementedHandler) ProductsTopupPut ¶
func (UnimplementedHandler) ProductsTopupPut(ctx context.Context, req *TopUpProduct) (r *TopUpProduct, _ error)
ProductsTopupPut implements PUT /Products/topup operation.
Updates a topup option by replacing it with a new one. Old options get a new slug and are marked as disabled.
PUT /Products/topup
func (UnimplementedHandler) ProductsUserUserIdGet ¶
func (UnimplementedHandler) ProductsUserUserIdGet(ctx context.Context, params ProductsUserUserIdGetParams) (r []RuleResult, _ error)
ProductsUserUserIdGet implements GET /Products/user/{userId} operation.
Get adjusted prices for a user.
GET /Products/user/{userId}
func (UnimplementedHandler) RulesGet ¶
func (UnimplementedHandler) RulesGet(ctx context.Context, params RulesGetParams) (r []Rule, _ error)
RulesGet implements GET /Rules operation.
Returns all rules.
GET /Rules
func (UnimplementedHandler) RulesPost ¶
func (UnimplementedHandler) RulesPost(ctx context.Context, req *RuleCreate) (r *Rule, _ error)
RulesPost implements POST /Rules operation.
Creates a new rule.
POST /Rules
func (UnimplementedHandler) RulesRuleSlugDelete ¶
func (UnimplementedHandler) RulesRuleSlugDelete(ctx context.Context, params RulesRuleSlugDeleteParams) (r *Rule, _ error)
RulesRuleSlugDelete implements DELETE /Rules/{ruleSlug} operation.
Deletes a rule.
DELETE /Rules/{ruleSlug}
func (UnimplementedHandler) RulesRuleSlugGet ¶
func (UnimplementedHandler) RulesRuleSlugGet(ctx context.Context, params RulesRuleSlugGetParams) (r *Rule, _ error)
RulesRuleSlugGet implements GET /Rules/{ruleSlug} operation.
Returns a rule by slug.
GET /Rules/{ruleSlug}
func (UnimplementedHandler) TopUpCompensatePost ¶
func (UnimplementedHandler) TopUpCompensatePost(ctx context.Context, req *Compensation) (r *Int32Int32ValueTuple, _ error)
TopUpCompensatePost implements POST /TopUp/compensate operation.
Compensates users of a service for something.
POST /TopUp/compensate
func (UnimplementedHandler) TopUpCustomPost ¶
func (UnimplementedHandler) TopUpCustomPost(ctx context.Context, req *CustomTopUp, params TopUpCustomPostParams) (r *TopUpIdResponse, _ error)
TopUpCustomPost implements POST /TopUp/custom operation.
Creates a custom topup that is instantly credited.
POST /TopUp/custom
func (UnimplementedHandler) TopUpOptionsGet ¶
func (UnimplementedHandler) TopUpOptionsGet(ctx context.Context) (r []TopUpProduct, _ error)
TopUpOptionsGet implements GET /TopUp/options operation.
All available topup options.
GET /TopUp/options
func (UnimplementedHandler) TopUpPaypalPost ¶
func (UnimplementedHandler) TopUpPaypalPost(ctx context.Context, req *TopUpOptions, params TopUpPaypalPostParams) (r *TopUpIdResponse, _ error)
TopUpPaypalPost implements POST /TopUp/paypal operation.
Creates a payment session with paypal.
POST /TopUp/paypal
func (UnimplementedHandler) TopUpStripePost ¶
func (UnimplementedHandler) TopUpStripePost(ctx context.Context, req *TopUpOptions, params TopUpStripePostParams) (r *TopUpIdResponse, _ error)
TopUpStripePost implements POST /TopUp/stripe operation.
Creates a payment session with stripe.
POST /TopUp/stripe
func (UnimplementedHandler) TransactionPlanedUUserIdGet ¶
func (UnimplementedHandler) TransactionPlanedUUserIdGet(ctx context.Context, params TransactionPlanedUUserIdGetParams) (r []ExternalTransaction, _ error)
TransactionPlanedUUserIdGet implements GET /Transaction/planed/u/{userId} operation.
GET /Transaction/planed/u/{userId}
func (UnimplementedHandler) TransactionPlanedUUserIdPost ¶
func (UnimplementedHandler) TransactionPlanedUUserIdPost(ctx context.Context, req *ExternalTransaction, params TransactionPlanedUUserIdPostParams) (r *PlanedTransaction, _ error)
TransactionPlanedUUserIdPost implements POST /Transaction/planed/u/{userId} operation.
POST /Transaction/planed/u/{userId}
func (UnimplementedHandler) TransactionPlanedUUserIdTTransactionIdDelete ¶
func (UnimplementedHandler) TransactionPlanedUUserIdTTransactionIdDelete(ctx context.Context, params TransactionPlanedUUserIdTTransactionIdDeleteParams) (r *PlanedTransaction, _ error)
TransactionPlanedUUserIdTTransactionIdDelete implements DELETE /Transaction/planed/u/{userId}/t/{transactionId} operation.
DELETE /Transaction/planed/u/{userId}/t/{transactionId}
func (UnimplementedHandler) TransactionPlanedUUserIdTTransactionIdPut ¶
func (UnimplementedHandler) TransactionPlanedUUserIdTTransactionIdPut(ctx context.Context, req *ExternalTransaction, params TransactionPlanedUUserIdTTransactionIdPutParams) (r *PlanedTransaction, _ error)
TransactionPlanedUUserIdTTransactionIdPut implements PUT /Transaction/planed/u/{userId}/t/{transactionId} operation.
PUT /Transaction/planed/u/{userId}/t/{transactionId}
func (UnimplementedHandler) TransactionSendPost ¶
func (UnimplementedHandler) TransactionSendPost(ctx context.Context, req *TransactionEvent) error
TransactionSendPost implements POST /Transaction/send operation.
POST /Transaction/send
func (UnimplementedHandler) TransactionUUserIdGet ¶
func (UnimplementedHandler) TransactionUUserIdGet(ctx context.Context, params TransactionUUserIdGetParams) (r []ExternalTransaction, _ error)
TransactionUUserIdGet implements GET /Transaction/u/{userId} operation.
GET /Transaction/u/{userId}
func (UnimplementedHandler) UserUserIdGet ¶
func (UnimplementedHandler) UserUserIdGet(ctx context.Context, params UserUserIdGetParams) (r *User, _ error)
UserUserIdGet implements GET /User/{userId} operation.
Gets the user with the given id.
GET /User/{userId}
func (UnimplementedHandler) UserUserIdOwnsLongestPost ¶
func (UnimplementedHandler) UserUserIdOwnsLongestPost(ctx context.Context, req []string, params UserUserIdOwnsLongestPostParams) (r time.Time, _ error)
UserUserIdOwnsLongestPost implements POST /User/{userId}/owns/longest operation.
Returns the bigest time out of a list of product ids.
POST /User/{userId}/owns/longest
func (UnimplementedHandler) UserUserIdOwnsPost
deprecated
func (UnimplementedHandler) UserUserIdOwnsPost(ctx context.Context, req []string, params UserUserIdOwnsPostParams) (r []OwnerShip, _ error)
UserUserIdOwnsPost implements POST /User/{userId}/owns operation.
Returns all ownership data for an user out of a list of interested.
Deprecated: schema marks this operation as deprecated.
POST /User/{userId}/owns
func (UnimplementedHandler) UserUserIdOwnsProductSlugUntilGet ¶
func (UnimplementedHandler) UserUserIdOwnsProductSlugUntilGet(ctx context.Context, params UserUserIdOwnsProductSlugUntilGetParams) (r time.Time, _ error)
UserUserIdOwnsProductSlugUntilGet implements GET /User/{userId}/owns/{productSlug}/until operation.
Returns the time for how long a user owns a given product.
GET /User/{userId}/owns/{productSlug}/until
func (UnimplementedHandler) UserUserIdOwnsUntilPost ¶
func (UnimplementedHandler) UserUserIdOwnsUntilPost(ctx context.Context, req []string, params UserUserIdOwnsUntilPostParams) (r UserUserIdOwnsUntilPostOKApplicationJSON, _ error)
UserUserIdOwnsUntilPost implements POST /User/{userId}/owns/until operation.
Returns all ownership data for an user out of a list of interested.
POST /User/{userId}/owns/until
func (UnimplementedHandler) UserUserIdPost ¶
func (UnimplementedHandler) UserUserIdPost(ctx context.Context, params UserUserIdPostParams) (r *User, _ error)
UserUserIdPost implements POST /User/{userId} operation.
Creates a new user with the given id.
POST /User/{userId}
func (UnimplementedHandler) UserUserIdPurchaseProductSlugPost ¶
func (UnimplementedHandler) UserUserIdPurchaseProductSlugPost(ctx context.Context, params UserUserIdPurchaseProductSlugPostParams) (r *User, _ error)
UserUserIdPurchaseProductSlugPost implements POST /User/{userId}/purchase/{productSlug} operation.
Purchase a new product if enough funds are available.
POST /User/{userId}/purchase/{productSlug}
func (UnimplementedHandler) UserUserIdServicePurchaseProductSlugPost ¶
func (UnimplementedHandler) UserUserIdServicePurchaseProductSlugPost(ctx context.Context, params UserUserIdServicePurchaseProductSlugPostParams) (r *User, _ error)
UserUserIdServicePurchaseProductSlugPost implements POST /User/{userId}/service/purchase/{productSlug} operation.
Purchase/extends a service if enough funds are available.
POST /User/{userId}/service/purchase/{productSlug}
func (UnimplementedHandler) UserUserIdTransactionIdDelete ¶
func (UnimplementedHandler) UserUserIdTransactionIdDelete(ctx context.Context, params UserUserIdTransactionIdDeleteParams) (r *User, _ error)
UserUserIdTransactionIdDelete implements DELETE /User/{userId}/{transactionId} operation.
Undo the purchase of a service.
DELETE /User/{userId}/{transactionId}
func (UnimplementedHandler) UserUserIdTransferPost ¶
func (UnimplementedHandler) UserUserIdTransferPost(ctx context.Context, req *TransferRequest, params UserUserIdTransferPostParams) (r *TransactionEvent, _ error)
UserUserIdTransferPost implements POST /User/{userId}/transfer operation.
Transfers coins to another user.
POST /User/{userId}/transfer
type User ¶
type User struct { // Primary key. ID OptInt32 `json:"id"` // The identifier of the account system. ExternalId OptNilString `json:"externalId"` // Balance of this user. Balance OptFloat64 `json:"balance"` // The balance available (Coflnet.Payments.Models.User.Balance minus any Coflnet.Payments.Models. // PlanedTransaction). AvailableBalance OptFloat64 `json:"availableBalance"` // Things this user owns. Owns OptNilOwnerShipArray `json:"owns"` }
An user capable of making transactions. Ref: #/components/schemas/User
func (*User) GetAvailableBalance ¶
func (s *User) GetAvailableBalance() OptFloat64
GetAvailableBalance returns the value of AvailableBalance.
func (*User) GetBalance ¶
func (s *User) GetBalance() OptFloat64
GetBalance returns the value of Balance.
func (*User) GetExternalId ¶
func (s *User) GetExternalId() OptNilString
GetExternalId returns the value of ExternalId.
func (*User) GetOwns ¶
func (s *User) GetOwns() OptNilOwnerShipArray
GetOwns returns the value of Owns.
func (*User) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*User) SetAvailableBalance ¶
func (s *User) SetAvailableBalance(val OptFloat64)
SetAvailableBalance sets the value of AvailableBalance.
func (*User) SetBalance ¶
func (s *User) SetBalance(val OptFloat64)
SetBalance sets the value of Balance.
func (*User) SetExternalId ¶
func (s *User) SetExternalId(val OptNilString)
SetExternalId sets the value of ExternalId.
func (*User) SetOwns ¶
func (s *User) SetOwns(val OptNilOwnerShipArray)
SetOwns sets the value of Owns.
func (*User) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type UserUserIdGetParams ¶
type UserUserIdGetParams struct {
UserId string
}
UserUserIdGetParams is parameters of GET /User/{userId} operation.
type UserUserIdOwnsLongestPostParams ¶
type UserUserIdOwnsLongestPostParams struct {
UserId string
}
UserUserIdOwnsLongestPostParams is parameters of POST /User/{userId}/owns/longest operation.
type UserUserIdOwnsPostParams ¶
type UserUserIdOwnsPostParams struct {
UserId string
}
UserUserIdOwnsPostParams is parameters of POST /User/{userId}/owns operation.
type UserUserIdOwnsProductSlugUntilGetParams ¶
UserUserIdOwnsProductSlugUntilGetParams is parameters of GET /User/{userId}/owns/{productSlug}/until operation.
type UserUserIdOwnsUntilPostOKApplicationJSON ¶
func (*UserUserIdOwnsUntilPostOKApplicationJSON) Decode ¶
func (s *UserUserIdOwnsUntilPostOKApplicationJSON) Decode(d *jx.Decoder) error
Decode decodes UserUserIdOwnsUntilPostOKApplicationJSON from json.
func (UserUserIdOwnsUntilPostOKApplicationJSON) Encode ¶
func (s UserUserIdOwnsUntilPostOKApplicationJSON) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (UserUserIdOwnsUntilPostOKApplicationJSON) MarshalJSON ¶
func (s UserUserIdOwnsUntilPostOKApplicationJSON) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UserUserIdOwnsUntilPostOKApplicationJSON) UnmarshalJSON ¶
func (s *UserUserIdOwnsUntilPostOKApplicationJSON) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type UserUserIdOwnsUntilPostParams ¶
type UserUserIdOwnsUntilPostParams struct {
UserId string
}
UserUserIdOwnsUntilPostParams is parameters of POST /User/{userId}/owns/until operation.
type UserUserIdPostParams ¶
type UserUserIdPostParams struct {
UserId string
}
UserUserIdPostParams is parameters of POST /User/{userId} operation.
type UserUserIdPurchaseProductSlugPostParams ¶
type UserUserIdPurchaseProductSlugPostParams struct { UserId string ProductSlug string Price OptInt32 }
UserUserIdPurchaseProductSlugPostParams is parameters of POST /User/{userId}/purchase/{productSlug} operation.
type UserUserIdServicePurchaseProductSlugPostParams ¶
type UserUserIdServicePurchaseProductSlugPostParams struct { UserId string ProductSlug string Reference OptString Count OptInt32 }
UserUserIdServicePurchaseProductSlugPostParams is parameters of POST /User/{userId}/service/purchase/{productSlug} operation.
type UserUserIdTransactionIdDeleteParams ¶
UserUserIdTransactionIdDeleteParams is parameters of DELETE /User/{userId}/{transactionId} operation.
type UserUserIdTransferPostParams ¶
type UserUserIdTransferPostParams struct {
UserId string
}
UserUserIdTransferPostParams is parameters of POST /User/{userId}/transfer operation.
Source Files
¶
- oas_cfg_gen.go
- oas_client_gen.go
- oas_handlers_gen.go
- oas_json_gen.go
- oas_middleware_gen.go
- oas_parameters_gen.go
- oas_request_decoders_gen.go
- oas_request_encoders_gen.go
- oas_response_decoders_gen.go
- oas_response_encoders_gen.go
- oas_router_gen.go
- oas_schemas_gen.go
- oas_server_gen.go
- oas_unimplemented_gen.go
- oas_validators_gen.go