models

package
v0.0.0-...-1843f7d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2014 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ResCodeInputError = "30001"
View Source
const ResCodeNoAd = "20001"
View Source
const ResCodeSuccess = "00000"

Variables

View Source
var (
	Objects map[string]*Object
)
View Source
var (
	UserList map[string]*User
)

Functions

func AddOne

func AddOne(object Object) (ObjectId string)

func AddUser

func AddUser(u User) string

func DeductImpressionNumber

func DeductImpressionNumber(campaignId, number int) (err error)

func Delete

func Delete(ObjectId string)

func DeleteUser

func DeleteUser(uid string)

func GetAll

func GetAll() map[string]*Object

func GetAllUsers

func GetAllUsers() map[string]*User

func GetDevice

func GetDevice(device Device) (deviceId int)

func GetDeviceQuality

func GetDeviceQuality(deviceId int) (ret []int)

func GetLocationCodes

func GetLocationCodes(address string) (provinceCode, cityCode string)

func Login

func Login(username, password string) bool

func Update

func Update(ObjectId string, Score int64) (err error)

func UpdateLastRequest

func UpdateLastRequest(zone Zone) (err error)

Types

type AdUnits

type AdUnits struct {
	AdvId                             int
	CampaignId                        int
	AdvType                           string
	AdvStatus                         string
	AdvClickUrlType                   string
	AdvClickUrl                       string
	AdvClickOpenType                  string
	AdvChtml                          string
	AdvMraid                          string
	AdvImpressionTrackingUrl          string
	AdvImpressionTrackingUrlIresearch string
	AdvImpressionTrackingUrlAdmaster  string
	AdvImpressionTrackingUrlNielsen   string
	AdvCreativeUrl                    string
	AdvCreativeUrl2                   string
	AdvCreativeUrl3                   string
}

func LaunchQuery

func LaunchQuery(provinceCode string, cityCode string, zone *Zone, qualityIds []int, advType string, screenCode string) (adUnit *AdUnits)

type Campaigns

type Campaigns struct {
	CreativeShowRule string
	CampaignId       int
	Priority         int
	Type             string
}

type Device

type Device struct {
	DeviceId      int
	DeviceMovment string
	DeviceName    string
}

type DevicePackageMatrix

type DevicePackageMatrix struct {
	DeviceId  int
	PackageId int
}

type Lov

type Lov struct {
	ScreenType string
	Code       string
	Value      string
}

type Object

type Object struct {
	ObjectId   string
	Score      int64
	PlayerName string
}

func GetOne

func GetOne(ObjectId string) (object *Object, err error)

type Profile

type Profile struct {
	Gender  string
	Age     int
	Address string
	Email   string
}

type RegionalTargeting

type RegionalTargeting struct {
	TargetingCode string
	RegionName    string
}

type User

type User struct {
	Id       string
	Username string
	Password string
	Profile  Profile
}

func GetUser

func GetUser(uid string) (u *User, err error)

func UpdateUser

func UpdateUser(uid string, uu *User) (a *User, err error)

type Zone

type Zone struct {
	EntryId         int
	PublicationId   int
	PlacementHash   string
	ZoneLastrequest int
	ZoneType        string
	ZoneWidth       string
	ZoneHeight      string
}

func GetZone

func GetZone(zoneHash string) (rstZone *Zone)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL