server

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2025 License: MIT Imports: 10 Imported by: 0

README

server

Server implements http and websocket servers

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPResponse

func HTTPResponse(c echo.Context, data interface{}) error

func NewHTTP

func NewHTTP(cfg *HttpConfig, log logam.Logger) (*httpServer, error)

Types

type Confirmation

type Confirmation struct {
	Message string `json:"message"`
}

type HttpConfig

type HttpConfig struct {
	BindAddress     string `split_words:"true" default:":8080"`
	ReadTimeout     time.Duration
	WriteTimeout    time.Duration
	MaxBodyLimit    string   `split_words:"true" default:"51200M"`
	StaticPath      string   `split_words:"true" default:""`
	AlllowedOrigins []string `split_words:"true" default:"*"`
}

func NewHttpConfig

func NewHttpConfig() (*HttpConfig, error)

type PatchConfirmation

type PatchConfirmation struct {
	PostConfirmation
}

type PostConfirmation

type PostConfirmation struct {
	Resource string `json:"resource"`
	Message  string `json:"message"`
	ID       string `json:"id"`
}

type ResponsePayload

type ResponsePayload map[string]interface{}

type Singular

type Singular map[string]interface{}

Jump to

Keyboard shortcuts

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