apiserver

package
v0.0.0-...-e82c7fc Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2020 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadFile

func DownloadFile(fpath string, url string) error

DownloadFile downloading file from a url

func Start

func Start(config *Config) error

Start is a function for start server

Types

type Config

type Config struct {
	BindAddr    string `toml:"bind_addr"`
	LogLevel    string `toml:"log_level"`
	DatabaseURL string `toml:"database_url"`
	JwtKey      []byte `toml:"jwt_key"`
}

Config is a interface for starting server

func NewConfig

func NewConfig() *Config

NewConfig is a function for creating a new Config interface for starting server

type ResponseWriter

type ResponseWriter struct {
	http.ResponseWriter

	Hijacker http.Hijacker
	// contains filtered or unexported fields
}

ResponseWriter is a new respinseWriter

func (*ResponseWriter) Hijack

func (w *ResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error)

Hijack hiajcking http

func (*ResponseWriter) WriteHeader

func (w *ResponseWriter) WriteHeader(statusCode int)

WriteHeader writing header to ResponseWriter struct

Jump to

Keyboard shortcuts

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