Documentation ¶
Index ¶
- Variables
- func GenAdvertCondition() db.Compounds
- func Render(v Adverter) string
- type AdItem
- type AdPosition
- func (f *AdPosition) Add() (pk interface{}, err error)
- func (f *AdPosition) Edit(mw func(db.Result) db.Result, args ...interface{}) error
- func (f *AdPosition) Exists(name string, ident string, excludeId uint64) error
- func (f *AdPosition) GetAdvertsByIdent(idents ...string) (map[string][]*ItemResponse, error)
- func (f *AdPosition) GetIDByIdent(ident string) (uint64, error)
- func (f *AdPosition) GetOneAdvertByIdent(ident string) (*dbschema.OfficialAdItem, error)
- type AdPublisher
- func (f *AdPublisher) Add() (pk interface{}, err error)
- func (f *AdPublisher) Edit(mw func(db.Result) db.Result, args ...interface{}) error
- func (f *AdPublisher) Exists(ownerType string, ownerID uint64) (bool, error)
- func (f *AdPublisher) ExistsOther(ownerType string, ownerID uint64, id uint64) (bool, error)
- type AdSettings
- func (f *AdSettings) Add() (pk interface{}, err error)
- func (f *AdSettings) Edit(mw func(db.Result) db.Result, args ...interface{}) error
- func (f *AdSettings) Exists(name string) (bool, error)
- func (f *AdSettings) ExistsOther(name string, id uint64) (bool, error)
- func (f *AdSettings) List(filter Filter, offset, size int) error
- type Adverter
- type ContentRenderer
- type Filter
- type ItemAndPosition
- type ItemAndRendered
- type ItemResponse
- type PositionWithRendered
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Contype = echo.NewKVData() AdMode = echo.NewKVData() )
View Source
var ErrAdSlotDoesNotExist = errors.New(`ad slot does not exist`)
Functions ¶
func GenAdvertCondition ¶
Types ¶
type AdPosition ¶
type AdPosition struct {
*dbschema.OfficialAdPosition
}
func NewAdPosition ¶
func NewAdPosition(ctx echo.Context) *AdPosition
func (*AdPosition) Add ¶
func (f *AdPosition) Add() (pk interface{}, err error)
func (*AdPosition) Exists ¶
func (f *AdPosition) Exists(name string, ident string, excludeId uint64) error
func (*AdPosition) GetAdvertsByIdent ¶
func (f *AdPosition) GetAdvertsByIdent(idents ...string) (map[string][]*ItemResponse, error)
func (*AdPosition) GetIDByIdent ¶
func (f *AdPosition) GetIDByIdent(ident string) (uint64, error)
func (*AdPosition) GetOneAdvertByIdent ¶
func (f *AdPosition) GetOneAdvertByIdent(ident string) (*dbschema.OfficialAdItem, error)
type AdPublisher ¶
type AdPublisher struct {
*dbschema.OfficialAdPublisher
}
func NewAdPublisher ¶
func NewAdPublisher(ctx echo.Context) *AdPublisher
func (*AdPublisher) Add ¶
func (f *AdPublisher) Add() (pk interface{}, err error)
func (*AdPublisher) Exists ¶
func (f *AdPublisher) Exists(ownerType string, ownerID uint64) (bool, error)
func (*AdPublisher) ExistsOther ¶
type AdSettings ¶
type AdSettings struct {
*dbschema.OfficialAdSettings
}
func NewAdSettings ¶
func NewAdSettings(ctx echo.Context) *AdSettings
func (*AdSettings) Add ¶
func (f *AdSettings) Add() (pk interface{}, err error)
func (*AdSettings) ExistsOther ¶
func (f *AdSettings) ExistsOther(name string, id uint64) (bool, error)
type ContentRenderer ¶
type ItemAndPosition ¶
type ItemAndPosition struct { *dbschema.OfficialAdItem Rendered string AdPosition *dbschema.OfficialAdPosition `db:"-,relation=id:position_id|gtZero"` }
func (*ItemAndPosition) GetContent ¶
func (i *ItemAndPosition) GetContent() string
func (*ItemAndPosition) GetContype ¶
func (i *ItemAndPosition) GetContype() string
func (*ItemAndPosition) GetHeight ¶
func (i *ItemAndPosition) GetHeight() uint
func (*ItemAndPosition) GetURL ¶
func (i *ItemAndPosition) GetURL() string
func (*ItemAndPosition) GetWidth ¶
func (i *ItemAndPosition) GetWidth() uint
type ItemAndRendered ¶
type ItemAndRendered struct { *dbschema.OfficialAdItem Rendered string }
type ItemResponse ¶
type ItemResponse struct { Content string `json:"content" xml:"content"` Contype string `json:"contype" xml:"contype"` URL string `json:"url" xml:"url"` Start uint `json:"start,omitempty" xml:"start,omitempty"` End uint `json:"end,omitempty" xml:"end,omitempty"` Width uint `json:"width,omitempty" xml:"width,omitempty"` Height uint `json:"height,omitempty" xml:"height,omitempty"` Rendered string `json:"rendered,omitempty" xml:"rendered,omitempty"` }
func NewItemResponse ¶
func NewItemResponse(item *dbschema.OfficialAdItem, position *dbschema.OfficialAdPosition) *ItemResponse
func (*ItemResponse) GenHTML ¶
func (i *ItemResponse) GenHTML() *ItemResponse
func (*ItemResponse) GetContent ¶
func (i *ItemResponse) GetContent() string
func (*ItemResponse) GetContype ¶
func (i *ItemResponse) GetContype() string
func (*ItemResponse) GetHeight ¶
func (i *ItemResponse) GetHeight() uint
func (*ItemResponse) GetURL ¶
func (i *ItemResponse) GetURL() string
func (*ItemResponse) GetWidth ¶
func (i *ItemResponse) GetWidth() uint
type PositionWithRendered ¶
type PositionWithRendered struct { *dbschema.OfficialAdPosition Rendered string }
func (*PositionWithRendered) GetContent ¶
func (i *PositionWithRendered) GetContent() string
func (*PositionWithRendered) GetContype ¶
func (i *PositionWithRendered) GetContype() string
func (*PositionWithRendered) GetHeight ¶
func (i *PositionWithRendered) GetHeight() uint
func (*PositionWithRendered) GetURL ¶
func (i *PositionWithRendered) GetURL() string
func (*PositionWithRendered) GetWidth ¶
func (i *PositionWithRendered) GetWidth() uint
Click to show internal directories.
Click to hide internal directories.