elementary

package
v0.0.0-...-37de6bf Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	LogDir    string `json:"log"`
	UploadDir string `json:"upload"`
	TmpDir    string `json:"tmp"`

	GhostScript   string `json:"ghostScript"`
	DB            string `json:"db"`
	MaxDBConns    int    `json:"maxDBConns"`
	GdDB          string `json:"gdDB"`
	MaxGdDBConns  int    `json:"maxGdDBConns"`
	VoDDB         string `json:"vodDB"`
	MaxVoDDBConns int    `json:"maxVoDDBConns"`
	Cache         string `json:"cache"`
	OSSEndpoint   string `json:"ossEndpoint"`
	OSSBucket     string `json:"ossBucketName"`
	OSSKeyID      string `json:"ossKeyID"`
	OSSKeySec     string `json:"ossKeySec"`

	FrontEndDomain      string   `json:"frontEndDomain"`
	LanIPPrefix         []string `json:"lanIPPrefix"`
	LiveServer          string   `json:"liveServer"`
	UrlPrefix           string   `json:"urlPrefix"`
	CoursewareKeyPrefix string   `json:"coursewareKeyPrefix"`
	ExamKeyPrefix       string   `json:"examKeyPrefix"`
	GdEncryptKey        string   `json:"gdEncryptKey"`
}

func LoadConfig

func LoadConfig(fileName string) (*Config, error)

type Server

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

func NewServer

func NewServer(db *common.Database, cache *common.Cache, gdDB *common.Database, oss *common.ObjectStorage, cfg *Config) (*Server, error)

func (*Server) Close

func (sv *Server) Close() error

func (*Server) Go404

func (sv *Server) Go404(w http.ResponseWriter, r *http.Request, info string)

func (*Server) OnHttpGetM3U8

func (sv *Server) OnHttpGetM3U8(w http.ResponseWriter, r *http.Request)

func (*Server) Send

func (sv *Server) Send(w http.ResponseWriter, r *http.Request, status int, info string, result string) (int, error)

Jump to

Keyboard shortcuts

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