server

package
v0.0.0-...-1f7fc53 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserIdSearch = iota
	UserNameSearch
)
View Source
const (
	SESSION_TOKEN string = "grumbler_sesstoken"
)

Variables

This section is empty.

Functions

func NewFollowStore

func NewFollowStore(db *sql.DB) followStore

func NewGrumbleStore

func NewGrumbleStore(db *sql.DB) grumbleStore

func NewSessionStore

func NewSessionStore(db *sql.DB) sessionStore

func NewUserStore

func NewUserStore(db *sql.DB) userStore

Types

type Server

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

func NewServer

func NewServer(cfg util.Config, db *sql.DB) Server

func (*Server) Error

func (s *Server) Error(c *gin.Context, statusCode int, user *model.User, err error)

func (*Server) Fatal

func (s *Server) Fatal(err error)

func (*Server) Info

func (s *Server) Info(c *gin.Context, statusCode int, user *model.User, msg string)

func (*Server) RequestBodyLog

func (s *Server) RequestBodyLog(c *gin.Context)

Request Bodyはストリームなので一度読み込んだら破棄されるため、バッファーを経由させる。

func (*Server) Run

func (s *Server) Run() error

func (*Server) Warn

func (s *Server) Warn(c *gin.Context, statusCode int, user *model.User, err error)

Jump to

Keyboard shortcuts

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