server

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NativeHandler

func NativeHandler(w http.ResponseWriter, r *http.Request, ads AdsDB)

func New

func New(l Logger, c Config, db AdsDB) *server

Types

type AdsDB

type AdsDB interface {
	GetSeat(seatID int) string
	GetNative(seatID int) string
	GetBanner(seatID int, width, height int64) (string, error)
	GetVideo(seatID, itemID int) string
	GetAudio(seatID, itemID int) string
}

type Config

type Config interface {
	GetListenAddr() string
	GetListenNetwork() string
	GetAdsDatabasePath() string
}

type ErrorResponse

type ErrorResponse struct {
	Status int
	Error  string
}

type Logger

type Logger interface{}

Jump to

Keyboard shortcuts

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