advert

package
v0.0.0-...-1d6d57a Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdvertData

type AdvertData struct {
	Id       string  `json:"id" bson:"_id"`
	Name     string  `json:"name" bson:"name"`
	Contents string  `json:"contents" bson:"contents"`
	Link     string  `json:"link" bson:"link"`
	Image    string  `json:"image" bson:"image"`
	UserId   string  `json:"user_id" bson:"user_id"`
	Price    float32 `json:"price" bson:"price"`
	Level    string  `json:"level" bson:"level"`
	Type     string  `json:"type" bson:"type"`
}

type KeyValue

type KeyValue []item

func (KeyValue) Len

func (h KeyValue) Len() int

func (KeyValue) Less

func (h KeyValue) Less(i, j int) bool

func (*KeyValue) Pop

func (h *KeyValue) Pop() interface{}

func (*KeyValue) Push

func (h *KeyValue) Push(x interface{})

func (KeyValue) Swap

func (h KeyValue) Swap(i, j int)

type SDK

type SDK struct {
	// contains filtered or unexported fields
}

func (*SDK) HTTPGetIMaxRecommends

func (s *SDK) HTTPGetIMaxRecommends() ([]AdvertData, error)

func (*SDK) HTTPGetTextRecommends

func (s *SDK) HTTPGetTextRecommends(prop map[string]int) ([]AdvertData, error)

func (*SDK) RPCGetIMaxRecommends

func (s *SDK) RPCGetIMaxRecommends(num int) ([]AdvertData, error)

func (*SDK) RPCGetTextRecommends

func (s *SDK) RPCGetTextRecommends(prop map[string]int) ([]AdvertData, error)

func (*SDK) SetServ

func (s *SDK) SetServ(url string)

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(staticPath string, database *mgo.Database) *Server

func (*Server) Advert

func (s *Server) Advert(w http.ResponseWriter, r *http.Request, param httprouter.Params)

func (*Server) Deliver

func (s *Server) Deliver(w http.ResponseWriter, r *http.Request, param httprouter.Params)

func (*Server) Index

func (s *Server) Index(w http.ResponseWriter, r *http.Request, param httprouter.Params)

func (*Server) JS

func (s *Server) JS(w http.ResponseWriter, r *http.Request, param httprouter.Params)

func (*Server) Pay

func (s *Server) Pay(w http.ResponseWriter, r *http.Request, param httprouter.Params)

func (*Server) RPCGetIMaxRecommends

func (s *Server) RPCGetIMaxRecommends(prop int, reply *[]AdvertData) error

func (*Server) RPCGetTextRecommends

func (s *Server) RPCGetTextRecommends(prop map[string]int, reply *[]AdvertData) error

func (*Server) RecommendIMax

func (s *Server) RecommendIMax(w http.ResponseWriter, r *http.Request, param httprouter.Params)

func (*Server) RecommendTextList

func (s *Server) RecommendTextList(w http.ResponseWriter, r *http.Request, param httprouter.Params)

func (*Server) Run

func (s *Server) Run(port string)

func (*Server) SetSSO

func (s *Server) SetSSO(sername string, sname string, ssourl string, domain string)

type UserData

type UserData struct {
	Id      string  `json:"id" bson:"_id"`
	Name    string  `json:"name" bson:"name"`
	Balance float32 `json:"balance" bson:"balance"`
}

Jump to

Keyboard shortcuts

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