http

package
v0.0.0-...-3ea9707 Latest Latest
Warning

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

Go to latest
Published: May 16, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMarshalFailed = "failed to marshal: %w"
	ErrDecodeFailed  = "failed to decode: %w"
)

Functions

This section is empty.

Types

type Server

type Server struct {
	UserService    talkie.UserService
	TokenService   talkie.TokenService
	CommentService talkie.CommentService
	// contains filtered or unexported fields
}

Server represents an HTTP server

func NewServer

func NewServer() *Server

NewServer creates new HTTP server

func (*Server) Error

func (s *Server) Error(fn appHandler) gin.HandlerFunc

func (*Server) Run

func (s *Server) Run(port string) error

Run starts listening and serving HTTP requests

type Token

type Token struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
}

Jump to

Keyboard shortcuts

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