cmd

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(fs embed.FS)

Types

type App

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

func NewApp

func NewApp(file, bucket string, max int, ttl time.Duration) (*App, error)

func (*App) CleanUp

func (app *App) CleanUp(broken bool) error

func (*App) Close

func (app *App) Close() error

func (*App) HandleMessage

func (app *App) HandleMessage(w http.ResponseWriter, r *http.Request)

func (*App) HealthCheck

func (app *App) HealthCheck(w http.ResponseWriter, r *http.Request)

func (*App) MessageList

func (app *App) MessageList(w http.ResponseWriter, r *http.Request)

func (*App) ServeHTTP added in v1.3.5

func (app *App) ServeHTTP(w http.ResponseWriter, r *http.Request)

type List

type List struct {
	NextLink string    `json:"@odata.nextLink,omitempty"`
	Count    int       `json:"@odata.count"`
	Messages []Message `json:"value"`
}

type Message

type Message struct {
	From      string    `json:"from"`
	To        string    `json:"to"`
	Body      string    `json:"body"`
	Timestamp time.Time `json:"timestamp"`
}

Jump to

Keyboard shortcuts

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