Documentation
¶
Index ¶
- func ReturnResponse(o *Response)
- type Response
- func (r *Response) AddItem(it adtype.ResponserItemCommon)
- func (r *Response) Ads() []adtype.ResponserItemCommon
- func (r *Response) AuctionID() string
- func (r *Response) AuctionType() types.AuctionType
- func (r *Response) Context(ctx ...context.Context) context.Context
- func (r *Response) Count() int
- func (r *Response) Error() error
- func (r *Response) Get(key string) any
- func (r *Response) Item(impid string) adtype.ResponserItemCommon
- func (r *Response) IterAds() iter.Seq[adtype.ResponserItem]
- func (r *Response) Release()
- func (r *Response) Request() *adtype.BidRequest
- func (r *Response) Source() adtype.Source
- func (r *Response) Validate() (err error)
- type ResponseEmpty
- func (r ResponseEmpty) Ads() []adtype.ResponserItemCommon
- func (r ResponseEmpty) AuctionID() string
- func (r ResponseEmpty) AuctionType() types.AuctionType
- func (r *ResponseEmpty) Context(ctx ...context.Context) context.Context
- func (r ResponseEmpty) Count() int
- func (r ResponseEmpty) Error() error
- func (r ResponseEmpty) ExtImpressionID() string
- func (r ResponseEmpty) ExtTargetID() string
- func (r *ResponseEmpty) Get(key string) (res any)
- func (r ResponseEmpty) ID() string
- func (r ResponseEmpty) Impression() *adtype.Impression
- func (r ResponseEmpty) ImpressionID() string
- func (r ResponseEmpty) InternalAuctionCPMBid() billing.Money
- func (r ResponseEmpty) Item(impid string) adtype.ResponserItemCommon
- func (r ResponseEmpty) IterAds() iter.Seq[adtype.ResponserItem]
- func (r ResponseEmpty) PriorityFormatType() types.FormatType
- func (r *ResponseEmpty) Release()
- func (r ResponseEmpty) Request() *adtype.BidRequest
- func (r ResponseEmpty) Source() adtype.Source
- func (r ResponseEmpty) Validate() error
- type ResponseItemBlank
- func (*ResponseItemBlank) AccountID() uint64
- func (*ResponseItemBlank) ActionURL() string
- func (*ResponseItemBlank) AdID() uint64
- func (*ResponseItemBlank) Asset(name string) *admodels.AdAsset
- func (*ResponseItemBlank) Assets() admodels.AdAssets
- func (it *ResponseItemBlank) BidImpressionPrice() billing.Money
- func (*ResponseItemBlank) CampaignID() uint64
- func (*ResponseItemBlank) ClickTrackerLinks() []string
- func (it *ResponseItemBlank) CommissionShareFactor() float64
- func (*ResponseItemBlank) ContentFields() map[string]any
- func (*ResponseItemBlank) ContentItem(name string) any
- func (*ResponseItemBlank) ContentItemString(name string) string
- func (*ResponseItemBlank) Context(ctx ...context.Context) context.Context
- func (it *ResponseItemBlank) ECPM() billing.Money
- func (it *ResponseItemBlank) ExtImpressionID() string
- func (it *ResponseItemBlank) ExtTargetID() string
- func (it *ResponseItemBlank) FinalPrice(action adtype.Action) billing.Money
- func (it *ResponseItemBlank) FixedPurchasePrice(action adtype.Action) billing.Money
- func (it *ResponseItemBlank) Format() *types.Format
- func (*ResponseItemBlank) Get(key string) any
- func (*ResponseItemBlank) Height() int
- func (it *ResponseItemBlank) ID() string
- func (it *ResponseItemBlank) Impression() *adtype.Impression
- func (it *ResponseItemBlank) ImpressionID() string
- func (*ResponseItemBlank) ImpressionTrackerLinks() []string
- func (it *ResponseItemBlank) InternalAuctionCPMBid() billing.Money
- func (*ResponseItemBlank) IsBackup() bool
- func (*ResponseItemBlank) IsDirect() bool
- func (*ResponseItemBlank) MainAsset() *admodels.AdAsset
- func (*ResponseItemBlank) NetworkName() string
- func (it *ResponseItemBlank) PotentialPrice(action adtype.Action) billing.Money
- func (it *ResponseItemBlank) PrepareBidImpressionPrice(price billing.Money) billing.Money
- func (it *ResponseItemBlank) Price(action adtype.Action) billing.Money
- func (it *ResponseItemBlank) PriceTestMode() bool
- func (it *ResponseItemBlank) PricingModel() types.PricingModel
- func (it *ResponseItemBlank) PriorityFormatType() types.FormatType
- func (it *ResponseItemBlank) PurchasePrice(action adtype.Action) billing.Money
- func (*ResponseItemBlank) Second() *adtype.SecondAd
- func (it *ResponseItemBlank) SetBidImpressionPrice(bid billing.Money) error
- func (it *ResponseItemBlank) Source() adtype.Source
- func (it *ResponseItemBlank) SourceCorrectionFactor() float64
- func (it *ResponseItemBlank) TargetCorrectionFactor() float64
- func (*ResponseItemBlank) Validate() error
- func (*ResponseItemBlank) ViewTrackerLinks() []string
- func (*ResponseItemBlank) Width() int
- type ResponseItemBlock
- func (i *ResponseItemBlock) Ads() []adtype.ResponserItem
- func (i *ResponseItemBlock) Context(ctx ...context.Context) context.Context
- func (i *ResponseItemBlock) Count() int
- func (i *ResponseItemBlock) ExtImpressionID() string
- func (i *ResponseItemBlock) ExtTargetID() string
- func (i *ResponseItemBlock) Get(key string) any
- func (i *ResponseItemBlock) ID() string
- func (i *ResponseItemBlock) Impression() *adtype.Impression
- func (i *ResponseItemBlock) ImpressionID() string
- func (i *ResponseItemBlock) InternalAuctionCPMBid() (bid billing.Money)
- func (i *ResponseItemBlock) Price(action adtype.Action) (price billing.Money)
- func (i *ResponseItemBlock) PriorityFormatType() types.FormatType
- func (i *ResponseItemBlock) Validate() (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
Response from different sources
func BorrowResponse ¶
func BorrowResponse(request *adtype.BidRequest, source adtype.Source, items []adtype.ResponserItemCommon, err error) *Response
BorrowResponse object
func NewResponse ¶
func NewResponse(request *adtype.BidRequest, source adtype.Source, items []adtype.ResponserItemCommon, err error) *Response
NewResponse common object
func (*Response) AddItem ¶
func (r *Response) AddItem(it adtype.ResponserItemCommon)
AddItem to response
func (*Response) AuctionType ¶
func (r *Response) AuctionType() types.AuctionType
AuctionType of request
func (*Response) Item ¶
func (r *Response) Item(impid string) adtype.ResponserItemCommon
Item by impression code
type ResponseEmpty ¶
type ResponseEmpty struct { ItemID string Req *adtype.BidRequest Src adtype.Source Imp *adtype.Impression Bid *openrtb.Bid Err error // contains filtered or unexported fields }
ResponseEmpty object represents empty response and response item
func NewEmptyResponse ¶
func NewEmptyResponse(request *adtype.BidRequest, src adtype.Source, err error) *ResponseEmpty
NewEmptyResponse by bid request
func (ResponseEmpty) AuctionID ¶
func (r ResponseEmpty) AuctionID() string
AuctionID returns ID of the current auction
func (ResponseEmpty) AuctionType ¶
func (r ResponseEmpty) AuctionType() types.AuctionType
AuctionType returns type of the auction (first price, second price, etc)
func (*ResponseEmpty) Context ¶
func (r *ResponseEmpty) Context(ctx ...context.Context) context.Context
Context value
func (ResponseEmpty) ExtImpressionID ¶
func (r ResponseEmpty) ExtImpressionID() string
ExtImpressionID it's unique code of the auction bid impression
func (ResponseEmpty) ExtTargetID ¶
func (r ResponseEmpty) ExtTargetID() string
ExtTargetID of the external network
func (ResponseEmpty) ID ¶
func (r ResponseEmpty) ID() string
ID of current response item (unique code of current response)
func (ResponseEmpty) Impression ¶
func (r ResponseEmpty) Impression() *adtype.Impression
Impression place object
func (ResponseEmpty) ImpressionID ¶
func (r ResponseEmpty) ImpressionID() string
ImpressionID unique code string
func (ResponseEmpty) InternalAuctionCPMBid ¶
func (r ResponseEmpty) InternalAuctionCPMBid() billing.Money
InternalAuctionCPMBid value provides maximal possible price without any comission According to this value the system can choice the best item for the auction
func (ResponseEmpty) Item ¶
func (r ResponseEmpty) Item(impid string) adtype.ResponserItemCommon
Item by impression code
func (ResponseEmpty) IterAds ¶
func (r ResponseEmpty) IterAds() iter.Seq[adtype.ResponserItem]
IterAds returns an iterator over the response items.
func (ResponseEmpty) PriorityFormatType ¶
func (r ResponseEmpty) PriorityFormatType() types.FormatType
PriorityFormatType from current Ad
func (*ResponseEmpty) Release ¶
func (r *ResponseEmpty) Release()
Release response and all linked objects
func (ResponseEmpty) Request ¶
func (r ResponseEmpty) Request() *adtype.BidRequest
Request returns the original request object
func (ResponseEmpty) Source ¶
func (r ResponseEmpty) Source() adtype.Source
Source returns source of the response
type ResponseItemBlank ¶
type ResponseItemBlank struct { ItemID string Imp *adtype.Impression Src adtype.Source FormatVal *types.Format PricingModelVal types.PricingModel PriceScope price.PriceScope }
ResponseItemBlank value
func (*ResponseItemBlank) ActionURL ¶
func (*ResponseItemBlank) ActionURL() string
ActionURL returns target resource link for direct and banner click as well
func (*ResponseItemBlank) Asset ¶
func (*ResponseItemBlank) Asset(name string) *admodels.AdAsset
Asset by name
func (*ResponseItemBlank) BidImpressionPrice ¶
func (it *ResponseItemBlank) BidImpressionPrice() billing.Money
BidImpressionPrice returns bid price for the external auction source. The current bid price will be adjusted according to the source correction factor and the commission share factor
func (*ResponseItemBlank) CampaignID ¶
func (*ResponseItemBlank) CampaignID() uint64
CampaignID number
func (*ResponseItemBlank) ClickTrackerLinks ¶
func (*ResponseItemBlank) ClickTrackerLinks() []string
ClickTrackerLinks returns traking links for click action
func (*ResponseItemBlank) CommissionShareFactor ¶
func (it *ResponseItemBlank) CommissionShareFactor() float64
CommissionShareFactor returns the commission share percentage which system gets from publisher.
func (*ResponseItemBlank) ContentFields ¶
func (*ResponseItemBlank) ContentFields() map[string]any
ContentFields from advertisement object
func (*ResponseItemBlank) ContentItem ¶
func (*ResponseItemBlank) ContentItem(name string) any
ContentItem returns the ad response data
func (*ResponseItemBlank) ContentItemString ¶
func (*ResponseItemBlank) ContentItemString(name string) string
ContentItemString from the ad
func (*ResponseItemBlank) Context ¶
func (*ResponseItemBlank) Context(ctx ...context.Context) context.Context
Context value
func (*ResponseItemBlank) ECPM ¶
func (it *ResponseItemBlank) ECPM() billing.Money
ECPM returns the effective cost per mille of the item.
func (*ResponseItemBlank) ExtImpressionID ¶
func (it *ResponseItemBlank) ExtImpressionID() string
ExtImpressionID it's unique code of the auction bid impression
func (*ResponseItemBlank) ExtTargetID ¶
func (it *ResponseItemBlank) ExtTargetID() string
ExtTargetID of the external network
func (*ResponseItemBlank) FinalPrice ¶
func (it *ResponseItemBlank) FinalPrice(action adtype.Action) billing.Money
FinalPrice returns final price for the item which is including all possible commissions with all corrections
func (*ResponseItemBlank) FixedPurchasePrice ¶
func (it *ResponseItemBlank) FixedPurchasePrice(action adtype.Action) billing.Money
FixedPurchasePrice returns the fixed price of the action
func (*ResponseItemBlank) Format ¶
func (it *ResponseItemBlank) Format() *types.Format
Format object
func (*ResponseItemBlank) ID ¶
func (it *ResponseItemBlank) ID() string
ID of current response item (unique code of current response)
func (*ResponseItemBlank) Impression ¶
func (it *ResponseItemBlank) Impression() *adtype.Impression
Impression place object
func (*ResponseItemBlank) ImpressionID ¶
func (it *ResponseItemBlank) ImpressionID() string
ImpressionID unique code string
func (*ResponseItemBlank) ImpressionTrackerLinks ¶
func (*ResponseItemBlank) ImpressionTrackerLinks() []string
ImpressionTrackerLinks returns traking links for impression action
func (*ResponseItemBlank) InternalAuctionCPMBid ¶
func (it *ResponseItemBlank) InternalAuctionCPMBid() billing.Money
InternalAuctionCPMBid value provides maximal possible price without any comission According to this value the system can choice the best item for the auction
func (*ResponseItemBlank) IsBackup ¶
func (*ResponseItemBlank) IsBackup() bool
IsBackup indicates whether the advertisement is a backup ad type.
func (*ResponseItemBlank) MainAsset ¶
func (*ResponseItemBlank) MainAsset() *admodels.AdAsset
MainAsset from response
func (*ResponseItemBlank) NetworkName ¶
func (*ResponseItemBlank) NetworkName() string
NetworkName by source
func (*ResponseItemBlank) PotentialPrice ¶
func (it *ResponseItemBlank) PotentialPrice(action adtype.Action) billing.Money
PotentialPrice wich can be received from source but was marked as descrepancy
func (*ResponseItemBlank) PrepareBidImpressionPrice ¶
func (it *ResponseItemBlank) PrepareBidImpressionPrice(price billing.Money) billing.Money
PrepareBidImpressionPrice prepares the price for the action The price is adjusted according to the source correction factor and the commission share factor
func (*ResponseItemBlank) Price ¶
func (it *ResponseItemBlank) Price(action adtype.Action) billing.Money
Price per specific action type (view, click, lead, etc)
func (*ResponseItemBlank) PriceTestMode ¶
func (it *ResponseItemBlank) PriceTestMode() bool
PriceTestMode returns true if the price is in test mode
func (*ResponseItemBlank) PricingModel ¶
func (it *ResponseItemBlank) PricingModel() types.PricingModel
PricingModel of advertisement
func (*ResponseItemBlank) PriorityFormatType ¶
func (it *ResponseItemBlank) PriorityFormatType() types.FormatType
PriorityFormatType from current Ad
func (*ResponseItemBlank) PurchasePrice ¶
func (it *ResponseItemBlank) PurchasePrice(action adtype.Action) billing.Money
PurchasePrice gives the price of view from external resource. The cost of this request.
func (*ResponseItemBlank) Second ¶
func (*ResponseItemBlank) Second() *adtype.SecondAd
Second campaigns
func (*ResponseItemBlank) SetBidImpressionPrice ¶
func (it *ResponseItemBlank) SetBidImpressionPrice(bid billing.Money) error
SetBidImpressionPrice value for external sources auction the system will pay
func (*ResponseItemBlank) Source ¶
func (it *ResponseItemBlank) Source() adtype.Source
Source of response
func (*ResponseItemBlank) SourceCorrectionFactor ¶
func (it *ResponseItemBlank) SourceCorrectionFactor() float64
SourceCorrectionFactor value for the source
func (*ResponseItemBlank) TargetCorrectionFactor ¶
func (it *ResponseItemBlank) TargetCorrectionFactor() float64
TargetCorrectionFactor value for the target
func (*ResponseItemBlank) ViewTrackerLinks ¶
func (*ResponseItemBlank) ViewTrackerLinks() []string
ViewTrackerLinks returns traking links for view action
type ResponseItemBlock ¶
type ResponseItemBlock struct { Items []adtype.ResponserItem // contains filtered or unexported fields }
ResponseItemBlock group of simple items
func (*ResponseItemBlock) Context ¶
func (i *ResponseItemBlock) Context(ctx ...context.Context) context.Context
Context value
func (*ResponseItemBlock) ExtImpressionID ¶
func (i *ResponseItemBlock) ExtImpressionID() string
ExtImpressionID it's unique code of the auction bid impression
func (*ResponseItemBlock) ExtTargetID ¶
func (i *ResponseItemBlock) ExtTargetID() string
ExtTargetID of the external network
func (*ResponseItemBlock) ID ¶
func (i *ResponseItemBlock) ID() string
ID of current response item (unique code of current response)
func (*ResponseItemBlock) Impression ¶
func (i *ResponseItemBlock) Impression() *adtype.Impression
Impression place object
func (*ResponseItemBlock) ImpressionID ¶
func (i *ResponseItemBlock) ImpressionID() string
ImpressionID code
func (*ResponseItemBlock) InternalAuctionCPMBid ¶
func (i *ResponseItemBlock) InternalAuctionCPMBid() (bid billing.Money)
InternalAuctionCPMBid value provides maximal possible price without any comission According to this value the system can choice the best item for the auction
func (*ResponseItemBlock) Price ¶
func (i *ResponseItemBlock) Price(action adtype.Action) (price billing.Money)
Price of whole response
func (*ResponseItemBlock) PriorityFormatType ¶
func (i *ResponseItemBlock) PriorityFormatType() types.FormatType
PriorityFormatType from current Ad
func (*ResponseItemBlock) Validate ¶
func (i *ResponseItemBlock) Validate() (err error)
Validate response