api

package module
v0.0.0-...-a36f63b Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitApiServer

func InitApiServer() (err error)

func InitArticleMgr

func InitArticleMgr() (err error)

func InitConfig

func InitConfig(filename string) (err error)

Types

type ApiServer

type ApiServer struct {
	// contains filtered or unexported fields
}
var (
	G_apiServer *ApiServer
)

type ArticleMgr

type ArticleMgr struct {
	// contains filtered or unexported fields
}
var (
	G_articleMrg *ArticleMgr
)

func (*ArticleMgr) GetToday

func (articleMgr *ArticleMgr) GetToday() (articles []common.Article, err error)

func (*ArticleMgr) GetTop10

func (articleMgr *ArticleMgr) GetTop10() (articles []common.Article, err error)

type Config

type Config struct {
	ApiPort                int    `json:"apiPort"`
	ReadTimeout            int    `json:"readTimeout"`
	WriteTimeout           int    `json:"writeTimeout"`
	StaticDir              string `json:"staticDir"`
	MongoUri               string `json:"mongoUri"`
	MongoConnectionTimeout int    `json:"mongoConnectionTimeout"`
}
var (
	//single
	G_config *Config
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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