news

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: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseAdvertSession

func ParseAdvertSession(r *http.Request, name string) (map[string]int, error)

Types

type BackServ

type BackServ struct {
	Pages *webserv.Pages
	// contains filtered or unexported fields
}

func NewBackServ

func NewBackServ(database *mgo.Database) *BackServ

func (*BackServ) GetProp

func (s *BackServ) GetProp() map[string]string

func (*BackServ) Index

func (*BackServ) PostNews

func (s *BackServ) PostNews(w http.ResponseWriter, r *http.Request, param httprouter.Params)

func (*BackServ) PostPage

func (s *BackServ) PostPage(w http.ResponseWriter, r *http.Request, _ httprouter.Params)

func (*BackServ) Run

func (s *BackServ) Run(port string)

func (*BackServ) SetSSO

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

type FrontServ

type FrontServ struct {
	Pages     *webserv.Pages
	AdvertSDK *advert.SDK
	// contains filtered or unexported fields
}

func NewFrontServ

func NewFrontServ(database *mgo.Database) *FrontServ

func (*FrontServ) GetNews

func (s *FrontServ) GetNews(w http.ResponseWriter, r *http.Request, params httprouter.Params)

func (*FrontServ) GetProp

func (s *FrontServ) GetProp() map[string]string

func (*FrontServ) Index

func (*FrontServ) Run

func (s *FrontServ) Run(port string)

func (*FrontServ) SetSSO

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

type NewsData

type NewsData struct {
	Id       string    `json:"id" bson:"_id"`
	Title    string    `json:"title" bson:"title"`
	Contents string    `json:"contents" bson:"contents"`
	Image    string    `json:"image" bson:"image"`
	UserId   string    `json:"user_id" bson:"user_id"`
	Type     string    `json:"type" bson:"type"`
	Time     time.Time `json:"time" bson:"time"`
}

type NewsItem

type NewsItem struct {
	Id    string    `json:"id" bson:"_id"`
	Title string    `json:"title" bson:"title"`
	Image string    `json:"image" bson:"image"`
	Type  string    `json:"type" bson:"type"`
	Time  time.Time `json:"time" bson:"time"`
}

Jump to

Keyboard shortcuts

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