api

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

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

Go to latest
Published: Dec 27, 2024 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Comment

type Comment struct {
	ID           int64      `json:"id"`
	Content      string     `json:"content"`
	ArticleID    uuid.UUID  `json:"article_id"`
	ParentID     int64      `json:"parent_id"`
	Likes        int32      `json:"likes"`
	FromUserID   uuid.UUID  `json:"from_user_id"`
	ToUserID     uuid.UUID  `json:"to_user_id"`
	CreatedAt    time.Time  `json:"created_at"`
	DeletedAt    time.Time  `json:"deleted_at"`
	FromUserName string     `json:"from_user_name"`
	ToUserName   string     `json:"to_user_name"`
	Child        []*Comment `json:"child"`
}

type Server

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

Server serves HTTP requests for our banking service.

func NewServer

func NewServer(config util.Config, store db.Store, taskDistributor worker.TaskDistributor) (*Server, error)

NewServer creates a new HTTPS server and setup routing

func (*Server) Shutdown

func (server *Server) Shutdown(ctx context.Context) error

func (*Server) Start

func (server *Server) Start(address string, config util.Config) error

Start runs the HTTP server on a specific address.

Jump to

Keyboard shortcuts

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